• Resolved Klaus Moll

    (@klaus-moll)


    Hello Event Manager Team,
    I have a problem with a page. The error appears there:
    Warning: Undefined variable $events in /homepages/23/d226461627/htdocs/wp_ab_20220919/wp-content/plugins/events-manager/classes/em-events.php on line 485

    I used a shortcode in this page:

    [events_list_grouped mode=”monthly” category=”15″]

    #_EVENTLINK
    #_EVENTDATES
    von #_EVENTTIMES Uhr, #_LOCATIONNAME

    [/events_list_grouped]

    If there is no future event in this category, the error will be issued. Otherwise, no error is output. See:
    https://ingeherrig.de/achtsamkeitsbasierte-stressreduktion-mbsr/

    What can I do to stop the error from appearing.

    Regards
    Klaus

    Translated with http://www.DeepL.com/Translator (free version)

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Updating to the latest version of Events Manager should fix this problem (version 6.3).

    Thread Starter Klaus Moll

    (@klaus-moll)

    Thank you for the quick reply.
    I have loaded the page onto a development environment to see what the effect of the update will be.
    I’m only having problems because my settings no longer work. My custom fields are no longer displayed in the event and the overview page is also no longer the way I set it up. I am trying to familiarise myself with the new environment, which of course takes a lot of time. I’m a bit at a loss, because of course I want to provide the client with an error-free page.
    Is there any way to transfer the old formatting to the new version?

    Example test environment event
    http://ingeherrig.mopoint.de/events/mbsr-achtsame-stressregulierung-8-wochen-kurs-online/

    Example of an active environment for an event
    https://ingeherrig.de/events/mbsr-achtsame-stressregulierung-8-wochen-kurs-online/

    Example test environment overview
    http://ingeherrig.mopoint.de/kurse-termine/

    Example active environment overview
    https://ingeherrig.de/kurse-termine/

    Thanks for your support
    Greetings
    Klaus

    This is not my plugin. So, I won’t be able to change the plugin to transfer the old formatting to the new version.

    I could probably fix the problem you reported in the old version of the plugin. What version are you using on your active environment?

    Thread Starter Klaus Moll

    (@klaus-moll)

    Thank you for your help.
    I am using version 5.12.1 in the active environment.

    My problem is that I still have the plugin in use on other sites and honestly do not dare to update to 6.2.

    What can I do to make sure it all works in the current version. Or am I forced to reset the pages?

    Greetings
    Klaus

    To get rid of the error message, change line 485 of wp-content/plugins/events-manager/classes/em-events.php from this:

    return apply_filters('em_events_output_grouped', ob_get_clean(), $events, $args);

    To this:

    return apply_filters('em_events_output_grouped', ob_get_clean(), empty($events) ? array() : $events, $args);

    I see there’s some documentation on migrating to the 6.x version of the plugin: https://wp-events-plugin.com/documentation/v6-migration/

    • This reply was modified 3 years, 2 months ago by joneiseman.

    The fact that the PHP warning is showing on your client’s sites indicates you have the following settings in their wp-config.php file:

    define( ‘WP_DEBUG’, true );
    define( ‘WP_DEBUG_DISPLAY’, true );

    This is not recommended on a production site.

    Thread Starter Klaus Moll

    (@klaus-moll)

    Good morning,

    I am very happy that it worked. Thank you very much for the great support. My customer will be happy!!!

    I give 5 stars for your suport!!!

    I have customized the events.php.

    I will take a close look at the documentation and decide if I will migrate all the site where the plugin is running one by one.

    The setting of define( ‘WP_DEBUG’, true ); and define( ‘WP_DEBUG_DISPLAY’, true ); is set to false on the page. Why the error was displayed anyway, I don’t know.

    Thank you and many greetings from Germany
    Klaus

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Problem with shortcode’ is closed to new replies.