Foolboy Posted August 10, 2022 Posted August 10, 2022 Yesterday, I upgraded my IPS site from 4.7.0 to 4.7.1. Suddenly, I got numerous System error records into System log that indicates the issue within Calendar app. When I tried accessing Calendar, it shows the following error message: Error: Call to undefined method DateTime::getDateInformation() (0) My IPS site is running on PHP 8.1.9. There is no issue like this on IPS 4.7.0 with the same PHP version. Therefore, I'm pretty sure that this issue is not related to PHP. Also, I tried clearing system cache and disable / re-enable the Calendar app but still unable to resolve this issue. Any help or suggestion would be appreciated. Thank you in advance for your support. PoC2 and Anja Müller 1 1
Jim M Posted August 10, 2022 Posted August 10, 2022 Thanks for reporting this. I have moved this to a ticket so we can better investigate this for you. Please watch your email for further correspondence. Foolboy 1
PoC2 Posted August 11, 2022 Posted August 11, 2022 (edited) Identical issue, same behaviour. Also running PHP 8, IPS 4.7.1 with all patches (was not happening with 4.7.0). Started this morning. Note: I can see individual calendars and add entries but not view the main/summary calendar page (/calendar) – that throws up exactly the same errors as described by @Foolboy. ----------- Error: Call to undefined method DateTime::getDateInformation() (0) #0 /applications/calendar/sources/Event/Event.php(363): IPS\calendar\_Event::_findOccurances(Object(IPS\calendar\Date), NULL, Object(IPS\calendar\Date), Object(IPS\calendar\Date), Array) #1 /applications/calendar/sources/Event/Event.php(2127): IPS\calendar\_Event->findOccurrences(Object(IPS\calendar\Date), Object(IPS\calendar\Date)) #2 /applications/calendar/widgets/upcomingEvents.php(153): IPS\calendar\_Event::retrieveEvents(Object(IPS\calendar\Date), Object(IPS\calendar\Date), NULL, 3, false) #3 /system/Widget/Widget.php(833): IPS\calendar\widgets\_upcomingEvents->render() #4 /system/Widget/Widget.php(888): IPS\_Widget->_render() #5 /system/Theme/Theme.php(885) : eval()'d code(18162): IPS\_Widget->__toString() #6 /system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->widgetContainer('sidebar', 'vertical') #7 /system/Theme/Theme.php(885) : eval()'d code(15399): IPS\Theme\_SandboxedTemplate->__call('widgetContainer', Array) #8 /system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->sidebar('right') #9 /system/Theme/Theme.php(885) : eval()'d code(6746): IPS\Theme\_SandboxedTemplate->__call('sidebar', Array) #10 /system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->globalTemplate('ee2f54666441442...', '\n\n<div class='i...', Array) #11 /system/Dispatcher/Dispatcher.php(173): IPS\Theme\_SandboxedTemplate->__call('globalTemplate', Array) #12 /system/Dispatcher/Standard.php(113): IPS\_Dispatcher->finish() #13 /system/Dispatcher/Front.php(625): IPS\Dispatcher\_Standard->finish() #14 /system/Dispatcher/Dispatcher.php(155): IPS\Dispatcher\_Front->finish() #15 /index.php(13): IPS\_Dispatcher->run() #16 {main} ----------- Edited August 11, 2022 by PoC2
PoC2 Posted August 11, 2022 Posted August 11, 2022 (edited) Further investigation: This error only occurs on the /calendar page when it is drawing in multiple calendars to display. If just one calendar is active (viewable) then no error. Edited August 11, 2022 by PoC2 Foolboy and LiquidFractal 1 1
Foolboy Posted August 11, 2022 Author Posted August 11, 2022 Thank you. Based on the investigation from @PoC2 , I also found that only calendar with user-defined events will cause this issue. Blank calendars with only member's birthday will not throw this error. Even trying to add new event into the calendar will also cause this error. This is definitely a bug. PoC2 1
PoC2 Posted August 11, 2022 Posted August 11, 2022 In my case I can view and add to any single calendar (including ones with user defined events) but again, not the summary view (/claendar) for displaying multiple calendars at once on a page. Foolboy 1
Daniel F Posted August 12, 2022 Posted August 12, 2022 41 minutes ago, Giray said: Same I have created a ticket to investigate this further on your system. Giray 1
PoC2 Posted August 12, 2022 Posted August 12, 2022 Please do keep us informed when there's a fix available. 🙂 Thank you. Foolboy 1
Daniel F Posted August 12, 2022 Posted August 12, 2022 This seems to be an issue with the recent cPanel version, any chance you're also using it @PoC2?
Stuart Silvester Posted August 12, 2022 Posted August 12, 2022 We've been looking further into this today, it appears that a bug "fix" in PHP 8.0.22 & 8.1.9 has caused some issues - https://bugs.php.net/bug.php?id=80047 I suspect this unannounced breaking change may cause issues in other software packages. The bug report suggests this change was actually intended for PHP 8.2 but was committed to 8.0/8.1 anyway. We're working on a solution. I do not know at this time whether PHP might roll it back in the next release or not so we'll do something to work with either situation. SeNioR-, LiquidFractal, Foolboy and 1 other 1 3
PoC2 Posted August 12, 2022 Posted August 12, 2022 2 hours ago, Daniel F said: This seems to be an issue with the recent cPanel version, any chance you're also using it @PoC2? I probably am. 🙂 That would explain why 4.7.1 was fine one day and seemingly not the next! 9 minutes ago, Stuart Silvester said: The bug report suggests this change was actually intended for PHP 8.2 but was committed to 8.0/8.1 anyway. I'm on 8.0 rather than 8.2 so it looks like they've actually done that to the earlier version as well as you suggest. 10 minutes ago, Stuart Silvester said: We're working on a solution. I do not know at this time whether PHP might roll it back in the next release or not so we'll do something to work with either situation. Thank you. Invision support has always been superb and that means a lot. Meanwhile I can tick along with just showing one calendar. Not a dealbreaker for me once I figured that out. 😉 Cheers!
media Posted August 13, 2022 Posted August 13, 2022 (edited) I thought it is 3rd parties but actually my problem is same here Error: Call to undefined method DateTime::getDateInformation() (0) #0 /home/media/public_html/forum/applications/calendar/sources/Event/Event.php(363): IPS\calendar\_Event::_findOccurances(Object(IPS\calendar\Date), NULL, Object(IPS\calendar\Date), Object(IPS\calendar\Date), Array) #1 /home/media/public_html/forum/applications/calendar/sources/Event/Event.php(2127): IPS\calendar\_Event->findOccurrences(Object(IPS\calendar\Date), Object(IPS\calendar\Date)) #2 /home/media/public_html/forum/applications/calendar/widgets/upcomingEvents.php(153): IPS\calendar\_Event::retrieveEvents(Object(IPS\calendar\Date), NULL, NULL, 5, false) #3 /home/media/public_html/forum/system/Widget/Widget.php(833): IPS\calendar\widgets\_upcomingEvents->render() #4 /home/media/public_html/forum/system/Widget/Widget.php(888): IPS\_Widget->_render() #5 /home/media/public_html/forum/system/Theme/Theme.php(885) : eval()'d code(18416): IPS\_Widget->__toString() #6 /home/media/public_html/forum/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->widgetContainer('sidebar', 'vertical') #7 /home/media/public_html/forum/system/Theme/Theme.php(885) : eval()'d code(15680): IPS\Theme\_SandboxedTemplate->__call('widgetContainer', Array) #8 /home/media/public_html/forum/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->sidebar('right') #9 /home/media/public_html/forum/system/Theme/Theme.php(885) : eval()'d code(6787): IPS\Theme\_SandboxedTemplate->__call('sidebar', Array) #10 /home/media/public_html/forum/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->globalTemplate('e3ca3fcdf018d96...', '\n\n<div class='i...', Array) #11 /home/media/public_html/forum/system/Dispatcher/Dispatcher.php(173): IPS\Theme\_SandboxedTemplate->__call('globalTemplate', Array) #12 /home/media/public_html/forum/system/Dispatcher/Standard.php(113): IPS\_Dispatcher->finish() #13 /home/media/public_html/forum/system/Dispatcher/Front.php(625): IPS\Dispatcher\_Standard->finish() #14 /home/media/public_html/forum/system/Dispatcher/Dispatcher.php(155): IPS\Dispatcher\_Front->finish() #15 /home/media/public_html/forum/index.php(13): IPS\_Dispatcher->run() PHP Version 8.1.9 Also, I am getting this on my forum homepage site.... Edited August 13, 2022 by media SeNioR- 1
media Posted August 13, 2022 Posted August 13, 2022 Because it is effecting my home page my site is going down every time that triggers the error message
media Posted August 13, 2022 Posted August 13, 2022 Temporally I have disabled the Calander app, looks like all good
teraßyte Posted August 13, 2022 Posted August 13, 2022 Switching back to PHP 7.4 should work too as a temporary fix in case disabling the calendar app is not an option. media 1
Marc Posted August 15, 2022 Posted August 15, 2022 See Stuarts message above also for full explanation of whats happening here @media
Solution Stuart Silvester Posted August 15, 2022 Solution Posted August 15, 2022 We have released a patch for 4.7.1 to workaround this issue. To install, go to AdminCP > System > Support and click "optional patch available" in the top left block. If you do not see this, you may already have the patch since it is included with and upgrades or downloads of the software after the date of this post. SeNioR-, Marc, Foolboy and 1 other 3 1
Foolboy Posted August 15, 2022 Author Posted August 15, 2022 6 hours ago, Stuart Silvester said: We have released a patch for 4.7.1 to workaround this issue. To install, go to AdminCP > System > Support and click "optional patch available" in the top left block. If you do not see this, you may already have the patch since it is included with and upgrades or downloads of the software after the date of this post. Yep. This patch does the trick. Thank you very much for your support. 👍
Mark H Posted August 15, 2022 Posted August 15, 2022 You're welcome, glad the issue is resolved. 🙂 Giray 1
Recommended Posts