Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe bug in Gantry 5.5.16, with all particles using Joomla content? php 8.2, Joomla 4.3.4 #3184

Closed
selfpubservice opened this issue Sep 29, 2023 · 5 comments

Comments

@selfpubservice
Copy link

php: 8.2.x (tried 8.2.2, 8.2.9, 8.2.10)
Joomla: 4.3.4
Gantry: 5.5.16
Tried the fix for gantry-chrome from "PHP 8.1 with Gantry 5.5.15 or 5.5.16" https://www.inspiretheme.com/forums/php-8-1-with-gantry-5-5-15-or-5-5-16, doesn't help.

This happend to all particle, tat use joomla content.

The particle content-pro-joomla throws an exception "An exception has been thrown during the rendering of a template ("json_decode(): Passing null to parameter #1 ($json) of type string is deprecated")."

gantry-error1

gantry-error2

From the layout editor and without system debugger, I see this error, when I try to config the particle.

gantry-error3

Anny ideas to solve this?

Best regards, Peter

@N8Solutions
Copy link

@selfpubservice

I am unable to reproduce the error messages you are showing here.
I have a fresh install of Joomla v4.3.4
Gantry 5 v5.5.16
Helium Theme v5.5.16
PHP v8.1 & v8.2

What theme are you using? I can see in one of the pictures that the template name is sps_anhaus but I am unable to find anything similar online. Is this a custom template of yours?

Also, I can tell that you are running this on a local machine instead of a server online. Try uploading this site and hosting it on a server online and see what the results are. I have found that sometimes local machine installs aren't configured properly and throw errors, and in these cases, once hosted online, it works fine.

With all this in mind, you should contact Ivo at Inspire Theme because the particle you are referring to is one of his, so this is not a Gantry 5 (Rocket Theme) issue. Since this is a space for Gantry 5 issues, please close this ticket and open one with Inspire Theme.

P.S. - if you're not using an Inspire Theme template, you need to make sure that you have installed his version of UI Kit.
Please see the instructions here:
https://www.inspiretheme.com/documentation/gantry5-particles/content-pro-joomla

The UI Kit is free to download from his website under the Particles menu item.

I hope this information helps you.

kind regards,

Michael

@selfpubservice
Copy link
Author

Yes, this is a theme I developed myself for a customer of mine. I have developed almost 100 themes for clients based on Gantry5 and Joomla/Wordpress (most with Joomla 3).

And it's not an InspireTheme problem, as it affects all Particles that access Joomla content, including those from Rockettheme, JoomLead, RCA and the ones I wrote myself.

My online test server, where customers can inspect the websites before they are handed over to the customer, is running php 8.2.10 (Apache/Nginx). The error occurs there too. I also tried php 8.1, the same error occurs there.

Joomla 4.3.4/php 8.0 apparently no longer works because when I log in I get the error message "0 Cannot unpack array with string keys" and a server error 500, both on my local and on my test server online.

Themes that do not access Joomla content in the particles run smoothly with the combination Joomla 4.3.4/php8.2/Gantry5.5.16.

Maybe it's the way these particles access the content. I took the examples from the Gantry documentation (https://docs.gantry.org/gantry5/advanced/content-in-particles) and output it in the Custom/HTML particle with "Process Twig" on:

{% set options = {published: true, id: [17]} %}
{% set category = joomla.finder('category', options) %}
{% set results = category.find() %}
{{ category.count() }}

{% set options = {published: true, featured: false} %}
{% set articles = joomla.finder('content', options) %}
{% do articles.category([17]) %}
{{ articles.count() }}

The error does not occur here, and that is very interesting.

BG, Peter

@N8Solutions
Copy link

@selfpubservice I don't have access to Joomlead or RCA particles, but if you provide the name of a Rocket Theme particle that is also causing trouble for you I can install it on my test site to see if that changes the result on my end. However, since this is a theme that you developed yourself, it could mean that there are some files that you need to update so that your theme is PHP v8.1 & v8.2 compatible. I say this because the Joomla Content Pro from Inspire Theme is not causing this issue for me when using the stack I mentioned above.

What are you basing your templates off of, Hydrogen, Helium, or another theme?

@hexplor
Copy link
Collaborator

hexplor commented Oct 13, 2023

Yes, this is a theme I developed myself for a customer of mine. I have developed almost 100 themes for clients based on Gantry5 and Joomla/Wordpress (most with Joomla 3).

And it's not an InspireTheme problem, as it affects all Particles that access Joomla content, including those from Rockettheme, JoomLead, RCA and the ones I wrote myself.

My online test server, where customers can inspect the websites before they are handed over to the customer, is running php 8.2.10 (Apache/Nginx). The error occurs there too. I also tried php 8.1, the same error occurs there.

Joomla 4.3.4/php 8.0 apparently no longer works because when I log in I get the error message "0 Cannot unpack array with string keys" and a server error 500, both on my local and on my test server online.

Themes that do not access Joomla content in the particles run smoothly with the combination Joomla 4.3.4/php8.2/Gantry5.5.16.

Maybe it's the way these particles access the content. I took the examples from the Gantry documentation (https://docs.gantry.org/gantry5/advanced/content-in-particles) and output it in the Custom/HTML particle with "Process Twig" on:

{% set options = {published: true, id: [17]} %}
{% set category = joomla.finder('category', options) %}
{% set results = category.find() %}
{{ category.count() }}

{% set options = {published: true, featured: false} %}
{% set articles = joomla.finder('content', options) %}
{% do articles.category([17]) %}
{{ articles.count() }}

The error does not occur here, and that is very interesting.

BG, Peter

That may be true. There is a breaking change in 5.5.16 that may affect content providers on some templates. Can you do me a favor and test latest nightly? https://gantry.org/downloads#ci-builds This should be fixed in that build.
Thank you so much!

@selfpubservice
Copy link
Author

So, the site is delivered to the client and I had some time to investigate this behavior.
I generally have the following extensions installed: Akeeba Backup, Regular Labs (various components), GDPR from J!Extensions Store, and Visforms from vi-solutions.de. RegularLabs in particular has had some recent updates and requires a php 8.1 as a minimum.
I have tested with

  • Website upgraded from J3.10.12 to J4.3.4 (also with the described errors)
  • Website new, with the sps_anhaus template
  • J4 German reinstalled, without components except Gantry 5.5.16, 1x with Helium template, 1x with Anhaus template (self-written)
  • J4 German reinstalled, with the above mentioned components, Gantry 5.5.16, 1x with Helium Template, 1x with Anhaus Template
  • All systems also with the Gantry nightly build.
  • Each with php8.1 and 8.2

**I can no longer reproduce the error on any of these systems. **

So it seems to have been a side effect, probably due to incompatibility with php 8.1/php 8.2 in one of the additional components, which has since been fixed by updates.

I think we can close this issue.

@hexplor hexplor closed this as completed Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants