1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Missing start and end dates in fullcalender

Discussion in 'Community' started by achartier, Sep 16, 2018.

Thread Status:
Not open for further replies.
  1. achartier

    achartier Active Member

    Level: Community
    When you have more than one table associated with a fullcalendar visualization, the start and end date elements for tables other than the first one are not found. The reason for this is that the addEvForm in plugins/fabrik_visualization/fullcalendar/controllers/fullcalendar.php assumes that the event data is the first element of the $model->events[$listId] array, but this is not true.

    The $model->setUpEvents function call sets the index of the array to an index for the data tables as defined in the visualization configuration, so only the events array index may be something other than zero.

    The $model->setUpEvents call always returns an array with a single element so it is easy enough to ignore the element index and simply shift the first element off of the array.

    In this controller at line 89 is an if statement to determine if the listId is in the $model->events. The true block should read:
    Code (Text):

    if (array_key_exists($listId, $model->events))
    {
            $events = array_shift($model->events[$listId]);
            $startDateField = $events['startdate'];
            $endDateField   = $events['enddate'];
    }
     
    This solves the problem.
     
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    If you want to submit a PR, I'll merge it. I'm kind of swamped with site migration and catchup work atm.

    -- hugh
     
  3. achartier

    achartier Active Member

    Level: Community
  4. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Merged, tx.

    -- hugh
     
Thread Status:
Not open for further replies.

Share This Page