Yeah, huge flaw in the Silverstripe ORM. It's create/modify only. It won't delete orphaned columns or tables. That bites me all the time.
Thank you UncleCheese, I had this phantom column problem with a self-created page type, and deleting the database tables and recreating got rid of it!
can you tell me how to display Calendar in template ?
i create new Calendar page and EventPage, next ?flush=1, but only what i get is blank page with "Visit www.silverstripe.com to download the CMS" and SS toolbar with " View Page in: CMS Draft Site Published Site"
i tried to create Calendar.ss file in mysite/template/layout with this code
<% control Events %> <% if Announcement %> $Title <% else_if CurrentPage.BlindOrLink %> <a rel="toggle" href="$Link" class="toggle-$ID">$Event.Title</a> <% else %> $Event.Title <% end_if %> <% end_control %>
but nothing happend
Weird. Do you have a link?
i delete and create pages again
now i have the SQL error
[User Error] Couldn't run query: SELECT `CalendarDateTime`.*, `CalendarDateTime`.ID, if(`CalendarDateTime`.ClassName,`CalendarDateTime`.ClassName,'CalendarDateTime') AS RecordClassName FROM `CalendarDateTime` LEFT JOIN `CalendarEvent` ON `CalendarEvent`.ID = `CalendarDateTime`.EventID WHERE ( Recursion != 1 AND ( (StartDate = '2010-02-12') OR (StartDate BETWEEN '2009-08-12' AND '2010-02-12') OR (EndDate BETWEEN '2009-08-12' AND '2010-02-12') ) AND `CalendarEvent`.EventID IN (37) ) GROUP BY `CalendarDateTime`.ID ORDER BY StartDate ASC, StartTime ASC, EventID ASC Unknown column 'CalendarEvent.EventID' in 'where clause'
it is similar to this:
I accidentally checked in a bug. Run another update.
ok i fixed my problem
my class structure is:
SomeNewPageClass -> Strona_Class -> Page_Class
and Event Calendar applys to Page_Class so i must change extends Calendar and CalendarEvent to Strona/Strona_Controller
now everything is ok :)
I am currently using version r78 of the Event Calendar module on SilverStripe version 2.3.3 and have come across an issue.
If I add a Calendar Event page it is putting the entry in twice when I view it on the Draft/Published sites, also the link which goes to the event throws an error when I try to view it.
Also, when I delete a Calendar Event page the entry still shows on the Draft/Published sites.
I have attached some screenshots for you to look at, hopefully I have explained the bug well enough.
eventsCalendar01.png is showing the double entry under the date SEP. 10, Sep 11 is the deleted entry.
GET_silverstripe_new-calendarevent_2009-09-10.png is the error page.
I have deleted the fields from the database, all related pages from the CMS and tried re-installing the module but the problem still persists.
Thanks in advance for any light you can throw on this.