• I am using this plugin to render a Google Calendar in a page on my client’s website.

    They reported that while the calendar was rendering, the rest of the page was not.

    When I turn error reporting on, I see:

    Notice: Trying to access array offset on value of type bool in?[redacted path]/public_html/wp-content/plugins/google-calendar-events/includes/events/event.php?on line?356

    Notice: Trying to access array offset on value of type bool in?[redacted path]/public_html/wp-content/plugins/google-calendar-events/includes/events/event.php?on line?356

    Fatal error: Uncaught Error: Call to a member function format() on null in [redacted path]/public_html/wp-content/plugins/google-calendar-events/includes/abstracts/calendar.php:796 Stack trace: #0 /[redacted path]/public_html/wp-content/plugins/google-calendar-events/includes/events/event-builder.php(359): SimpleCalendar\Abstracts\Calendar->get_add_to_gcal_url(Object(SimpleCalendar\Events\Event)) #1 [internal function]: SimpleCalendar\Events\Event_Builder->process_event_content(Array) #2 [redacted path]/public_html/wp-content/plugins/google-calendar-events/includes/events/event-builder.php(243): preg_replace_callback(‘/\\[(\\[?)(title|…’, Array, ‘<h3 class=”even…’) #3 [redacted path]/public_html/wp-content/plugins/google-calendar-events/includes/abstracts/calendar.php(770): SimpleCalendar\Events\Event_Builder->parse_event_template_tags(‘<h3 class=”even…’) #4 [redacted path]/public_html/wp-content/plugins/google-calendar-events/includes/calendars/views/default-calendar-grid.php(474): SimpleCalendar\Abstracts in?[redacted path]/public_html/wp-content/plugins/google-calendar-events/includes/abstracts/calendar.php?on line?796

    The site is running on PHP 7.4 and appears healthy otherwise.

    The error message appears with all other plugins off and using a default theme.

    What gives and where would I begin to troubleshoot?

    cmkl

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support john

    (@johnweru)

    Hi there,

    Thanks for reaching out to us.

    In regards to your query here, please share with us a screenshot on the “Advanced” tab within your calendar settings.

    We look forward to your reply.

    Kind Regards

    Thread Starter cmkl

    (@cmkl)

    Hi John.

    Thanks for the reply.

    I’ve put a screenshot of the calendar’sadvanced tab here:

    https://drive.google.com/file/d/1y7PBZB0wiE30hNm6LK8uBBrth5yPY84f/view?usp=sharing

    cmkl

    Plugin Support john

    (@johnweru)

    Hi there,

    Thanks for keeping in touch with us.

    In this case, I have carried out tests on the plugin based on those settings and I do not seem to replicate the error. Do you mind sharing with us a screencast on all your calendar settings? Also, have you perhaps customized the plugin?

    I look forward to your reply.

    Kind Regards

    Thread Starter cmkl

    (@cmkl)

    Screencast is here: https://drive.google.com/file/d/1teit71CeFATgVwui9P8o8gkPcMYQiBqM/view?usp=sharing

    I have not modified the plugin.

    cmkl

    Plugin Support john

    (@johnweru)

    Hi there,

    Thanks for keeping in touch with us.

    In this case, please try out the following:

    Navigate to the calendar.php within the google-calendar-events/includes/abstracts/ directory path

    Within the file, replace line 796 with the following code:

    $gcal_end_dt = $end_dt_raw->format($gcal_dt_format) ?? '';

    Save your changes.

    Let us know how it goes.

    Kind Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.