Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Event Calendar problem


Go to End


18 Posts   8010 Views

Avatar
UncleCheese

Forum Moderator, 4102 Posts

23 June 2009 at 2:07am

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.

Avatar
PeterB

Community Member, 18 Posts

11 August 2009 at 10:28pm

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!

Avatar
snaip

Community Member, 181 Posts

13 August 2009 at 6:32am

hi

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

Avatar
UncleCheese

Forum Moderator, 4102 Posts

13 August 2009 at 6:50am

Weird. Do you have a link?

Avatar
snaip

Community Member, 181 Posts

13 August 2009 at 7:25am

Edited: 13/08/2009 7:25am

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:
http://eventcalendar.bluehousegroup.com/

Avatar
UncleCheese

Forum Moderator, 4102 Posts

13 August 2009 at 7:53am

I accidentally checked in a bug. Run another update.

Avatar
snaip

Community Member, 181 Posts

13 August 2009 at 8:49am

Edited: 13/08/2009 8:49am

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 :)

Avatar
TBunt

Community Member, 2 Posts

9 September 2009 at 3:31pm

Hi UncleCheese

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.