Jump to content

Recommended Posts

Posted (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:

 

Could contain: Text, Word, Face, Alphabet

 

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:

 

Could contain: Text, Page, Word

 

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 by Balto
Posted

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!

Posted

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!

Posted
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

 

Posted
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!
 

Posted

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. 

Posted
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!

Posted
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

Posted
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!

 

Posted

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 

Posted (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 by Edjazoli
Posted
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!

Posted
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?

Posted

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?

Posted
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!

Posted
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

Posted
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!

Posted
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...