Robert Angle Posted October 28, 2022 Posted October 28, 2022 I upgraded to PHP 8.1 in preparation for the next IPS release. Now I occasionally see this error... Error: Call to undefined method DateTime::getDateInformation() (0) #0 /home/jwtalk/public_html/applications/calendar/sources/Event/Event.php(363): IPS\calendar\_Event::_findOccurances(Object(IPS\calendar\Date), Object(IPS\calendar\Date), Object(IPS\calendar\Date), Object(IPS\calendar\Date), Array) #1 /home/jwtalk/public_html/applications/calendar/sources/Event/Event.php(2127): IPS\calendar\_Event->findOccurrences(Object(IPS\calendar\Date), Object(IPS\calendar\Date)) #2 /home/jwtalk/public_html/applications/calendar/widgets/upcomingEvents.php(153): IPS\calendar\_Event::retrieveEvents(Object(IPS\calendar\Date), Object(IPS\calendar\Date), NULL, 5, false) #3 /home/jwtalk/public_html/system/Widget/Widget.php(833): IPS\calendar\widgets\_upcomingEvents->render() #4 /home/jwtalk/public_html/system/Widget/Widget.php(888): IPS\_Widget->_render() #5 /home/jwtalk/public_html/uploads/template_41_94a9d7649fb9cdbfc784d3516e61a717_global.php(18464): IPS\_Widget->__toString() #6 /home/jwtalk/public_html/system/Theme/SandboxedTemplate.php(61): IPS\Theme\Cache\class_core_front_global->widgetContainer('sidebar', 'vertical') #7 /home/jwtalk/public_html/uploads/template_41_94a9d7649fb9cdbfc784d3516e61a717_global.php(15713): IPS\Theme\_SandboxedTemplate->__call('widgetContainer', Array) #8 /home/jwtalk/public_html/system/Theme/SandboxedTemplate.php(61): IPS\Theme\Cache\class_core_front_global->sidebar('right') #9 /home/jwtalk/public_html/uploads/template_41_94a9d7649fb9cdbfc784d3516e61a717_global.php(6771): IPS\Theme\_SandboxedTemplate->__call('sidebar', Array) #10 /home/jwtalk/public_html/system/Theme/SandboxedTemplate.php(61): IPS\Theme\Cache\class_core_front_global->globalTemplate('JWTalk - Jehova...', '\n\n<div class='i...', Array) #11 /home/jwtalk/public_html/system/Dispatcher/Dispatcher.php(173): IPS\Theme\_SandboxedTemplate->__call('globalTemplate', Array) #12 /home/jwtalk/public_html/system/Dispatcher/Standard.php(113): IPS\_Dispatcher->finish() #13 /home/jwtalk/public_html/system/Dispatcher/Front.php(625): IPS\Dispatcher\_Standard->finish() #14 /home/jwtalk/public_html/system/Dispatcher/Dispatcher.php(155): IPS\Dispatcher\_Front->finish() #15 /home/jwtalk/public_html/index.php(13): IPS\_Dispatcher->run() #16 {main} What could be causing it?
Randy Calvert Posted October 28, 2022 Posted October 28, 2022 Are you on version 4.7.1? If so there is a bug in PHP causing this issue. A patch was released to fix it. See the following thread:
Robert Angle Posted October 28, 2022 Author Posted October 28, 2022 5 minutes ago, Randy Calvert said: Are you on version 4.7.1 Actually, I am still on 4.7.0 I will upgrade to the latest version and see if that fixes it. Randy Calvert 1
Robert Angle Posted October 28, 2022 Author Posted October 28, 2022 Well this is lovely. I have completely crashed at the beginning of the upgrade process (500 Internal Server Error).
Randy Calvert Posted October 28, 2022 Posted October 28, 2022 OK. Let’s check first to make sure you have all of the required modules when running 8.1: Download and run that. If anything is in red, you know what you need to fix. Assuming it comes back clean, you can attempt to run the updater again. Just visit domain.com/admin/upgrade If it says there is nothing to update, the files never extracted properly. You can download them from your client area on this site, upload them, then run the updater that I noted above again. Let’s see if that gets you rolling in the right direction. If it does not work, we can use recovery mode to disable all your 3rd party resources as one of those may be interfering with things.
Robert Angle Posted October 28, 2022 Author Posted October 28, 2022 Okay. Everything checked out, and I manually ran the updater. The upgrade is complete. But now the AdminCP is "unavailable" and the forum side throws a 500 error
Randy Calvert Posted October 29, 2022 Posted October 29, 2022 OK. It’s most likely a third party resource causing problems. Let’s get them all disabled. In a nutshell, you’re going to add an extra value to your constants.php file or create a new one if it does not yet exist. Once you upload it, use a new browser (or pop your cache) to login to the ACP. You’ll get a message about resources being disabled. Once done, remove the change to the constants.php file (or delete it if it was new). That should hopefully get you back in. Once done, enable third party resources one by one till you find the culprit.
Robert Angle Posted October 29, 2022 Author Posted October 29, 2022 Okay. This is working and I am making some progress. I should be able to troubleshoot now that I am in. Thank you very much @Randy Calvert
Randy Calvert Posted October 29, 2022 Posted October 29, 2022 You’re most welcome. Just remember to pop your cache if you run into problems running recovery mode multiple times. (It sometimes detects you still logged in. The recovery mode triggers on login. So totally closing browser or popping cache fixes it.) Robert Angle 1
Solution Robert Angle Posted October 29, 2022 Author Solution Posted October 29, 2022 Turns out the problem was an old 3rd party plugin "Go to top" or "To the top" or something like that, which would put a little up arrow in the bottom corner of the screen which would send you back up to the top of the page when you clicked on it. It's gone, and now I just get to wait and see how long it takes for someone to complain about it missing, lol. Randy Calvert 1
Randy Calvert Posted October 29, 2022 Posted October 29, 2022 22 minutes ago, Robert Angle said: Turns out the problem was an old 3rd party plugin "Go to top" or "To the top" or something like that, which would put a little up arrow in the bottom corner of the screen which would send you back up to the top of the page when you clicked on it. It's gone, and now I just get to wait and see how long it takes for someone to complain about it missing, lol. I'm glad you were able to find the culprit! Just in case your members complain, there looks to be a couple of different resources in the marketplace that can add this functionality, so you can check for a different one that is compatible with PHP8.
Marc Posted October 31, 2022 Posted October 31, 2022 On 10/29/2022 at 1:54 AM, Robert Angle said: ...........and see how long it takes for someone to complain about it missing, lol. I actually did this on my own site years ago, and removed small things bit at a time. Its surprising how many things people dont notice lol
Recommended Posts