soflyy / oxygen-bugs-and-features

Bug Reports & Feature Requests for Oxygen
https://oxygenbuilder.com/
315 stars 29 forks source link

PHP 8.1 errors #3097

Open mickaelperrin opened 2 years ago

mickaelperrin commented 2 years ago

Hi,

We switched to PHP 8.1 and since our logs are filled with tons of errors related to "Undefined" things.

Regarding your plugin, we have the following errors in our logs:

Undefined array key "icon-padding" in /plugins/oxygen/component-framework/component-init.php on line 3010
Undefined array key "icon-background-color" in /plugins/oxygen/component-framework/component-init.php on line 3009
Undefined array key "icon-color" in /plugins/oxygen/component-framework/component-init.php on line 3008
Undefined array key "icon-size" in /plugins/oxygen/component-framework/component-init.php on line 3011
Attempt to read property "meta_value" on null in /plugins/oxygen/component-framework/includes/revisions.php on line 48
Undefined array key 21 in /plugins/oxygen/component-framework/includes/revisions.php on line 48
Undefined array key "is_shortcode" in /plugins/oxygen/component-framework/includes/templates.php on line 1501
Undefined array key "preview_post_id" in /plugins/oxygen/component-framework/includes/ajax.php on line 1580
Undefined variable $old_query in /plugins/oxygen/component-framework/components/classes/image.class.php on line 207
Trying to access array offset on value of type null in /plugins/oxygen/component-framework/components/classes/gallery.class.php on line 316
Undefined array key "" in /plugins/oxygen/component-framework/components/classes/gallery.class.php on line 316
Undefined array key 24 in /plugins/oxygen/component-framework/includes/revisions.php on line 48
Attempt to read property "ID" on null in /plugins/oxygen/component-framework/components/classes/reusable.class.php on line 61
Attempt to read property "ID" on null in /plugins/oxygen/component-framework/components/classes/reusable.class.php on line 76

Would you mind having a look at them ?

Thanks

Ulprus commented 1 year ago

Why are you using PHP 8.1? Oxygen only updated to work with PHP 8.0 a few months ago, it doesn't make any sense to go to 8.1.

viabit-dev commented 1 year ago

I don't know exactly why, but on my own server (maybe I don't manage it as well as possible) if I configure PHP 8.1 some kind of memory leak happens with Oxygen causing it to saturate and close services.

With PHP 8.0 everything is fine with Oxygen.

magicmax1967 commented 1 year ago

Hello, same error here with php 8.0: [28-Nov-2022 22:42:13 UTC] PHP Warning: Trying to access array offset on value of type null in /wp-content/plugins/oxygen/component-framework/components/classes/gallery.class.php on line 316 [28-Nov-2022 22:42:14 UTC] PHP Warning: Undefined array key "icon-color" in /wp-content/plugins/oxygen/component-framework/component-init.php on line 3032 [28-Nov-2022 22:42:14 UTC] PHP Warning: Undefined array key "icon-background-color" in /wp-content/plugins/oxygen/component-framework/component-init.php on line 3033 [28-Nov-2022 22:42:14 UTC] PHP Warning: Undefined array key "icon-size" in /wp-content/plugins/oxygen/component-framework/component-init.php on line 3035

redolivedev commented 1 year ago

I get errors with 8.0 same as @magicmax1967

Kpudlo commented 1 year ago

Thank you for the information. Similar to #3131 and reported internally via https://github.com/soflyy/oxygen/issues/4871.

martinlrg commented 1 year ago

Still a bug , using PHP 8.0 on NGINX having the same errors as @mickaelperrin , even in a clean template with just with title and text, no repeaters or any dynamic content. Had to disable E_WARNING logs because it increase considerably on each page load, i hope this can be fixed in the next update,.

artcila commented 3 months ago

PHP Warning: Undefined array key "icon-background-color" on line 3123 PHP Warning: Undefined array key "icon-color" on line 3122 PHP 8.1 i see same issue was 2 years ago . Are there solutions for fix ?

artcila commented 3 months ago

Solved the issue. Thanks to @bhaktiprabhu. Deleted particular classes from oxygen builder that were causing the error.

edwin-laman7 commented 2 months ago

Solved the issue. Thanks to @bhaktiprabhu. Deleted particular classes from oxygen builder that were causing the error.

I am having the same issue. Can you share the link to the solution?