Balto Posted August 8, 2022 Posted August 8, 2022 (edited) Hello, I have recently updated my version to IPS 4.7.1, and then asked my provider to update the PHP version to 8.0 (from 7.4). Just like it happened when I tried to update to PHP 8.0 before (but I thought it was I still had IPS 4.6 version), here is the problem I face: Also, I can not access my AdminCP. When I click on mywebsite/admin, sometimes I get a blank page, sometimes I get this error message: Any idea why this happens? The provider sent me the error message (related to my theme): PHP Fatal error: Cannot use "parent" when current class scope has no parent in /var/www/vhosts/totallympics.com/httpdocs/system/Theme/Theme.php(2703) : eval()'d code on line 39 Thanks! Edited August 8, 2022 by Balto
Daniel F Posted August 8, 2022 Posted August 8, 2022 That’s a problem with a 3rd party application or plugin with a theme hook. Try disabling one by one too see which causes this. Jim M 1
Balto Posted August 8, 2022 Author Posted August 8, 2022 If I just could enter my AdminCP, I would clear the cache and the problem would be fixed (since I am now running again PHP 7.4). It happened the same when I tried to do so with IPS 4.6.12. But right now I can't enter the AdminCP so I can not clear the cache! Just now, Daniel F said: That’s a problem with a 3rd party application or plugin with a theme hook. Try disabling one by one too see which causes this. I currently can not even open the AdminCP!
Balto Posted August 8, 2022 Author Posted August 8, 2022 So to make a summary: -This morning I had IPS 4.6.12.1 and PHP 7.4, everything was working fine. -I have enabled PHP 8.0, and the theme problem happened -I have enabled PHP 7.4 again, went in AdminCP, cleared the cache, and everything was working fine -One hour ago I have updated to IPS 4.7.1, everything was working fine -I have tried to enable PHP 8.0, and the theme problem happened -I have enabled PHP 7.4 again, but now I can not go to AdminCP so I can not clear the cache and solve the problem Any idea how can I enter the AdminCP now? Thanks!
Jim M Posted August 8, 2022 Posted August 8, 2022 2 minutes ago, Balto said: Any idea how can I enter the AdminCP now? Recovery mode: Alternatively, you will want to go back to PHP 7.4
Balto Posted August 8, 2022 Author Posted August 8, 2022 8 minutes ago, Jim M said: Alternatively, you will want to go back to PHP 7.4 The problem is now fixed with PHP 7.4 But I want to use PHP 8.0 going on. Here is the system log of the error I got: Quote Error: Undefined constant "IPS\Theme\large" in /var/www/vhosts/totallympics.com/httpdocs/system/Theme/Theme.php(885) : eval()'d code:18294 Stack trace: #0 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->userPhoto() #1 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/Theme.php(885) : eval()'d code(2619): IPS\Theme\_SandboxedTemplate->__call() #2 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_forums_front_topics->postContainer() #3 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/Theme.php(885) : eval()'d code(5941): IPS\Theme\_SandboxedTemplate->__call() #4 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_forums_front_topics->topic() #5 /var/www/vhosts/totallympics.com/httpdocs/applications/forums/modules/front/forums/topic.php(573): IPS\Theme\_SandboxedTemplate->__call() #6 /var/www/vhosts/totallympics.com/httpdocs/init.php(927) : eval()'d code(31): IPS\forums\modules\front\forums\_topic->manage() #7 /var/www/vhosts/totallympics.com/httpdocs/system/Dispatcher/Controller.php(118): IPS\forums\modules\front\forums\marktopic_hook_code_forums_modules_front_topic->manage() #8 /var/www/vhosts/totallympics.com/httpdocs/system/Content/Controller.php(50): IPS\Dispatcher\_Controller->execute() #9 /var/www/vhosts/totallympics.com/httpdocs/applications/forums/modules/front/forums/topic.php(39): IPS\Content\_Controller->execute() #10 /var/www/vhosts/totallympics.com/httpdocs/system/Dispatcher/Dispatcher.php(153): IPS\forums\modules\front\forums\_topic->execute() #11 /var/www/vhosts/totallympics.com/httpdocs/index.php(13): IPS\_Dispatcher->run() #12 {main} Backtrace: Quote #0 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/SandboxedTemplate.php(71): IPS\_Log::log() #1 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/Theme.php(885) : eval()'d code(2619): IPS\Theme\_SandboxedTemplate->__call() #2 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_forums_front_topics->postContainer() #3 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/Theme.php(885) : eval()'d code(5941): IPS\Theme\_SandboxedTemplate->__call() #4 /var/www/vhosts/totallympics.com/httpdocs/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_forums_front_topics->topic() #5 /var/www/vhosts/totallympics.com/httpdocs/applications/forums/modules/front/forums/topic.php(573): IPS\Theme\_SandboxedTemplate->__call() #6 /var/www/vhosts/totallympics.com/httpdocs/init.php(927) : eval()'d code(31): IPS\forums\modules\front\forums\_topic->manage() #7 /var/www/vhosts/totallympics.com/httpdocs/system/Dispatcher/Controller.php(118): IPS\forums\modules\front\forums\marktopic_hook_code_forums_modules_front_topic->manage() #8 /var/www/vhosts/totallympics.com/httpdocs/system/Content/Controller.php(50): IPS\Dispatcher\_Controller->execute() #9 /var/www/vhosts/totallympics.com/httpdocs/applications/forums/modules/front/forums/topic.php(39): IPS\Content\_Controller->execute() #10 /var/www/vhosts/totallympics.com/httpdocs/system/Dispatcher/Dispatcher.php(153): IPS\forums\modules\front\forums\_topic->execute() #11 /var/www/vhosts/totallympics.com/httpdocs/index.php(13): IPS\_Dispatcher->run() #12 {main} Any idea what could cause the problem? Thanks!
Jim M Posted August 8, 2022 Posted August 8, 2022 As Daniel mentioned, there is a custom theme or third party application/plugin which is causing this issue. You would need to find out which one it is and then disable it and contact the author.
Balto Posted August 8, 2022 Author Posted August 8, 2022 4 minutes ago, Jim M said: As Daniel mentioned, there is a custom theme or third party application/plugin which is causing this issue. You would need to find out which one it is and then disable it and contact the author. But isn't there any way to find out which custom theme or third party application/plugin is causing the issue? Disabling them one by one can be very time consuming, considering when I update the 8.0 I can not even access the adminCP. Thanks!
Jim M Posted August 8, 2022 Posted August 8, 2022 Just now, Balto said: But isn't there any way to find out which custom theme or third party application/plugin is causing the issue? Disabling them one by one can be very time consuming, considering when I update the 8.0 I can not even access the adminCP. Thanks! There is not here, as the stack trace is rather generalized. Unless you are aware of if there are any which hooks into this: marktopic_hook_code_forums_modules_front_topic
Balto Posted August 8, 2022 Author Posted August 8, 2022 15 minutes ago, Jim M said: marktopic_hook_code_forums_modules_front_topic I guess this "marktopic" is from this plugin: The user is not connecting here since April, so I guess there is no way for me to contact him. I tag the three users who wrote a review for this plugin. Did you face any problem in upgrading to PHP 8.0 with this plugin enabled? @Edjazoli ; @BankFodder ; @Grafidea Thanks!
Edjazoli Posted August 9, 2022 Posted August 9, 2022 Mine works ok with PHP 8.0 and 8.1 Have you tried to disable the plugin to make sure it’s this one? 11 hours ago, Balto said: considering when I update the 8.0 I can not even access the adminCP. Thanks! You can change back to 7.xxx and get the access back-simplest way
Edjazoli Posted August 9, 2022 Posted August 9, 2022 (edited) I have checked your error from opening topic and you have explanation there, Core/front/global/userphoto…. Go to files and compare with default theme Edited August 9, 2022 by Edjazoli
Balto Posted August 9, 2022 Author Posted August 9, 2022 1 hour ago, Edjazoli said: I have checked your error from opening topic and you have explanation there, Core/front/global/userphoto…. Go to files and compare with default theme Hello! Thank you for your reply! I have been there and I have seen the CSS is unmodified: Quote {{if $member->member_id and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members' ) )}} {{$memberURL = ( $warningRef ) ? $member->url()->setQueryString( 'wr', $warningRef ) : $member->url();}} <a href="{$memberURL}" rel="nofollow" {{if $hovercard}}data-ipsHover data-ipsHover-width="370" data-ipsHover-target="{$memberURL->setQueryString( 'do', 'hovercard' )}"{{endif}} class="ipsUserPhoto ipsUserPhoto_{$size}{{if $classes}} {$classes}{{endif}}" title="{lang="view_user_profile" sprintf="$member->name"}"> <img src='{$member->photo}' alt='{$member->name}' loading="lazy"> </a> {{else}} <span class='ipsUserPhoto ipsUserPhoto_{$size} {{if $classes}}{$classes}{{endif}}'> <img src='{$member->photo}' alt='{$member->name}' loading="lazy"> </span> {{endif}} 1 hour ago, Edjazoli said: You can change back to 7.xxx and get the access back-simplest way Yes, but I have to understand what cause the problem, otherwise it will surely happen again in the future when PHP 7.4 will not be supported anymore! Edjazoli 1
Balto Posted August 9, 2022 Author Posted August 9, 2022 13 hours ago, Jim M said: There is not here, as the stack trace is rather generalized. Unless you are aware of if there are any which hooks into this: marktopic_hook_code_forums_modules_front_topic Update: Actually yesterday the problem was fixed by itself 30-45 minutes after the downgrade to PHP 7.4. The problem was still happening after the downgrade, but then some minutes later it was fixed by itself. I didn't do anything and my hosting service also didn't do anything. Is that possible? And is it possible that would happen also if I keep PHP 8.0? Edjazoli 1
Marc Posted August 9, 2022 Posted August 9, 2022 It sounds like caching in that case. I would suggest trying the update to PHP 8 again if it was definitely working on PHP 7 Edjazoli 1
Edjazoli Posted August 9, 2022 Posted August 9, 2022 So, switch to 8.0 then clean cache of the system, if you using cloudflare, clean cache on they end as well
Balto Posted August 9, 2022 Author Posted August 9, 2022 I have updated PHP version to 8.0, cleared the cache, and now I can not access the website at all:
Balto Posted August 9, 2022 Author Posted August 9, 2022 I had to go back to PHP 7.4 The problem caused by PHP 8.0 is the following PHP Fatal error: Cannot use "parent" when current class scope has no parent in /var/www/vhosts/totallympics.com/httpdocs/system/Theme/Theme.php(2703) : eval()'d code on line 39 Any idea how can I solve this?
Balto Posted August 9, 2022 Author Posted August 9, 2022 Maybe I should change some of these settings when I change to PHP version 8.0?
Balto Posted August 9, 2022 Author Posted August 9, 2022 I have found out what was causing the problem: this plugin which is not updated for version 4.7: https://invisioncommunity.com/files/file/7853-online-indicator/ Daniel F 1
Marc Posted August 9, 2022 Posted August 9, 2022 16 minutes ago, Balto said: I have found out what was causing the problem: this plugin which is not updated for version 4.7: https://invisioncommunity.com/files/file/7853-online-indicator/ It may be its not updated for PHP 8
Balto Posted August 9, 2022 Author Posted August 9, 2022 43 minutes ago, Marc Stridgen said: It may be its not updated for PHP 8 Is it possible for me or someone else update it for PHP 8? Or only the plugin author can do it? The user is not connecting here for more than one year so it would be useless to contact him. Thanks!
Marc Posted August 9, 2022 Posted August 9, 2022 7 minutes ago, Balto said: Is it possible for me or someone else update it for PHP 8? Or only the plugin author can do it? The user is not connecting here for more than one year so it would be useless to contact him. Thanks! Well, that would depend on the ability of yourself as a developer really
Balto Posted August 9, 2022 Author Posted August 9, 2022 1 hour ago, Marc Stridgen said: Well, that would depend on the ability of yourself as a developer really I also have another problem with PHP 8.0. One of my pages does not work with PHP 8.0, while it works if I get back to PHP 7.4. That page is made up only by IPS blocks, nothing else. What can I do to solve this? Thanks!
Daniel F Posted August 9, 2022 Posted August 9, 2022 15 minutes ago, Balto said: I also have another problem with PHP 8.0. One of my pages does not work with PHP 8.0, while it works if I get back to PHP 7.4. That page is made up only by IPS blocks, nothing else. What can I do to solve this? Thanks! 1. Check your PHP error log. 2. Take a look at the blocks in the ACP to see if any contains any customized templates. If yes, review them and make sure that the used code works with PHP 8 / PHP 8.1
Recommended Posts