Jump to content

PHP8 getTemplate Problem with Plugins


Go to solution Solved by kurosaki ichigo,

Recommended Posts

Posted

hello everyone after several days of various tests. i decided to post here.
since i switched a few days ago to ips 4.7.5 , my forum has big problems.
the problems are located in the Plugins part , i.e. the plugins that have to create templates \IPS\Theme::i()->getTemplate(...) always give error :


Fatal error: Unparenthesized `a ? b : c ? d : ` is not supported. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /home/sitename/public_html/forum/system/Theme/Theme.php(885) : eval()'d code on line 3358

here the line 885 :

	if ( @eval( $compiledGroup ) === FALSE )
						{
							throw new \IPS\Theme\TemplateException( 'Invalid Template', 1000, NULL, array( 'group' => $group, 'app' => $app, 'location' => $location ), $this );
						}
					}

 

 

Posted
9 hours ago, teraßyte said:

You mentioned plugins. If you disable all plugins does the error go away? If yes, you need to contact the developer of the plugin causing the issue.

thanks for the reply, as I said the problem happens only with plugins that call the getTemplate.
at first i thought that the problem was only the plugin so i contacted the dev and explained him the situation , i gave him access to my site and he answered me like this :

 

Could contain: Page, Text
that is why I am here to ask you.

ps : i have only the default theme , i have no custom themes , i have disabled all plugins and applications , still same problem .

Posted
3 hours ago, kurosaki ichigo said:

thanks for the reply, as I said the problem happens only with plugins that call the getTemplate.
at first i thought that the problem was only the plugin so i contacted the dev and explained him the situation , i gave him access to my site and he answered me like this :

 

Could contain: Page, Text
that is why I am here to ask you.

ps : i have only the default theme , i have no custom themes , i have disabled all plugins and applications , still same problem .

Who was the developer? 

Posted (edited)
10 minutes ago, Daniel F said:

You could try to use the DEBUG_TEMPLATES constant to see which template results in this error.

with DEBUG_TEMPLATES i have this error now :

Fatal error: Unparenthesized `a ? b : c ? d : e` is not supported. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /tmp/template_1_77e511f3f597b974567a95c3a1860bbf_plugins7B8PPB on line 3518

and in that line :

Quote

$iPosted = isset( $topic->contentPostedIn ) ? $topic->contentPostedIn : ( $topic AND method_exists( $topic, 'container' ) AND $topic->container() !== NULL ) ? $topic->container()->contentPostedIn() : array();
$return .= <<<CONTENT

 

Edited by kurosaki ichigo
Posted
56 minutes ago, kurosaki ichigo said:

$iPosted = isset( $topic->contentPostedIn ) ? $topic->contentPostedIn : ( $topic AND method_exists( $topic, 'container' ) AND $topic->container() !== NULL ) ? $topic->container()->contentPostedIn() : array();
$return .= <<<CONTENT

That's either a plugin template or a 3rd party style, which the author of the plugin / designer will need to fix.

Posted
49 minutes ago, Daniel F said:

That's either a plugin template or a 3rd party style, which the author of the plugin / designer will need to fix.

I said more than once that it has nothing to do with the plugin this what I did is an example what I showed above . but it does it with any plugin. i can't contact all the authors and tell them to review their plugins.

12 minutes ago, Randy Calvert said:

I would start by recreating a new default theme and using it. My guess is your “default” is not updated. 

i regenerated the theme in support and i recreated it too from 0m i use the default theme.

I know you like to waste time giving ideas and blame to others . but I am not here to say that the problem is IPS.

I am just saying that I have a particular case that after an update this I encountered.

let me be clearer :

locally i installed the same IPS version 4.7.5 i installed the same plugins . and they work fine. with php8.
so we can exclude authors and plugins.

the problem is definitely internal mine that caused itself after the update, maybe a correction table , some misplaced files etc etc.

i am here to ask what could i do to fix it? what can i do to debug ....
please don't give me answers just to say....

Posted
58 minutes ago, kurosaki ichigo said:

locally i installed the same IPS version 4.7.5 i installed the same plugins . and they work fine. with php8.
so we can exclude authors and plugins.

Ahh... if it works locally could it be your web host.  Have you tried installing a test IPS version on your web host, normally you would create this on a sub domain and your license allows one of these, this may point you in a direction.

Posted
5 minutes ago, Richard Arch said:

Ahh... if it works locally could it be your web host.  Have you tried installing a test IPS version on your web host, normally you would create this on a sub domain and your license allows one of these, this may point you in a direction.

I tried it right now in the same host , same php8 configuration , everything works fine , it is really an unexplainable problem, only with my main forum after upgrade this happens, with a fresh installation everything works fine.
the server is mine. i am my host.

is there a tool to do rebuild sql ? with the tools in support i did clear cache , rebuild custom theme, but nothing nothing seems to work 😞
it's frustrating

Posted

Ok, some progress. You now have confirmed that its your live install that has the issue.

Next, I would copy your live (files and database) over the test install.  Get that working, confirm the same errors and you will have a test website that you can modify without destroying your live site.

Try overwriting all the IPS files with a fresh copy on this test site, that would eliminate another area.

Posted

We would need to look further into this for you, however the access details on file appear to be incorrect or missing. Could you please update these details by visiting your client area, selecting the relevant purchase, then clicking "Review/Update Access Information" under the "Stored Access Information" section. 

We look forward to further assisting you. 

 

Please bear in mind, we are trying to assist based on the information given. There is no advantage to us in any way to "waste time and give you ideas" while providing support. 

Posted
52 minutes ago, Richard Arch said:

Ok, some progress. You now have confirmed that its your live install that has the issue.

Next, I would copy your live (files and database) over the test install.  Get that working, confirm the same errors and you will have a test website that you can modify without destroying your live site.

Try overwriting all the IPS files with a fresh copy on this test site, that would eliminate another area.

ok I did as you suggest, I made a copy of the main forum, file / db .
i downloaded a new version from IPS
i have overwrte all the files
i did an update
and voila the error is still the same.

11 minutes ago, Marc Stridgen said:

We would need to look further into this for you, however the access details on file appear to be incorrect or missing. Could you please update these details by visiting your client area, selecting the relevant purchase, then clicking "Review/Update Access Information" under the "Stored Access Information" section. 

We look forward to further assisting you. 

 

Please bear in mind, we are trying to assist based on the information given. There is no advantage to us in any way to "waste time and give you ideas" while providing support. 

i just updtated the information

Posted
25 minutes ago, kurosaki ichigo said:

ok I did as you suggest, I made a copy of the main forum, file / db .
i downloaded a new version from IPS
i have overwrte all the files
i did an update
and voila the error is still the same.

i just updtated the information

Please be advised that there is an issue with your community which is preventing us from providing you support. Please be advised I have brought this into a ticket to discuss privately.

Posted

You appear to be missing the following table in your database. This will need to be restored as it is missing key information.

 

  • Table 'downloadzone_cibk.core_sys_conf_settings' doesn't exist 
Posted

Please ensure that your conf_global.php utilizes the prefix. You may wish to remove any other non-prefixed tables from that database if you are not using them.

  • Recently Browsing   0 members

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