Support

Home Forums Event Espresso Premium PHP Fatal error with function get_session_data and Aloglia plugin

PHP Fatal error with function get_session_data and Aloglia plugin

Posted: April 17, 2019 at 12:17 pm


bakerrisk

April 17, 2019 at 12:17 pm

We are using the “Search by Algolia” plugin to replace the builtin search function with Algolia search.

For the Algolia search to work we have to index our posts and pages. The indexing for posts and other post types are working without any issues. However when we try to index the pages we are getting a PHP error.

Below is from the error log every time we try to run the index for pages:

PHP Fatal error: Uncaught Error: Call to a member function get_session_data() on null in /home1/userfolder/public_html/wp-content/plugins/event-espresso-core-reg/core/domain/entities/shortcodes/EspressoCancelled.php:70
Stack trace:
#0 /home1/userfolder/public_html/wp-content/plugins/event-espresso-core-reg/core/services/shortcodes/EspressoShortcode.php(111): EventEspresso\core\domain\entities\shortcodes\EspressoCancelled->processShortcode(Array)
#1 /home1/userfolder/public_html/wp-content/plugins/event-espresso-core-reg/core/services/cache/BasicCacheManager.php(89): EventEspresso\core\services\shortcodes\EspressoShortcode->EventEspresso\core\services\shortcodes\{closure}()
#2 /home1/userfolder/public_html/wp-content/plugins/event-espresso-core-reg/core/services/shortcodes/EspressoShortcode.php(118): EventEspresso\core\services\cache\BasicCacheManager->get(‘SC_CANCELLED-0’, ‘ee_cache_post_S…’, Object(Closure), 0)
#3 /home1/userfolder/public_html/wp-content/plugins/event-espresso-core-reg/core/services/shortcodes/EspressoShortcode.php( in /home1/userfolder/public_html/wp-content/plugins/event-espresso-core-reg/core/domain/entities/shortcodes/EspressoCancelled.php on line 70

We are starting here to troubleshoot the error since the log is showing an error with the Event Espresso plugin and not the Algolia plugin.

Let us know if you need any other information.

Thanks for you help.


Josh

  • Support Staff

April 17, 2019 at 12:25 pm

Hi,

You could either a) temporarily remove the [Espresso_Cancelled] shortcode from the Registration cancelled page while it does the index, or if possible, set Algolia to not index that page and any of the other Event Espresso critical pages. Ideally those pages should not be included in any search index.


bakerrisk

April 17, 2019 at 12:30 pm

Thanks for the quick reply.

That makes sense. We’ll look into your suggestion to exclude those EE pages.

The support post ‘PHP Fatal error with function get_session_data and Aloglia plugin’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso