Jump to:

10928 Posts in 2612 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » Event Calendar and the newbie

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1241 Views
  • jimw
    Avatar
    Community Member
    13 Posts

    Event Calendar and the newbie Link to this post

    Hi,

    I'm very new to SilverStripe having just installed it over the weekend locally to test under xampp (and maybe that's the cause of my problem). I didn't have any problems installing it and setting up pages. Then I wanted to add an event calendar. That also didn't give any errors when I created the tables. However, when I went to add a calendar page, I didn't see the tabs as shown in the documentation. I only saw Configuration and Announcements and so could add an announcement. Even under configuration, I don't see all the fields listed in the documentation. Is the doc wrong or me?

    Then I realized that I possibly needed an calendar event page and so added one of those. Then I saw the ability to add events although I don't seem to be able to add any title or description for the event, just the date and time and the time comes up with the current date instead of the event date I entered.

    I don't see any obvious errors and would appreciate help.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar and the newbie Link to this post

    Hi, jimw,

    Yes, the EventCalendar docs are out of date. It's one of the many things on my list to improve as I try to manage the development of 4 different modules.

    I'm having a hard time understanding what's going on with your CalendarEvent page. It needs to be created as a child to a Calendar page. Date and time information goes on the Dates and Times tab -- all other fields go on other tabs. Announcements on the Calendar page are for quick calendar entries, e.g. "John's birthday" or "Memorial Day -- office closed."

    If you want to customize your calendar, I encourage you to read the recipe in the docs "Extending the event calendar"

  • jimw
    Avatar
    Community Member
    13 Posts

    Re: Event Calendar and the newbie Link to this post

    Now I seem to have a better understanding of what an announcement is and an event page is. So, I have a calendar page and an event page for a class I will be teaching in the fall. I added the event date and told it to repeat every week (but I only need 3 weeks because that is how long the class lasts). However, how do I tell it when to stop?

    Then when I click on the event page, I get the following. And this leads me to the question "do I need the dataobject manager?" as someone else asked. I don't have any other modules installed except the event calendar. Any help would be appreciated.

    I got around the error below by adding each class date separately and it worked.

    [Notice] Object of class CalendarDateTime could not be converted to int
    GET /SilverStripe/wscc-introduction-to-web-design/

    Line 1745 in D:\Program Files\xampp\htdocs\SilverStripe\sapphire\core\model\DataObject.php
    Source

    1736       } else {
    1737          $defaults = $this->stat('defaults');
    1738          // if a field is not existing or has strictly changed
    1739          if(!isset($this->record[$fieldName]) || $this->record[$fieldName] !== $val) {
    1740             // TODO Add check for php-level defaults which are not set in the db
    1741             // TODO Add check for hidden input-fields (readonly) which are not set in the db
    1742             // At the very least, the type has changed
    1743             $this->changed[$fieldName] = 1;
    1744             
    1745             if(!isset($this->record[$fieldName]) || $this->record[$fieldName] != $val) {
    1746                // Value has changed as well, not just the type
    1747                $this->changed[$fieldName] = 2;
    1748             }
    1749
    1750             // value is always saved back when strict check succeeds
    1751             $this->record[$fieldName] = $val;

    Trace

    * DataObject->setField(StartDate,Object id #290)
    Line 126 of ViewableData.php
    * ViewableData::__set(StartDate,Object id #290)
    Line 279 of CalendarEvent.php
    * CalendarEvent->OtherDates()
    * call_user_func_array(Array,Array)
    Line 111 of Object.php
    * Object->__call(OtherDates,Array)
    * CalendarEvent_Controller->OtherDates()
    * call_user_func_array(Array,Array)
    Line 551 of ViewableData.php
    * ViewableData->cachedCall(OtherDates,,)
    Line 592 of ViewableData.php
    * ViewableData->hasValue(OtherDates)
    Line 198 of .cacheD..Program Files.xampp.htdocs.SilverStripe.event_calendar.templates.Layout.CalendarEvent.ss
    * include(C:\WINDOWS\Temp\silverstripe-cacheD--Program-Files-xampp-htdocs-SilverStripe\.cacheD..Program Files.xampp.htdocs.SilverStripe.event_calendar.templates.Layout.CalendarEvent.ss)
    Line 354 of SSViewer.php
    * SSViewer->process(Object id #267)
    Line 346 of SSViewer.php
    * SSViewer->process(Object id #267)
    Line 175 of Controller.php
    * Controller->handleAction(Object id #7)
    Line 107 of RequestHandler.php
    * RequestHandler->handleRequest(Object id #7)
    Line 122 of Controller.php
    * Controller->handleRequest(Object id #7)
    Line 28 of ModelAsController.php
    * ModelAsController->handleRequest(Object id #7)
    Line 277 of Director.php
    * Director::handleRequest(Object id #7,Session)
    Line 121 of Director.php
    * Director::direct(/wscc-introduction-to-web-design/)
    Line 115 of main.php

  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar and the newbie Link to this post

    EventCalendar does work best with the DataObjectManager module. I would install that if you can. You can check it out from SVN at:

    http://carlinowebdesign.svn.beanstalkapp.com/modules/trunk/dataobject_manager

    I've never seen that error before, though. That's scary looking.

    To make an event stop repeating, just give it a start and end date.

  • jimw
    Avatar
    Community Member
    13 Posts

    Re: Event Calendar and the newbie Link to this post

    Thanks for the help but now I got this error when installing the dataobject_manager. I'm thinking that my mindset is not grasping SilverStripe.

    Environment Builder (formerly db/build)
    http://localhost/SilverStripe/
    [Notice] Use of undefined constant PHP_URL_PATH - assumed 'PHP_URL_PATH'
    GET /SilverStripe/dev/build

    Line 54 in D:\Program Files\xampp\htdocs\SilverStripe\sapphire\dev\DebugView.php
    Source

    45    );
    46
    47    /**
    48     * Generate breadcrumb links to the URL path being displayed
    49     *
    50     * @return string
    51     */
    52    public function Breadcrumbs() {
    53       $basePath = str_replace(Director::protocolAndHost(), '', Director::absoluteBaseURL());
    54       $relPath = parse_url(substr($_SERVER['REQUEST_URI'], strlen($basePath), strlen($_SERVER['REQUEST_URI'])), PHP_URL_PATH);
    55       $parts = explode('/', $relPath);
    56       $base = Director::absoluteBaseURL();
    57       $pathPart = "";
    58       $pathLinks = array();
    59       foreach($parts as $part) {
    60          if ($part != '') {

    Trace

    * DebugView->Breadcrumbs()
    Line 104 of DebugView.php
    * DebugView->writeInfo(Environment Builder (formerly db/build),http://localhost/SilverStripe/)
    Line 126 of DevelopmentAdmin.php
    * DevelopmentAdmin->build(Object id #7)
    Line 107 of RequestHandler.php
    * RequestHandler->handleRequest(Object id #7)
    Line 122 of Controller.php
    * Controller->handleRequest(Object id #7)
    Line 277 of Director.php
    * Director::handleRequest(Object id #7,Session)
    Line 121 of Director.php
    * Director::direct(/dev/build)
    Line 115 of main.php

    1241 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.