Skip to content

fix: guard the Elementor promotion against older control types - #571

Merged
TallblokeUK merged 2 commits into
core-betafrom
fix/elementor-notice-guard/core
Oct 5, 2026
Merged

TallblokeUK merged 2 commits into
core-betafrom
fix/elementor-notice-guard/core

Conversation

@TallblokeUK

Copy link
Copy Markdown
Contributor

Fixes #567.

The Elementor Custom CSS promotion registers its control with the NOTICE control type, which Elementor added in 3.19. On an older Elementor the constant does not exist, and it is read while the editor builds its controls, so the editor fatals and becomes unusable.

The promotion is now skipped when that control type is unavailable: no fatal and no banner on older versions, unchanged behaviour on current ones.

Verification

  • New tests cover both directions, and the skip case fails without the guard.
  • Confirmed separately that defined() resolves a class constant to true when present, false when the constant is missing, and false without raising when the class is absent.
  • Full PHPUnit suite and lint:php pass.

@TallblokeUK TallblokeUK added the run-tests Trigger automated tests label Sep 29, 2026
@TallblokeUK
TallblokeUK merged commit 1ce5dc0 into core-beta Oct 5, 2026
34 of 37 checks passed
@TallblokeUK
TallblokeUK deleted the fix/elementor-notice-guard/core branch October 5, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-tests Trigger automated tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fatal error in Elementor editor on Elementor versions older than 3.19: undefined Controls_Manager::NOTICE

3 participants