hello-theme icon indicating copy to clipboard operation
hello-theme copied to clipboard

Fatal error when updating theme to version 3.2.0 due to dependency on 'ALERT' constant in Elementor

Open petermann opened this issue 1 year ago • 1 comments

When updating the theme from 3.1.1 to 3.2.0, a Fatal Error occurs in the settings-header.php file due to the use of the ALERT constant. This constant was introduced in Elementor version 3.19.0.

If the website is running a version of Elementor older than 3.19.0 and the theme updates automatically to 3.2.0, the site crashes and throws a fatal error.

Fatal error: Uncaught Error: Undefined class constant 'ALERT' in ./wp-content/themes/hello-elementor/includes/settings/settings-header.php:87

Steps to Reproduce:

  • Use Elementor version 3.18.x (or earlier).
  • Update the theme from version 3.1.1 to 3.2.0.
  • The site crashes and displays a fatal error.

Suggested Solution:

  • Add a version check for Elementor before using the ALERT constant.
  • To maintain backward compatibility with older Elementor versions, consider reverting to Controls_Manager::RAW_HTML, which is available in earlier versions of Elementor and does not cause compatibility issues.
  • Alternatively, include a notice requiring Elementor to be updated to version 3.19.0 or higher before updating the theme to 3.2.0.

Environment:

  • Theme version: 3.2.0
  • Elementor version: 3.18.3 (or earlier)
  • WordPress version: 6.7.1
  • PHP version: 7.4

image

petermann avatar Dec 16 '24 23:12 petermann

Hi @petermann

Thank you for bringing this issue to our attention and for providing detailed information, including suggested solutions.

We understand that encountering a fatal error can be frustrating. We don't usually see cases where websites use newer Hello Theme versions with older Elementor versions. Typically it's the other way around, older Hello Theme versions with newer Elementor versions.

Nevertheless, to prevent compatibility issues, we try to wait for a few versions before implementing new Elementor features in the theme.

In this case, the Alert Control was introduced in Elementor 3.19.0, nearly a year ago. Given the long time that has passed, and after careful internal discussion, we’ve decided not to update the Hello Theme.

To resolve this issue, I recommend updating Elementor to version 3.19.0 or higher. This will ensure compatibility with Hello Theme 3.2.0 and prevent further errors.

rami-elementor avatar Dec 17 '24 08:12 rami-elementor