• Hi

    This error message is being logged repeatedly (multiple times a minute):


    PHP Warning: Undefined array key “calendar_size” in …/plugins/events-manager/classes/em-calendar.php on line 218

    The calendar is set to ‘responsive’ at the moment

    Can you help please? Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Are you using the WP Fullcalendar plugin? If so, add the following code snippet to solve the problem:

    add_filter('wpfc_fullcalendar_args', function( $args ) {
    $args['calendar_size'] = "large";
    return $args;
    });

    You can use the Code Snippets plugin to add this code snippet.

    Thread Starter Mariette

    (@mariettej)

    Hi, no just the Events Manager plugin

    You could change line 218 of em-calendar.php from this:

    if( $args['calendar_size'] === 'large' ) {

    To this:

    if( array_key_exists( 'calendar_size', $args ) && $args['calendar_size'] === 'large' ) {

    And then hope that the plugin owner fixes this in the next release.

    Thread Starter Mariette

    (@mariettej)

    Apologies that I missed your second reply last week @joneiseman

    I have now tried your fix for those websites that have a responsive calendar view and it has worked – no more PHP warnings every few minutes. Hooray!

    If anyone else wants to do this, the relevant em-calendar.php file can be found in the classes folder (there’s one in widgets too).

    Thanks very much for your help, I appreciate that.

    I wonder how to get the developers to make the fix themselves in the next release…

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