Support

Home Forums Event Espresso Premium Event Espress 4 Update Causing Fatal Error

Event Espress 4 Update Causing Fatal Error

Posted: April 5, 2023 at 12:57 pm

Viewing 10 reply threads


Ken Bakos

April 5, 2023 at 12:57 pm

Just updated to EE4 version 5.0.3 and it caused a fatal error on my http://www.onfocussolutions.com website. The following is the notification I received from my host:

Our monitoring systems detected that your site onfocussolutions (Live) is not available and displays the following PHP error:

2023/04/05 18:45:58 [error] 65403#65403: *415644 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught Error: Call to undefined method Jaybizzle\CrawlerDetect\CrawlerDetect::getUserAgent() in /www/onfocussolutions_634/public/wp-content/plugins/event-espresso-core-reg/core/services/request/middleware/BotDetector.php:34


Tony

  • Support Staff

April 5, 2023 at 4:24 pm

Hi there,

Jaybizzle\CrawlerDetect\CrawlerDetect is a class we load from within the Event Espresso plugin from ‘vendors’ directory we story libraries in, the code in question is:

$CrawlerDetect = $this->loader->getShared(CrawlerDetect::class);
if ($CrawlerDetect instanceof CrawlerDetect) {
    // Check and record the user agent of the current 'visitor'
    $this->request->setIsBot($CrawlerDetect->isCrawler());
    $this->request->setUserAgent($CrawlerDetect->getUserAgent());
}

So for the error you’re getting to have been thrown CrawlerDetect instantiated (it exists), the $CrawlerDetect->isCrawler() method worked fine, but $CrawlerDetect->getUserAgent() doesn’t exist.

That suggests to me that something else is loading an older version of CrawlerDetect and the autoloader is skipping our version because that class is already loaded (but an older version without the getUserAgent() method available)

Do you have a staging/dev copy of the site where you can disable all other plugins other than Event Espresso?


KIROS

April 6, 2023 at 3:47 pm

Had this same problem and deactivating other plugins didn’t solve the issue. When I changed the name of the plugin folder (which I do to deactivate a plugin when the site is unreachable) and reactivated, the error resolved. But if I change the main EE plugin folder name back to normal and reactivate the error returns… very weird.


Tony

  • Support Staff

April 7, 2023 at 5:35 am

Yeah, that’s really odd!

So you have exactly the same error message as above:

PHP Fatal error: Uncaught Error: Call to undefined method Jaybizzle\CrawlerDetect\CrawlerDetect::getUserAgent()

When usnig /event-espresso-core-reg but now when using /event-espresso-core-reg-{something}?


KIROS

April 7, 2023 at 4:13 pm

Yeah, using /xeventespresso-core-reg it works. But doesn’t work when I change it back to normal and activate.

Fatal error: Uncaught Error: Call to undefined method Jaybizzle\CrawlerDetect\CrawlerDetect::getUserAgent() in /home/customer/www/kiros.org/public_html/wp-content/plugins/event-espresso-core-reg/core/services/request/middleware/BotDetector.php:34 Stack trace: #0 /home/customer/www/kiros.org/public_html/wp-content/plugins/event-espresso-core-reg/core/services/request/middleware/Middleware.php(59): EventEspresso\core\services\request\middleware\BotDetector->handleRequest(Object(EventEspresso\core\services\request\Request), Object(EventEspresso\core\services\request\Response)) #1 /home/customer/www/website.com/public_html/wp-content/plugins/event-espresso-core-reg/core/services/request/middleware/DetectFileEditorRequest.php(35): EventEspresso\core\services\request\middleware\Middleware->processRequestStack(Object(EventEspresso\core\services\request\Request), Object(EventEspresso\core\services\request\Response)) #2 /home/customer/www/website.com/public_html/wp-content/plugins/event-espresso-core-reg/core/services/request/middlewa in /home/customer/www/website.com/public_html/wp-content/plugins/event-espresso-core-reg/core/services/request/middleware/BotDetector.php on line 34


SfDBT

April 13, 2023 at 4:54 am

Hiya

I have the same problem, has there been any resolution on this?


Tony

  • Support Staff

April 13, 2023 at 7:12 am

So far, I’ve not been able to reproduce this.

Does anyone in this thread have a staging/dev site (not live) where they can reproduce this which I can I can have both admin and FTP access to to see what is happening?


SfDBT

April 13, 2023 at 8:01 am

No staging site but I just discovered what was causing the problem. A plugin called WP Popups Lite which was switched on but I havent used in ages. As soon as I deactivated it EE worked fine. Hope this helps


Tony

  • Support Staff

April 13, 2023 at 9:44 am

Ok, so I downloaded the above plugin and it is indeed loading an older version of CrawlerDetect so that is likely the problem.

On activating it I get the same fatal.

I’ve created a ticket for our developers to investigate and see what we can do.


KIROS

April 18, 2023 at 5:38 pm

Thanks all! We were also using WP Popups and the problem seems to be resolved now from recent updates.


Tony

  • Support Staff

April 19, 2023 at 6:45 am

Is that a recent update from WP Popups?

We haven’t changed anything related to the CrawlerDetect class yet.

Viewing 10 reply threads

The support post ‘Event Espress 4 Update Causing Fatal Error’ 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