Posted: February 28, 2023 at 6:52 am
Please advise: 10am this morning Event espresso is hitting this error [28-Feb-2023 12:38:58 UTC] PHP Fatal error: Uncaught EventEspresso\core\exceptions\InvalidDataTypeException: The supplied data for "$name" was an integer, but a string was expected. in /home/haysmaci/public_html/wp-content/plugins/event-espresso-core-reg/core/domain/entities/notifications/PersistentAdminNotice.php:128 |
|
We urgently need a fix for this as no one can access the cms. |
|
Information provided by our client when this occurred: I just spoke to the team. One of my co-workers was working on Event Espresso last night and had left the tab open. This morning, she went back to the tab (it looked like WP hadn’t logged her out) and tried to add more information to the event and then press Save, and then apparently everything went down and the ‘critical error’ message appeared. |
|
Hi there, Sounds like something has been saved within the database option EE uses for the notices that isn’t expected. Can I take a closer look at this? Note to do so I’ll need temp WP Admin credentials and FTP/File manager access, if that’s ok you can send those login credentials using this form: |
|
Hi Tony, I have just sent you all the login / FTP access required, if you could take a look at this ASAP it would be so much appreciated. Many thanks, |
|
Hi there, This should now be fixed. Somehow a bunch of options had been saved within the option EE uses for notices hat it did not know how to handle. I’ve emptied the option to remove those and the admin should now work again. |
|
Thanks so much for this Tony, that’s all working great again. Do you think this could happen again? And if so is it worth sharing instructions on how we can fix ourselves? Or was this a really weird one off? Many thanks again, Tonya |
|
Because I don’t know how it happened, I can’t say either way, unfortunately. I’m going to create a ticket to see if the code throwing the error can handle that a little better but that could still take a while and it happen in the meantime… so….
Sure, in Is a That method confirms we have a string before trying to set the name of the notice:
Right before that I did this:
And refreshed the page to get an output of the option so I could see what had been set. Then I changed that code to be just:
And refreshed the page again. That change basically sets the option to be an empty array again, removing whatever is saved within it. For the most part, that’s a safe thing to do in the specific case as the error is being thrown by something trying to display a notice, wiping it out removes that notice but those aren’t critical 99.9% of the time anyway and a critical error is more urgent than whatever is in the notice. However, I I will say that I’m checking the option beforehand to confirm that and without knowing what your looking for in the option to confirm, you may remove something you need… so this is at your own risk 🙂
Really difficult to say currently (I wish I could give you a better answer). IF it does happen again on your site, I would be inclined to add a function to the site which writes a log entry of what is being saved and what is saving it until we find the cause. That log is going to get big quickly so it’s only worth doing if the above issue is reproducible. |
|
The support post ‘PHP Fatal error: Uncaught’ 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.