Jump to:

10842 Posts in 2512 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Event_calendar having problems with FormName

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 986 Views
  • kenlomax
    Avatar
    Community Member
    33 Posts

    Event_calendar having problems with FormName Link to this post

    Hi All.
    I am still having trouble with event_calendar. Am using ss v2.4.2, dataobject_manager r511, legacydatetimefields trunk-r107809, event_calendar r116. I can create a Calendar page in the cms, but when I try to create a CalendarEvent sub=page I get the following error in my apache error_log: Fatal error: Call to member function FormName() on non-object on line 208 of ./sapphire/forms/DateField.php. Any ideas?
    Looking at the forums would seem to indicate that this was a problem in moving from v2.3 to v2.4, but the indication is that it has been fixed, but this is not so on my site.
    I have tried absolutley everything I could think of.

    Ken

  • kenlomax
    Avatar
    Community Member
    33 Posts

    Re: Event_calendar having problems with FormName Link to this post

    I have tried reverting back to ss v2.3.4 and found that I can create CalendarEvent sub-pages, but the calendar is not showing on the side (just says "Loading") and when I try to add a date to the Calendar event, Nothing can be entered into the dialog box.

    This is turning very much into a deal-breaker for me. Unless I can get this solved soon one way or another I am going to have to look at a different CMS as this site needs to be up and running soon for my client.

    Ken

  • QL Marketing
    Avatar
    Community Member
    2 Posts

    Re: Event_calendar having problems with FormName Link to this post

    The line before 208 reads

    if($this->getLocale() != 'en_NZ') return;


    So this problem will only come up if you have your locale set to en_NZ... although I changed that and the problem still remained so I just changed it to always return nothing - I can live without validation. And I know its bad to modify core files but I'm assuming any updates later should fix this bug anyway...

  • camfindlay
    Avatar
    Forum Moderator
    74 Posts

    Re: Event_calendar having problems with FormName Link to this post

    I have just had this same problem.
    It seems to be attached to the individual CMS user's locale rather than the i18n::set_locale('en_NZ'); that you set in the _config.php.

    This is how I solved it.

    Go and update your CMS user's locale to en_GB (guess this is the closest to en_NZ in terms of date/time formatting?) and the event calendar sub pages all begin to work correctly again, well at least in my case they did.

    I really didn't want to poke around with the core, hopefully a fix will come out for this at some point.

    Give it a try and post your results

    986 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.