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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

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

Event Calendar and 2.4.0

Go to End

41 Posts   7851 Views


Community Member, 63 Posts

1 April 2010 at 12:55pm

Is anybody else testing release 88 of the Event Calendar on SS 2.4.0b2?

Now that CalendarDateField has been moved into the legacydatetimefields module, I'm chasing Errors around.

1st I svn'd the legacy module and got an error in LegacyDateField.php

$formID = $this->form->FormName();

saying it can't find/do the FormName() method in this instance when trying to view an exisiting Calendar in the backend.

I'm not sure how much development will be continued with the legacy module so don't know if a bug is relevant here

Then I renamed the CalendarDateField calls in CalendarDateTime.php to DateField and TimeField respectively as per

moved the legacy folder out of the way and now I've landed on:

Fatal error: Class 'CalendarDateField' not found in C:\wamp\www\silverstripe\sapphire\forms\TableField.php on line 769

which has me stumped as I don't think I should be editing that.

p.s how do I use setConfig() as per ?


Forum Moderator, 4102 Posts

1 April 2010 at 1:34pm

We could probably just rename all the CalendarDateFields to DatePickerFields... the EventCalendar module requires DOM now, anyway.


Community Member, 63 Posts

1 April 2010 at 2:00pm

When you say it needs it now, I assume you mean the latest from svn as opposed to r88 v0.2?
because I haven't got the DataObjectManager yet.

Maybe some new install instructions are in order?



Forum Moderator, 4102 Posts

1 April 2010 at 2:07pm

Oh, maybe it will work with CTFs, too. At any rate, you should probably install DOM to take advantage of the DatePickerField and all the other UI elements you'll be able to use that don't look like relics from Windows 98.

There are some issues with the hierarchical URLs with EventCalendar and 2.4, as I remember, too. Have you had any issues with the frontend?


Community Member, 63 Posts

1 April 2010 at 2:17pm

yeah I think so,

trying to filter the event dates from the front end (looking for events during February/March) and the url that is submitted is like silverstripe/workshops/20100210/10100331

and it comes back with 404 page not found - I think there needs to be an explicit Action in the URL like silverstripe/workshops/Filter/20100210/10100331 ?

(CTFs = Click Through Fraudsters?)


Community Member, 63 Posts

7 April 2010 at 12:27pm

I've installed the DataObjectManager module v388

I've renamed all the CalendarDateFields to DatePickerFields in the attached files and now I can create Calendars and Calendar Events in the back end.

Now I've found a peculiarity with the Announcements tab.
Adding an announcement works in that a record is added to the database (viewable in phpomyadmin) but the is_announcement flag is not set.

Looking in the source of the form I can find that:

<input class="hidden" type="hidden" id="DataObjectManager_Popup_AddForm_is_announcement" name="is_announcement" value="" /> 

where surely the value should be 1 so that it is then displayed in the Announcement tab.

lines 114, 175 and 238 of CalendarDateTime.php are where this field is defined as:

new HiddenField('is_announcement',null,'1')

on line 238 the value was set to 0 but I changed it to 1 but it is still not being displayed as 1 in the form

If I rename the field (to is_announcementX or something) on line 238, then the value is set to 1 (as I think it should be)

It's like something is overridding the value or resetting it to blank/null after it's been declared but I can't find any other mention of is_announcement


Community Member, 94 Posts

9 April 2010 at 12:20pm

Hmm yeah this is_announcement flag seems to be the final issue between me and EventCalendar working happily on 2.4. I've applied all the patches from this thread:

Will have another look this evening but I can't find why the form is being created with is_announcement hidden field value set to "" rather than "1" either.

Dang. So close.


Community Member, 94 Posts

10 April 2010 at 4:25pm

Also, $DateHeader is not returning the selected date / date-range of the current page, just an empty string (except for calendar home page when it returns the default text entered in the Configuration tab in the CMS).

Go to Top