Background of the issue:
I am trying to set up translations for all Elementor Pages and Templates that are used on the pages I'm testing. I am currently redirecting /es/ to hidden link for all users not on my IP as WPML is crashing the Spanish language site.
Symptoms:
Loading the pages or trying to edit in Elementor throws a critical error. The error log includes a PHP Warning: Undefined array key 'widgetType' and a PHP Fatal error: Uncaught Error: Call to a member function get_class_name() on array in /home/123456789.cloudwaysapps.com/abcxyz/public_html/wp-content/plugins/elementor-pro/modules/global-widget/widgets/global-widget.php on line 196.
Questions:
Why is WPML crashing the Spanish language site?
How can I resolve the critical error when loading or editing pages in Elementor?
Languages: English (English )German (Deutsch )French (Français )
Timezone: Europe/Zagreb (GMT+01:00)
Hi,
This is probably not related to the RC1 because we had this issue in several previous cases. That being said, is only one page affected (e.g. home) or all the pages?
If so, if you are using the templates (footer, header) etc, can you do this for the templates and the page where the the issue occurs:
1. Open the default language page/template in Edit mode.
2. Edit it with Elementor page builder.
3. Make a small change, for example, add a heading element.
4. Press the Save/Update button.
5. Now, please remove that heading elementor that did in step #3.
6. Update the page again.
7. Open the translation and resave it.
It is on all pages, and unfortunately this is not resolving the issue. All assigned Spanish translations are throwing that error, editing the Header/Footer and global widget that are on the page as described and resaving does not fix the issue. Here is the error:
Now, when I go into a single page, it wants me to retranslate the entire page. All the pages have already been translated. They've been linked to their corresponding English translations. Resaving the linked translation does not work.
This is incredibly frustrating after having all the pages translated and linking the corresponding Spanish to English translations. WPML seems to be requiring us to start completely from scratch. Am I missing something?
Greatly appreciate any assistance you can provide to resolve this.
Languages: English (English )German (Deutsch )French (Français )
Timezone: Europe/Zagreb (GMT+01:00)
I see, so the error occurs as soon as I want to open any translation in Elementor directly. And even if I visit the translated page in the frontend?
To troubleshoot this problem, I'll install the Duplicator plugin and generate packages for further debugging purposes. I'll ensure to exclude all media files to maintain a minimal package size.
I've pushed the site to a staging site before deleting that post ID. I'm not sure how to provide the new URL to you here privately in this reply. If you can provide that form again, that would be great. The credentials stay the same as the files/db are identical.
Backend: when attempting to edit in Elementor loads the page, however the formatting looks off and there are some background images of elements that aren't showing. A form widget (I assume what we deleted) is gone.
Frontend: loads until reaching an error. It appears a form widget doesn't load so the page fails at that point. Here is the PHP error:
Placement: Insert it right below this function declaration:
public function __construct( $data = [], $args = null ) {
This adjustment ensures that the
templateID
is set to
2970
, which exists on your site.
3. After implementing this fix:
- Edit the affected page(s) and properly configure the global widget.
- Once all pages are updated, this code can be safely removed.
While this workaround should resolve the issue temporarily, we have a few concerns:
- Post ID 2994 appears to be a revision, not an
elementor_library
entry.
We’re unsure how this happened—could you confirm if you recently imported a template, migrated the database, or made any other changes that might have led to corrupted IDs?
- This fix is specific to one
templateID
.
It only resolves the issue for template
2970
. If multiple pages are affected, it may be better to recreate or duplicate the global widget and remove the original to prevent further issues.
- Potential Elementor bug:
If this issue persists, Elementor may need to implement an additional check to validate the
post_type
before processing global widgets.
Please let us know how you'd like to proceed or if you have any additional context that might help identify the root cause.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.