elementor / elementor

The most advanced frontend drag & drop page builder. Create high-end, pixel perfect websites at record speeds. Any theme, any page, any design.
https://elementor.com/
GNU General Public License v3.0
6.58k stars 1.42k forks source link

⌛ ⛔ 🐘 PHP Error with old sections/columns in the page when using PHP 8.3 #25601

Open momo-fr opened 6 months ago

momo-fr commented 6 months ago

Prerequisites

Description

Warning: Undefined array key "background_overlay_background" in /Users/jean/Local Sites/elementor/app/public/wp-content/plugins/elementor/includes/elements/section.php on line 1450

Warning: Undefined array key "background_overlay_hover_background" in /Users/jean/Local Sites/elementor/app/public/wp-content/plugins/elementor/includes/elements/section.php on line 1451

Warning: Undefined array key "background_overlay_background" in /Users/jean/Local Sites/elementor/app/public/wp-content/plugins/elementor/includes/elements/column.php on line 932

Warning: Undefined array key "background_overlay_hover_background" in /Users/jean/Local Sites/elementor/app/public/wp-content/plugins/elementor/includes/elements/column.php on line 933

Steps to reproduce

Hello, if you have old sections/columns in the page, these errors are displayed.

Expected behavior

No error display with old sections/columns.

Isolating the problem

Elementor System Info

Click to reveal ````txt == Server Environment == Operating System: Darwin Software: nginx/1.16.0 MySQL version: MySQL Community Server - GPL v8.0.16 PHP Version: 8.3.0 PHP Memory Limit: 768M PHP Max Input Vars: 4000 PHP Max Post Size: 1000M GD Installed: Yes ZIP Installed: Yes Write Permissions: All right Elementor Library: Connected == WordPress Environment == Version: 6.4.3 Site URL: http://elementor.local Home URL: http://elementor.local WP Multisite: No Max Upload Size: 300 Mo Memory limit: 768M Max Memory limit: 256M Permalink Structure: /%postname%/ Language: fr_FR Timezone: Europe/Paris Debug Mode: Inactive == Theme == Name: Hello Child Version: 1.0.1 Author: FreePixel Child Theme: Yes Parent Theme Name: Hello Elementor Parent Theme Version: 3.0.1 Parent Theme Author: Elementor Team == User == Role: administrator WP Profile lang: fr-FR User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:124.0) Gecko/20100101 Firefox/124.0 == Active Plugins == Advanced Custom Fields PRO Version: 6.2.7 Author: WP Engine Elementor Version: 3.21.0-beta1 Author: Elementor.com Elementor Pro Version: 3.20.1 Author: Elementor.com Flexible Elementor Panel Version: 2.4.0 Author: WebMat SweepPress Version: 2.6 Author: Milan Petrovic WooCommerce Version: 8.7.0 Author: Automattic == Fonctionnalités == Custom Fonts: 1 Custom Icons: 2 == Intégrations == woocommerce: Actif == Expériences d’Elementor == Amélioration du chargement des ressources: Actif par défaut Optimisation du chargement du CSS: Actif Polices d’icônes « inline »: Actif Points d’arrêt personnalisés supplémentaires: Actif admin_menu_rearrangement: Inactif par défaut Conteneur Flexbox: Actif Mettre à niveau la bibliothèque Swiper: Actif Conteneur grille: Actif Nested Elements Performance: Inactif par défaut Optimized Control Loading: Actif Par défaut vers le Nouveau constructeur de thème: Inactif En-tête et pied de page du thème Hello: Actif Elementor Home Screen: Inactif par défaut Barre supérieure de l’éditeur: Inactif Construire avec l’IA: Inactif Page d’atterrissage: Inactif Éléments imbriqués: Actif Chargement différé des images d’arrière-plan: Actif Notes: Inactif Conditions d’affichage: Actif Envois de formulaire: Inactif Menu: Actif Filtre de taxonomie: Actif == Journal == Log: showing 20 of 402024-03-22 10:32:45 [info] Elementor data updater process has been queued. [array ( 'plugin' => 'Elementor', 'from' => '3.20.1', 'to' => '3.20.2', )] 2024-03-22 10:32:45 [info] Elementor data updater process has been queued. [array ( 'plugin' => 'Elementor Pro', 'from' => '3.20.0', 'to' => '3.20.1', )] 2024-03-22 10:32:45 [info] elementor::elementor_updater Started 2024-03-22 10:32:45 [info] Elementor/Upgrades - _on_each_version Start 2024-03-22 10:32:45 [info] Elementor/Upgrades - _on_each_version Finished 2024-03-22 10:32:45 [info] Elementor data updater process has been completed. [array ( 'plugin' => 'Elementor', 'from' => '3.20.1', 'to' => '3.20.2', )] 2024-03-22 10:32:45 [info] elementor-pro::elementor_pro_updater Started 2024-03-22 10:32:45 [info] Elementor Pro/Upgrades - _on_each_version Start 2024-03-22 10:32:45 [info] Elementor Pro/Upgrades - _on_each_version Finished 2024-03-22 10:32:45 [info] Elementor data updater process has been completed. [array ( 'plugin' => 'Elementor Pro', 'from' => '3.20.0', 'to' => '3.20.1', )] 2024-04-02 15:16:13 [info] Elementor data updater process has been queued. [array ( 'plugin' => 'Elementor', 'from' => '3.20.2', 'to' => '3.20.3', )] 2024-04-02 15:16:17 [info] elementor::elementor_updater Started 2024-04-02 15:16:17 [info] Elementor/Upgrades - _on_each_version Start 2024-04-02 15:16:17 [info] Elementor/Upgrades - _on_each_version Finished 2024-04-02 15:16:17 [info] Elementor data updater process has been completed. [array ( 'plugin' => 'Elementor', 'from' => '3.20.2', 'to' => '3.20.3', )] 2024-04-02 15:25:37 [info] Elementor data updater process has been queued. [array ( 'plugin' => 'Elementor', 'from' => '3.20.3', 'to' => '3.21.0-beta1', )] 2024-04-02 15:25:38 [info] elementor::elementor_updater Started 2024-04-02 15:25:38 [info] Elementor/Upgrades - _on_each_version Start 2024-04-02 15:25:38 [info] Elementor/Upgrades - _on_each_version Finished 2024-04-02 15:25:38 [info] Elementor data updater process has been completed. [array ( 'plugin' => 'Elementor', 'from' => '3.20.3', 'to' => '3.21.0-beta1', )] PHP: showing 2 of 2PHP: 2024-03-11 14:06:23 [notice X 11][../wp-content/plugins/elementor/includes/base/controls-stack.php::228] hexdec(): Passing null to parameter #1 ($hex_string) of type string is deprecated [array ( 'trace' => ' #0: Elementor\Core\Logger\Manager -> shutdown() ', )] PHP: 2024-04-02 15:37:19 [warning X 20][../wp-content/plugins/elementor/includes/elements/section.php::1451] Undefined array key "background_overlay_hover_background" [array ( 'trace' => ' #0: Elementor\Core\Logger\Manager -> shutdown() ', )] == Elementor - Compatibility Tag == Elementor Pro: Non compatible Flexible Elementor Panel: Non compatible == Elementor Pro - Compatibility Tag == Flexible Elementor Panel: Compatible ````

Agreement

nicholaszein commented 6 months ago

Hi, @momo-fr,

Thank you for reaching out! 🙏

⛔ After reviewing your report we concluded that you are using PHP version 8.3, which is not yet supported by Elementor.

Please downgrade to PHP version 8.1 or 8.0, as these are supported by Elementor and let us know if the problem persist.

Also, you need to hide Debug Display. To do this, add the following snippet in your wp-config.php file, at the root folder of your WordPress installation right above the line that says /* That's all, stop editing! Happy publishing. */:


if ( ! defined( 'WP_DEBUG' ) ) {
    define( 'WP_DEBUG', false );
}
if ( ! defined( 'WP_DEBUG_DISPLAY' ) ) {
    define( 'WP_DEBUG_DISPLAY', false );
}

At the moment we have no ETA on when PHP 8.3 will be supported. But we are working on adding support. For now our priority is to add support to PHP versions 8.0, 8.1, and 8.2.

Kind regards

jamieburchell commented 4 months ago

You are using PHP version 8.3, which is not yet supported by Elementor.

https://elementor.com/help/requirements/#php-7-4-or-greater

PHP 7.4 or Greater

Since 8.3 > 7.4 and 8.3 is not supported, it would be a good idea to explicitly state this on the server requirements page.

MartinBalerio commented 2 months ago

@nicholaszein Please ask someone to update docs as per @jamieburchell comment.

vlw

Cryovida commented 1 month ago

Intenta con esto:

$has_background_overlay = ( isset($settings['background_overlay_background']) && in_array($settings['background_overlay_background'], [ 'classic', 'gradient' ], true) ) || ( isset($settings['background_overlay_hover_background']) && in_array($settings['background_overlay_hover_background'], [ 'classic', 'gradient' ], true) );