Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing issues with saving an Elementor page and find that everything works fine when WPML Multilingual CMS is disabled, follow these steps for troubleshooting.
Solution:
First, we recommend deactivating all non-WPML and Elementor related plugins to see if the issue persists. Next, enable the debug.log to identify the actual problem. You can do this by editing your wp-config.php file:

define('WP_DEBUG', true);

define('WP_DEBUG_LOG', true);

This will save errors to a debug.log file in your /wp-content/ directory. For detailed instructions, please refer to our documentation on debugging WPML.
If this solution doesn't seem relevant to your issue, please don't hesitate to open a new support ticket with us for further assistance.

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.

Tagged: 

This topic contains 7 replies, has 2 voices.

Last updated by Andrey 1 year, 8 months ago.

Assisted by: Andrey.

Author Posts
November 12, 2023 at 1:06 pm #14783951

ellisA-2

Whenever trying to save an elementor page - page would not save.
when I disable WPML Multilingual CMS then everything works fine

November 12, 2023 at 7:30 pm #14784831

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for contacting WPML support.

What are the results you if you temporarily deactivate all non-WPML and Elementor related plugins?

Could you activate the debug.log? You can do this by adding a few lines to the site’s wp-config.php file. With error log enabled, you will see what the actual problem is.

To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

define('WP_DEBUG', true);

In order to enable the error logging to a file on the server you need to add yet one more similar line:

define( 'WP_DEBUG_LOG', true );

In this case, the errors will be saved to a debug.log log file inside the /wp-content/directory.

https://wpml.org/documentation/support/debugging-wpml/

Let me know what you see after the debug mode has been enabled.

November 13, 2023 at 12:04 pm #14788237

ellisA-2

This is what I see on log file when trying save through elementor and WPML is enabled:
[13-Nov-2023 11:55:04 UTC] PHP Notice: Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see <a>Debugging in WordPress for more information. (This message was added in version 5.3.0.) in /home/430407.cloudwaysapps.com/cqnqqxavsf/public_html/wp-includes/functions.php on line 6031
[13-Nov-2023 11:55:05 UTC] PHP Notice: Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see <a>Debugging in WordPress for more information. (This message was added in version 5.3.0.) in /home/430407.cloudwaysapps.com/cqnqqxavsf/public_html/wp-includes/functions.php on line 6031

November 13, 2023 at 7:50 pm #14792111

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

I cannot see anything that could prevent the page from saving. Does the same happen with all plugins deactivated except WPML?

I need to request temporary access (wp-admin and FTP) to your site – preferably to a test site where the problem has been replicated if possible – in order to be of better help. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Please provide the steps to replicate the issue.

November 15, 2023 at 8:18 am #14805263

ellisA-2

Any updates?

November 15, 2023 at 9:27 am #14806069

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for the updates. I have reviewed your website and found nothing wrong. Would it be possible for me to create a local copy of your site? I will need to install Duplicator plugin to make a copy of the website.

November 16, 2023 at 1:38 pm #14827255

ellisA-2

no problem - go ahead

November 17, 2023 at 1:14 pm #14863045

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

I appreciate your patience. Could you please test now?

I have reported your case to our development team. As a temporary solution, the following has been done on your staging site:

– Opened the file: wp-content/plugins/sitepress-multilingual-cms/classes/media/duplication/class-wpml-media-attachments-duplication.php

– On line 696

– Replaced existing code

							foreach ( $source_attachments as $source_attachment_id ) {
								foreach ( $attachments as $attachment_id ) {
									$translation_attachment_id = icl_object_id( $attachment_id, 'attachment', false, $lang );
									if ( ! $translation_attachment_id ) {
										$this->create_duplicate_attachment_not_static( $source_attachment_id, $element_id, $lang );
									}
								}
							}

with new code

                            foreach ( $source_attachments as $source_attachment_id ) {
                                $translation_attachment_id = icl_object_id( $source_attachment_id, 'attachment', true, $lang );
                                if (!$translation_attachment_id && !in_array($translation_attachment_id, $attachments)) {
                                    $this->create_duplicate_attachment_not_static( $source_attachment_id, $element_id, $lang );
                                }
                            }