• Resolved nosnurg

    (@nosnurg)


    When displaying multiple feeds in the widget or using the shortcode I am now getting notices like:

    Notice: Undefined index: 1581-1584-1585 in […]/wp-content/plugins/google-calendar-events/includes/misc-functions.php on line 50

    I think this is since the 2.2.0 update. I display PHP notices on screen so this is a bit annoying.

    G.

    https://wordpress.org/plugins/google-calendar-events/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Nick Young

    (@nickyoung87)

    We just pushed 2.2.1 to fix some issues with the CSS/JS and the calendar ID encoding. Please try updating to that and then let me know if you are still having troubles after that.

    Thanks!

    Thread Starter nosnurg

    (@nosnurg)

    No I’m afraid not. The code causing the problem is the line setting ‘range-start’ if it is null. It is using the hyphenated string of feed IDs as an array index and I suspect it just wants a single feed ID. I’d paste it here but text selection on my tablet is playing me up.

    The grid still seems to display the events fine, though I only gave events in one of the feeds at the moment so I’m not 100% sure, it is just whatever that line does throws up a warning notice.

    G

    Plugin Contributor Nick Young

    (@nickyoung87)

    Are you using the custom date range? Or how are you displaying the calendar?

    Thanks for all the info so far and letting us know of this so we can look at getting it fixed.

    Thread Starter nosnurg

    (@nosnurg)

    The calendars are displayed using the widget or shortcodes like [gcal id="1581,1582"] or [gcal id="1581,1582" display=list]. The calendars themselves seem to display fine in both grid and list mode whether for a single feed or multiple feeds, it is just that if there are multiple feeds they also throw the notices …

    Notice: Undefined index: 1581-1582-1583-1584-1585-1586-1587 in [...]/wp-content/plugins/google-calendar-events/includes/misc-functions.php on line 50
    
    Notice: Trying to get property of non-object in [...]/wp-content/plugins/google-calendar-events/includes/misc-functions.php on line 50

    … and I like to display them on the web page in my environment so I can see what is going on.

    It is tripping up on the code …

    if( $range_start === null ) {
    		$range_start = $d->feeds[$feed_ids]->feed_start;
    	}

    … because $feed_ids is e.g. 1581-1582-1583-1584-1585-1586-1587 when multiple lists are being displayed and the $d->feeds[] array indices are individual feed IDs like 1581 or 1582. So whatever $range_start is used for, it isn’t getting set correctly when there are multiple lists being displayed.

    G.

    Plugin Contributor Nick Young

    (@nickyoung87)

    Ok thanks for the extra information it is really helpful.

    What is your main feed settings set to for “Display Mode”? Are any of them using the “Custom Date Range” feature?

    Thread Starter nosnurg

    (@nosnurg)

    Ah that’s what you meant by Custom Date Range. No all my feeds are set to ‘Grid (Month View)‘ in the settings.

    To be honest I haven’t really grasped what the display mode in the feed settings actually does because I always set it in the widget or the shortcode. Clearly it has more significance than I realise.

    G.

    Plugin Contributor Nick Young

    (@nickyoung87)

    We are going to have a fix out for this with the next update. Thanks for bringing it to our attention!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Error when displaying multiple feeds.’ is closed to new replies.