Posted: August 17, 2023 at 9:02 am
Update 5.0.8p crashed my whole site causing several hours of downtime and now 5.0.9p causes a fatal error. Really? The error I’m getting now is: An error of type E_COMPILE_ERROR was caused in line 25 of the file /home/charmouthorg/YW7XT21G/htdocs/chcc/wp-content/plugins/event-espresso-core-reg/core/db_models/relations/EE_Belongs_To_Any_Relation.php. Error message: Declaration of EE_Belongs_To_Any_Relation::get_join_statement(string $model_relation_chain): string must be compatible with EE_Belongs_To_Relation::get_join_statement($model_relation_chain) Please tell me how I can fix this. |
|
Hi there, That error is telling you that something is overriding a method within core but isn’t compatible and needs to be updated. Do you have the full stack trace? The above doesn’t have enough data to narrow down what the cause is. |
|
Thanks Tony, Where would I find the full stack trace? |
|
Normally it would be shown with the above error but you may need to enable WP_DEBUG: https://eventespresso.com/wiki/troubleshooting-checklist/#wpdebug |
|
Thanks Tony, Needless to say, the full stack trace wasn’t included otherwise I would have shared it. I’ll enable debug tomorrow and get back to you. Just for the record, I’ve never experienced so many errors and complications with any other WP plugin as I have with Event Espresso, and I’ve been using WordPress for over fifteen years. |
|
Just to note, I’ve just checked the latest zip file to confirm the function signature (which is what is throwing the fatal above) and I can’t see anywhere within the latest update that declares This is searching the entire EE core plugin codebase: https://monosnap.com/file/BWA7Wh3ZxloBHsSNiebjaKt6DP2A6U The file is declared 7 times across its classes, and the signature for all of those match:
The error you are getting states that How did you update Event Espresso on the site? Using FTP or via the plugins menu? Looks like either the update hasn’t replaced all the files or something else on that site is also overriding a |
|
Thanks Tony, I usually update in batches via the updates page but this time I did it from the plugins page. The ‘fatal error’ email that I got from WordPress only had the error message I’ve quoted, no stack trace. |
|
To be clear, we are not getting any error messages on the site at all and everything appears to be working fine and we are still getting bookings via EE. |
|
Oh so you got a single email showing the fatal? Are you running any caching? PHP8 using opcache? If you are not getting any fatals on the site now this was likely from a cached object. That compile error would normally be thrown instantly if the code in question was still running, so if it EE is working (those relationships run all over the place) then that would be my best guess as to what happened above currently. |
|
We are not running any caching and we are using PHP 7.4.33. |
|
Then I’m at a loss as to where that fatal is from without the stack trace. Do you have access to the PHP error logs within your host’s control panel? It may show the full stack trace in that but depends on what your host has set to log. |
|
Thanks Tony, I looked in the error log above the root but there was nothing useful in it so I have raised a support ticket with the hosts in the hope that they can access the PHP error log and that it has recorded a full stack trace. I’ll get back to you as soon as I hear back from them. |
|
My hosts don’t hold a master log of PHP errors, so as this ‘fatal’ error only occurred during an update they advise that I manually update/overwrite with the latest plugin files via FTP. However, as I understand it from one of your previous answers, the fatal error was in the database update, not in the files. Given that I have no visible errors and that the plugin appears to be functioning fine, is there anything to be gained by overwriting the files manually? Thanks in advance. |
|
This would be literally the last thing I would advise. Overwriting plugins via FTP it messy, too many people try to copy/replace (which actually sounds like what is being recommended with ‘overwrite’ here) and it causes more errors. Just to clarify for anyone reading, when updating via FTP you need to delete the original plugin directory and then extract the new one in its place, that’s what WP core does. So to give an example you would actually delete Then extract the
No it’s a compile error, so most likely was from a file at some point but where I have no idea. There isn’t an EE database update between 5.0.8 and 5.0.9 (we call them migrations), those will only happen with major or minor version bumps, 4.X.X -> 5.X.X or 5.0.X -> 5.1.X, never a ‘patch’ like 5.0.8 -> 5.0.9.
Not in my opinion, no. I’d like to tell you what caused it, but there just isn’t enough info to do so unfortunately, we’ve not had any other reported of that error and as its a compile error it would be widespread if it was from the update itself. |
|
The support post ‘EE causes a fatal error updating from to 5.0.7 to 5.0.9.p’ 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.