Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Clint Davis Posted July 27, 2022 Posted July 27, 2022 I have a fully patched v4.7.0 running. I switched my server from PHP 7.4 to 8.0. When I did that, there was a 500 error in the browser. When I looked at the server logs, I saw the following repeated several times: [27-Jul-2022 15:07:10 UTC] PHP 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 /home/realtree/forums.realtree.com/public_html/system/Theme/Theme.php(885) : eval()'d code on line 525 I have another fully patched v4.7.0 running on the same server. That site had no issues when I switched to PHP 8.0. Is this some type of theme problem? I compared the Theme.php file in both sites, and they're identical.
Randy Calvert Posted July 27, 2022 Posted July 27, 2022 Are you running a custom theme? If so… try switching back to a default theme and see if the problem persists. It may be an issue with your theme itself.
Jim M Posted July 27, 2022 Posted July 27, 2022 As Randy mentioned, check your themes and third party applications/plugins by switching to an unmodified theme and disabling third party applications/plugins.
Clint Davis Posted October 19, 2022 Author Posted October 19, 2022 So, I upgraded to 4.7.3 this morning and tried the switch to PHP 8.0 again. This time I'm getting a different error. Can you confirm this is related to a theme? Maybe a global template? [19-Oct-2022 13:39:35 UTC] PHP 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 /home/realtree/forums.realtree.com/public_html/uploads/template_1_ad9ae6e9ced8695954ac11f917afdfac_global.php on line 526 The PHP8 Compatibility Scanner on the support page isn't showing any issues. Any suggestions for my developer to troubleshoot this?
Stuart Silvester Posted October 19, 2022 Posted October 19, 2022 2 minutes ago, Clint Davis said: So, I upgraded to 4.7.3 this morning and tried the switch to PHP 8.0 again. This time I'm getting a different error. Can you confirm this is related to a theme? Maybe a global template? [19-Oct-2022 13:39:35 UTC] PHP 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 /home/realtree/forums.realtree.com/public_html/uploads/template_1_ad9ae6e9ced8695954ac11f917afdfac_global.php on line 526 The PHP8 Compatibility Scanner on the support page isn't showing any issues. Any suggestions for my developer to troubleshoot this? Yes, this shows that your theme is out of date and needs to be updated to include template changes that were introduced in newer versions. Have a look at this guide, the second part "Comparing within the AdminCP" will be the most useful since you may not know which version your theme was originally created in. Clint Davis 1
Clint Davis Posted October 20, 2022 Author Posted October 20, 2022 Today, I reverted all my custom templates in my theme, and I'm still getting the same error. Is there any way to force it to rebuild the template_1_ad9ae6e9ced8695954ac11f917afdfac_global.php file based on the current templates?
Marc Posted October 20, 2022 Posted October 20, 2022 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.
Clint Davis Posted October 20, 2022 Author Posted October 20, 2022 I've updated the Access Information
Jim M Posted October 20, 2022 Posted October 20, 2022 Could you please clarify where you're encountering this error? When viewing your community, everything seems OK. It is also noting that your Benelli theme is still customized.
Clint Davis Posted October 20, 2022 Author Posted October 20, 2022 I think we've resolved the issue. We created a new theme and applied our customizations to the templates once more. Seems to be working. Randy Calvert 1
Cach Doan Posted October 30, 2022 Posted October 30, 2022 On 10/20/2022 at 10:36 AM, Clint Davis said: I think we've resolved the issue. We created a new theme and applied our customizations to the templates once more. Seems to be working. Can you clarify how do you fix this issue?
Marc Posted October 31, 2022 Posted October 31, 2022 11 hours ago, Cach Doan said: Can you clarify how do you fix this issue? Im not sure I understand what question you are asking there, as what you quoted is what they did there. They created a new theme in the admin CP, then reapplied any customisations they had. To clarify, this will have resolved the issue, as there will have been changes in the theme that were breaking changes in PHP8
Fast Lane! Posted October 31, 2022 Posted October 31, 2022 On 10/20/2022 at 10:36 AM, Clint Davis said: I think we've resolved the issue. We created a new theme and applied our customizations to the templates once more. Seems to be working. Same type of issues on my side. I suspect the new version of IPB that hides some css files is not showing a few we edited. I may go the same route as you to start clean.
Marc Posted October 31, 2022 Posted October 31, 2022 20 minutes ago, Fast Lane! said: Same type of issues on my side. I suspect the new version of IPB that hides some css files is not showing a few we edited. I may go the same route as you to start clean. As mentioned on the other ticket you have. We would need to know which theme, and we can take a look for you
Cach Doan Posted January 22, 2023 Posted January 22, 2023 I have resolved my issued by disabling one of the plugins I had. Now I need to find a replacement. It was called "Hide Content Until User Replies"
Marc Posted January 23, 2023 Posted January 23, 2023 Glad to hear you found what was causing your problem there, and hope you find what you need in terms of replacement
Recommended Posts