gantry5 icon indicating copy to clipboard operation
gantry5 copied to clipboard

Menu Manager throws deprecated error in PHP 8.1

Open uGE70 opened this issue 2 years ago • 5 comments

Platform (MAMP Pro 6.6.2, Mac OS 12.5.1): Joomla 4.1.5 or greater, Gantry 5.5.15-dev, Free and Premium Gantry templates, PHP 8.1.1 or greater, no cache, no SEO plugin.

Steps to reproduce Using Joomla 4.1.5, set Error Reporting to default/maximum in global configuration and PHP to 8.1.1 or greater Go to Gantry backend and click on the Menu tab.

Actual result I get the following error message without the menu being displayed: Invalid menu structure Menu on Frontend is working.

How to temporarily fix the issue Set error level to Simple or None.

Misc Tested on 5 different websites using different Gantry templates: Hydrogen, Helium, Studius, Fluent and Callisto. I guess some error notices are polluting the data streams, so I remark that a deprecated notice for the Pimple library is displayed everywhere when error level is set to maximum. Tested on a "fresh install" of Joomla 4.2.0 / Gantry Helium with the same result. I also tested on an online staging server (Linux) with the same result. Tested on Wordpress 6.0 with constant WP_DEBUG and WP_DEBUG_DISPLAY switched to true. I get the same error message.

Capture d’écran 2022-08-24 à 22 48 53 Capture d’écran 2022-08-23 à 10 14 39 Capture d’écran 2022-08-25 à 14 26 55 Capture d’écran 2022-08-25 à 20 07 21

uGE70 avatar Aug 25 '22 12:08 uGE70

It looks like the updates haven't changed anything, PHP 8.1.9 Joomla 4.2.2 On the local OpenServer.

13

14

kosh2323 avatar Sep 06 '22 12:09 kosh2323

Yeah, the issue is PHP 5 support. Many libraries, including Pimple, now require PHP 7.2.5 or later. I'll check if there's something I can do quickly to fix this.

In the meantime, just disable error reporting for deprecated errors and you should be fine.

mahagr avatar Sep 07 '22 05:09 mahagr

Can you guys try the lastest CI build?

mahagr avatar Sep 07 '22 06:09 mahagr

Thanks for your new build. The Pimple librairies errors have disappeared. I still get the Invalid menu structure error when PHP error reporting is set to E_ALL or Joomla error reporting is set to Maximum (I can live with that). On wordpress, the issue seems to be fixed.

uGE70 avatar Sep 07 '22 07:09 uGE70

Can you guys try the lastest CI build?

When installing joomla-pkg_gantry5_develop, no errors and warnings are displayed, but when installing the joomla-tpl_g5_helium_develop template, the same warnings and errors are displayed.

18

19

How are you going to fix it? Disable warnings or still update libraries?

Why is there a "fixed" icon on the topic, nothing has been fixed, as there were warnings and remained.

kosh2323 avatar Sep 08 '22 17:09 kosh2323