Title: Problem with shortcode
Last modified: March 14, 2023

---

# Problem with shortcode

 *  Resolved [Klaus Moll](https://wordpress.org/support/users/klaus-moll/)
 * (@klaus-moll)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/problem-with-shortcode-25/)
 * 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/](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](http://www.DeepL.com/Translator)(
   free version)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fproblem-with-shortcode-25%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [joneiseman](https://wordpress.org/support/users/joneiseman/)
 * (@joneiseman)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/problem-with-shortcode-25/#post-16559022)
 * Updating to the latest version of Events Manager should fix this problem (version
   6.3).
 *  Thread Starter [Klaus Moll](https://wordpress.org/support/users/klaus-moll/)
 * (@klaus-moll)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/problem-with-shortcode-25/#post-16559447)
 * 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/](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/](https://ingeherrig.de/events/mbsr-achtsame-stressregulierung-8-wochen-kurs-online/)
 * Example test environment overview
   [http://ingeherrig.mopoint.de/kurse-termine/](http://ingeherrig.mopoint.de/kurse-termine/)
 * Example active environment overview
   [https://ingeherrig.de/kurse-termine/](https://ingeherrig.de/kurse-termine/)
 * Thanks for your support
   GreetingsKlaus
 *  [joneiseman](https://wordpress.org/support/users/joneiseman/)
 * (@joneiseman)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/problem-with-shortcode-25/#post-16559470)
 * This is not my plugin. So, I won’t be able to change the plugin to transfer the
   old formatting to the new version.
 *  [joneiseman](https://wordpress.org/support/users/joneiseman/)
 * (@joneiseman)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/problem-with-shortcode-25/#post-16559879)
 * 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](https://wordpress.org/support/users/klaus-moll/)
 * (@klaus-moll)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/problem-with-shortcode-25/#post-16560975)
 * 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
 *  [joneiseman](https://wordpress.org/support/users/joneiseman/)
 * (@joneiseman)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/problem-with-shortcode-25/#post-16562193)
 * To get rid of the error message, change line 485 of wp-content/plugins/events-
   manager/classes/em-events.php from this:
 *     ```wp-block-code
       return apply_filters('em_events_output_grouped', ob_get_clean(), $events, $args);
       ```
   
 * To this:
 *     ```wp-block-code
       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/](https://wp-events-plugin.com/documentation/v6-migration/)
    -  This reply was modified 3 years, 2 months ago by [joneiseman](https://wordpress.org/support/users/joneiseman/).
 *  [joneiseman](https://wordpress.org/support/users/joneiseman/)
 * (@joneiseman)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/problem-with-shortcode-25/#post-16563509)
 * 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](https://wordpress.org/support/users/klaus-moll/)
 * (@klaus-moll)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/problem-with-shortcode-25/#post-16565137)
 * 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.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=3550347)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 8 replies
 * 2 participants
 * Last reply from: [Klaus Moll](https://wordpress.org/support/users/klaus-moll/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/problem-with-shortcode-25/#post-16565137)
 * Status: resolved