Posted: November 27, 2022 at 4:36 am
Hi there, we use Event Espresso under the following environment: WordPress-Version 6.1.1 And our Website goes into full Panic Mode with the following exception: It seems as if Event Espresso does NOT work with PHP 8.1 this poses quite a problem with out Website since we need Event Espresso in Order to make money. When will we be able to use Event Espresso again? What is the Plan in regard to PHP 8.1 ? What can we do here any suggestions? Kind Regards |
|
Hi there, Officially Event Espresso does not fully support PHP8.1, its does support PHP8.0. PHP8 brings a lite of breaking changes as PHP is not starting to (finally) require much more type controls (amongst other things). PHP8.1 expands on that event further. I recommend using PHP8 as it stands, you’ll fine more plugins compatible with PHP8.0 than 8.1. The error you are getting is from this:
This means the issue here is from the translations on your site. The sprintf() function uses ‘specifiers’ to know what should be passed into the string and in PHP7 it would accept the usage of % with a single argument and use whatever was passe, in PHP8 that changed and its no longer acceptable. The particular line of code in question is HERE and within our code it is:
That code is totally acceptable for PHP8.1 and I don’t get the above error on my sites. The translation file on your site is changing that to be:
Note the missing s after the % to tell sprintf that a string is being passed. PHP8 does not accept that and throws the fatal error. So, we need to find where on your site the translations are loading from. Using FTP or file manager, if you go to What files do you see there? |
|
Hello Tony, Thank you for your fast response as always!
This is what I found there: `event_espresso-de_DE.mo 0640 The numbers are the rights on the files. They are dated June 7th 2018 |
|
Rename Does that stop the the above error when you test PHP8? It looks like you have outdated custom translation files above and at least the Or, download the latest translations from here: https://translate.eventespresso.com/projects/event-espresso-4/de/event-espresso-de_de/ And update those custom translations. |
|
Thank you Tony, You are majesty ! Thank you. |
|
You’re most welcome 🙂 Just to note again, I currently recommend using PHP8.0.XX for more compatibility than PHP8.1 |
|
The support post ‘PHP 8.1 Compatibility with Event Espresso’ 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.