Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 13:00 9:00 – 13:00 9:00 – 13:00 8:00 – 12:00 8:00 – 12:00 -
- 14:00 – 17:00 14:00 – 18:00 14:00 – 18:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Europe/Zagreb (GMT+01:00)

Tagged: 

This topic contains 3 replies, has 0 voices.

Last updated by juan-fM-4 18 hours, 6 minutes ago.

Assisted by: Bruno Kos.

Author Posts
January 31, 2025 at 7:23 pm #16657067

juan-fM-4

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?

February 1, 2025 at 5:09 pm #16658673

Bruno Kos
Supporter

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.

Does the issue occur then?

It is based on
https://wpml.org/forums/topic/translation-stuck-11/#post-15545145
https://wpml.org/forums/topic/elementor-post-are-experiencing-critical-error/#post-16514846

February 7, 2025 at 6:57 pm #16681116

juan-fM-4

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:

[07-Feb-2025 18:54:43 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_class_name() on array in /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor-pro/modules/global-widget/widgets/global-widget.php:196
Stack trace:
#0 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor-pro/modules/global-widget/widgets/global-widget.php(163): ElementorPro\Modules\GlobalWidget\Widgets\Global_Widget->init_original_element_instance()
#1 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor-pro/modules/global-widget/widgets/global-widget.php(158): ElementorPro\Modules\GlobalWidget\Widgets\Global_Widget->get_original_element_instance()
#2 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor/core/files/css/post.php(332): ElementorPro\Modules\GlobalWidget\Widgets\Global_Widget->get_controls()
#3 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor/core/files/css/post.php(296): Elementor\Core\Files\CSS\Post->render_element_global_styles()
#4 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor/core/files/css/post.php(226): Elementor\Core\Files\CSS\Post->render_styles()
#5 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor/core/files/css/post.php(313): Elementor\Core\Files\CSS\Post->add_controls_stack_style_rules()
#6 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor/core/files/css/post.php(297): Elementor\Core\Files\CSS\Post->render_element_styles()
#7 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor/core/files/css/post.php(226): Elementor\Core\Files\CSS\Post->render_styles()
#8 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor/core/files/css/post.php(313): Elementor\Core\Files\CSS\Post->add_controls_stack_style_rules()
#9 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor/core/files/css/post.php(297): Elementor\Core\Files\CSS\Post->render_element_styles()
#10 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor/core/files/css/post.php(178): Elementor\Core\Files\CSS\Post->render_styles()
#11 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor/core/files/css/base.php(687): Elementor\Core\Files\CSS\Post->render_css()
#12 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor/core/files/base.php(180): Elementor\Core\Files\CSS\Base->parse_content()
#13 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor/core/files/css/base.php(133): Elementor\Core\Files\Base->update_file()
#14 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor/core/files/css/base.php(229): Elementor\Core\Files\CSS\Base->update()
#15 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor/core/files/css/post.php(201): Elementor\Core\Files\CSS\Base->enqueue()
#16 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor/includes/frontend.php(1179): Elementor\Core\Files\CSS\Post->enqueue()
#17 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor/includes/frontend.php(1098): Elementor\Frontend->get_builder_content()
#18 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-includes/class-wp-hook.php(324): Elementor\Frontend->apply_builder_in_content()
#19 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#20 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(1933): apply_filters()
#21 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(635): WP_REST_Posts_Controller->prepare_item_for_response()
#22 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-includes/rest-api/class-wp-rest-server.php(1292): WP_REST_Posts_Controller->get_item()
#23 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-includes/rest-api/class-wp-rest-server.php(1125): WP_REST_Server->respond_to_request()
#24 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-includes/rest-api/class-wp-rest-server.php(439): WP_REST_Server->dispatch()
#25 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-includes/rest-api.php(449): WP_REST_Server->serve_request()
#26 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-includes/class-wp-hook.php(324): rest_api_loaded()
#27 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#28 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-includes/plugin.php(565): WP_Hook->do_action()
#29 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-includes/class-wp.php(418): do_action_ref_array()
#30 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-includes/class-wp.php(813): WP->parse_request()
#31 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-includes/functions.php(1336): WP->main()
#32 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-blog-header.php(16): wp()
#33 /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/index.php(17): require('...')
#34 {main}
thrown in /home/1234567.cloudwaysapps.com/hqwfvqkvnu/public_html/wp-content/plugins/elementor-pro/modules/global-widget/widgets/global-widget.php on line 196

February 7, 2025 at 7:06 pm #16681124

juan-fM-4

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.