elementor / elementor/elementor
⌛ Using the ACF Dynamic Tag acf-text causes a Fatal Error
- Dominant language
- PHP
- Stars
- 7.1k
- Forks
- 1.6k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 193
Description
### Prerequisites
- [x] I have searched for similar issues in open and closed tickets and cannot find a duplicate.
- [ ] I have troubleshooted my issue, and it still exists against the latest stable version of Elementor.
### Description
In the latest version of Elementor Pro (3.27.4), using the ACF Dynamic Tag acf-text causes a Fatal Error.
The issue is caused by an incorrect error level constant in wp_trigger_error().
Error Message
```
PHP Fatal error: Uncaught ValueError: trigger_error(): Argument #2 ($error_level) must be one of
E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED in /wp-includes/functions.php:6114
```
Affected File
`/wp-content/plugins/elementor-pro/modules/dynamic-tags/acf/tags/acf-text.php`
Faulty Code (Line 90)
`wp_trigger_error( 'acf-text', "ACF Text Field value must be string, but is type of: $type", E_CORE_WARNING );`
### Issue
`E_CORE_WARNING` is a PHP system constant and cannot be used with `trigger_error()`.
`wp_trigger_error()` only allows the following error levels:
```
- E_USER_ERROR
- E_USER_WARNING
- E_USER_NOTICE
- E_USER_DEPRECATED
```
As a result, a Fatal Error occurs when an ACF Text Field is used as a Dynamic Tag in Elementor.
### Solution
This issue can be fixed by replacing the invalid error level with a valid one.
Replace in acf-text.php (Line 90):
`wp_trigger_error( 'acf-text', "ACF Text Field value must be string, but is type of: $type", E_CORE_WARNING );`
With:
`wp_trigger_error( 'acf-text', "ACF Text Field value must be string, but is type of: $type", E_USER_WARNING );`
### Steps to reproduce
1. Activate ACF Pro and Elementor Pro
2. Use an ACF Text Field as a Dynamic Tag in Elementor
3. Edit the page with Elementor
4. A Fatal Error occurs
### Expected behavior
Elementor should use E_USER_WARNING instead to prevent the Fatal Error.
### Isolating the problem
- [ ] This bug happens when only the Elementor (and Elementor Pro) plugins are active.
- [x] This bug happens with the Hello Elementor theme active.
- [x] I can reproduce this bug consistently by following the steps I described above.
### Elementor System Info
Click to reveal
````txt
== Server Environment ==
Operating System: Linux
Software: Apache
MySQL version: Percona Server (GPL), Release '28', Revision '47601f19'$ v8.0.36-28
PHP Version: 8.2.27
PHP Memory Limit: 2048M
PHP Max Input Vars: 20000
PHP Max Post Size: 2048M
GD Installed: Yes
ZIP Installed: Yes
Write Permissions: All right
Elementor Library: Connected
== WordPress Environment ==
Version: 6.7.2
Site URL:
Home URL:
WP Multisite: No
Max Upload Size: 2 GB
Memory limit: 2048M
Max Memory limit: 2048M
Permalink Structure: /%postname%/
Language: de_DE
Timezone: Europe/Berlin
Debug Mode: Active
== Theme ==
Name: Hello Child Theme
Version: 1.0.0
Author: Admin
Child Theme: Yes
Parent Theme Name: Hello Elementor
Parent Theme Version: 3.3.0
Parent Theme Author: Elementor Team
== User ==
Role:
WP Profile lang: de
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:135.0) Gecko/20100101 Firefox/135.0
== Active Plugins ==
Admin Columns
Version: 4.7.7
Author: AdminColumns.com
Adminimize
Version: 1.11.11
Author: WP Media
Advanced Custom Fields
Version: 6.3.12
Author: WP Engine
Borlabs Cookie
Version: 3.2.14
Author: Borlabs GmbH
Brevo - WooCommerce Email Marketing
Version: 4.0.37
Author: Brevo
Custom Shop Plugin
Version: 1.0.0
Author: Admin
Custom Post Type UI
Version: 1.17.2
Author: WebDevStudios
Discount Rules Core
Version: 2.6.7
Author: Flycart
Discount Rules PRO 2.0
Version: 2.6.5
Author: Flycart
DynamicConditions
Version: 1.7.5
Author: RTO GmbH
Easy Table of Contents
Version: 2.0.72
Author: Magazine3
Edit Author Slug
Version: 1.9.1
Author: Brandon Allen
Elementor
Version: 3.27.6
Author: Elementor.com
Elementor Pro
Version: 3.27.4
Author: Elementor.com
Email Log
Version: 2.4.9
Author: Sudar
Enable Media Replace
Version: 4.1.5
Author: ShortPixel
Friendly Captcha for WordPress
Version: 1.15.13
Author: Friendly Captcha GmbH
Germanized for WooCommerce
Version: 3.18.7
Author: vendidero
Germanized for WooCommerce Pro
Version: 4.1.6
Author: vendidero
GTM4WP - A Google Tag Manager (GTM) plugin for WordPress
Version: 1.20.3
Author: Thomas Geiger
Helpful
Version: 4.5.23
Author: Pixelbart
If Menu - Visibility control for menus
Version: 0.19.2
Author: Layered
Klarna for WooCommerce
Version: 4.0.2
Author: klarna
Klarna Order Management for WooCommerce
Version: 1.9.5
Author: klarna, krokedil
Loggedin - Limit Active Logins
Version: 1.3.2
Author: Joel James
One Stop Shop for WooCommerce
Version: 1.7.0
Author: vendidero
Post Types Order
Version: 2.3.3
Author: Nsp Code
Premmerce WooCommerce Customers Manager
Version: 1.1.14
Author: Premmerce
Product Customer List for WooCommerce
Version: 3.1.8
Author: Kokomo
Secondary Title
Version: 2.2.0
Author: Kolja Nolte
Statify
Version: 1.8.5
Author: pluginkollektiv
TrueROAS
Version: 3.2
Author: TrueROAS
Unlimited Elements for Elementor
Version: 1.5.141
Author: Unlimited Elements
User Role Editor
Version: 4.64.4
Author: Vladimir Garagulya
vendidero Helper
Version: 2.2.5
Author: vendidero
WebP Express
Version: 0.25.9
Author: Bjørn Rosell
WooCommerce
Version: 9.7.0
Author: Automattic
WooCommerce Filter Orders by Product
Version: 4.1
Author: Kowsar Hossain
WooCommerce PayPal Payments
Version: 2.9.6
Author: WooCommerce
WooCommerce Product Coupon with Order
Version: 2.2.1
Author: C23/BS
WooCommerce Product Dependencies
Version: 2.0.1
Author: WooCommerce
WooCommerce Sold Individually for Variations
Version: 1.2
Author: PT Woo Plugins (by Webdados)
WooCommerce Stripe Gateway
Version: 9.2.0
Author: Stripe
WP-Optimize - Clean, Compress, Cache
Version: 4.0.1
Author: TeamUpdraft, DavidAnderson
WP Mail SMTP
Version: 4.3.0
Author: WP Mail SMTP
WP Remote Users Sync
Version: 2.0.7
Author: Alexandre Froger
Yoast SEO
Version: 24.5
Author: Team Yoast
== Must-Use Plugins ==
Raidboxes Must-Use Plugins
Version: 0.1
Author: Raidboxes
== Eigenschaften ==
Custom Fonts: 3
Custom Icons: 1
== Integrations ==
woocommerce: Aktiv
== Elementor-Experimente ==
Inline-Schriftarten-Symbole: Inaktiv
Additional Custom Breakpoints: Inaktiv
Container: Aktiv
Upgrade Swiper Library: Standardmäßig aktiviert
Optimized Markup: Aktiv
Plugin Onboarding: Standardmäßig aktiviert
Load Google Fonts locally: Standardmäßig deaktiviert
Default to New Theme Builder: Aktiv
Header und Footer: Aktiv
Elementor Home Screen: Standardmäßig aktiviert
Startseiten: Inaktiv
Nested Elements: Aktiv
Editor Top Bar: Aktiv
Seiten Panel: Standardmäßig deaktiviert
Element Caching: Inaktiv
Link In Bio: Standardmäßig aktiviert
Floating Buttons: Standardmäßig aktiviert
Elementor Editor Events: Standardmäßig deaktiviert
Atomic Widgets: Standardmäßig deaktiviert
Global Classes: Standardmäßig deaktiviert
Launchpad Checklist: Standardmäßig deaktiviert
Menü: Standardmäßig deaktiviert
== Protokoll ==
Log: showing 20 of 352025-02-06 04:55:10 [info] Elementor data updater process has been queued. [array (
'plugin' => 'Elementor Pro',
'from' => '3.27.0',
'to' => '3.27.2',
)]
2025-02-14 07:20:35 [info] Elementor data updater process has been queued. [array (
'plugin' => 'Elementor',
'from' => '3.27.3',
'to' => '3.27.4',
)]
2025-02-14 07:20:38 [info] elementor::elementor_updater Started
2025-02-14 07:20:38 [info] Elementor/Upgrades - _on_each_version Start
2025-02-14 07:20:38 [info] Elementor/Upgrades - _on_each_version Finished
2025-02-14 07:20:38 [info] Elementor data updater process has been completed. [array (
'plugin' => 'Elementor',
'from' => '3.27.3',
'to' => '3.27.4',
)]
2025-02-14 10:36:14 [info] elementor-pro::elementor_pro_updater Started
2025-02-14 10:36:14 [info] Elementor Pro/Upgrades - _on_each_version Start
2025-02-14 10:36:14 [info] Elementor Pro/Upgrades - _on_each_version Finished
2025-02-14 10:36:14 [info] Elementor data updater process has been completed. [array (
'plugin' => 'Elementor Pro',
'from' => '3.27.2',
'to' => '3.27.3',
)]
2025-03-03 06:29:08 [info] Elementor data updater process has been queued. [array (
'plugin' => 'Elementor',
'from' => '3.27.4',
'to' => '3.27.6',
)]
2025-03-03 06:29:09 [info] elementor-pro::elementor_pro_updater Started
2025-03-03 06:29:09 [info] Elementor data updater process has been queued. [array (
'plugin' => 'Elementor Pro',
'from' => '3.27.3',
'to' => '3.27.4',
)]
2025-03-03 06:29:09 [info] Elementor Pro/Upgrades - _on_each_version Start
2025-03-03 06:29:09 [info] Elementor Pro/Upgrades - _on_each_version Finished
2025-03-03 06:29:09 [info] Elementor data updater process has been completed. [array (
'plugin' => 'Elementor Pro',
'from' => '3.27.3',
'to' => '3.27.4',
)]
2025-03-03 06:29:18 [info] elementor::elementor_updater Started
2025-03-03 06:29:18 [info] Elementor/Upgrades - _on_each_version Start
2025-03-03 06:29:18 [info] Elementor/Upgrades - _on_each_version Finished
2025-03-03 06:29:18 [info] Elementor data updater process has been completed. [array (
'plugin' => 'Elementor',
'from' => '3.27.4',
'to' => '3.27.6',
)]
JS: showing 5 of 5JS: 2025-02-06 06:54:23 [error X 1][../elementor/assets/js/editor.min.js?ver=3.27.3:3:562253] this.config.document is undefined
JS: 2025-02-06 15:29:58 [error X 4][../elementor/assets/js/editor.min.js?ver=3.27.3:3:1310279] L is null
JS: 2025-02-15 11:18:48 [error X 1][../elementor/assets/js/editor.min.js?ver=3.27.4:3:294944] this.ui.mediaImage is undefined
JS: 2025-02-20 04:54:56 [error X 2][../elementor/assets/js/editor-modules.min.js?ver=3.27.4:3:21998] this.getEditorControlModel(...) is undefined
JS: 2025-02-24 14:08:02 [error X 10][../elementor/assets/js/editor.min.js?ver=3.27.4:3:802329] this.store.find(...) is undefined
PHP: showing 3 of 3PHP: 2025-02-24 15:12:02 [warning X 3][../elementor/includes/managers/image.php::113] Trying to access array offset on value of type bool [array (
'trace' => '
#0: Elementor\Core\Logger\Manager -> shutdown()
',
)]
PHP: 2025-02-24 15:12:28 [warning X 1][../elementor-pro/modules/assets-manager/asset-types/fonts-manager.php::262] Undefined array key "editor_post_id" [array (
'trace' => '
#0: Elementor\Core\Logger\Manager -> shutdown()
',
)]
PHP: 2025-03-03 14:21:03 [warning X 1][../elementor/modules/system-info/reporters/user.php::75] Undefined array key 0 [array (
'trace' => '
#0: Elementor\Core\Logger\Manager -> shutdown()
',
)]
== Elementor - Compatibility Tag ==
Elementor Pro: Die Kompatibilität ist nicht angegeben
Unlimited Elements for Elementor: Die Kompatibilität ist nicht angegeben
== Elementor Pro - Compatibility Tag ==
````
### Agreement
- [x] I agree that my issue may be closed without action if it doesn't meet all the requirements.
Contributor guide
Assessment
This issue has not been assessed yet.