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.

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

Problem: Some translated projects have lost connection and cannot be reconnected

Solution: All the errors were due to the "bad" migration. I migrate again from scratch and everything is ok

Relevant Documentation:

This topic contains 14 replies, has 2 voices.

Last updated by romainO-2 1 month, 1 week ago.

Assigned support staff: Carlos Rojas.

Author Posts
September 4, 2019 at 2:32 pm

romainO-2

The problem occurred after the migration from the development website to the final website.

I am trying to: Connect some projects that have lost connection after migration to production domain.

Link to a page where the issue can be seen:

hidden link (production site)

I expected to see:

hidden link (development site)

I could not reconnect the projets so I proceed like in this ticket : https://wpml.org/forums/topic/many-translated-pages-have-lost-connection-and-cant-be-manually-re-connected/

Now WPML is OFF because WP is in recover mode (see image attached) and I cannot restart it. So I cannot provide any Debug info.

I don't know how to fix it.

September 4, 2019 at 2:39 pm #4512133

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Montevideo (GMT-03:00)

Hello,
Thank you for contacting WPML support.

To recover the site you can follow this steps:
- Connect to the site via FTP -> Go to wp-contents folder -> Re-name the 'plugins' folder as 'plugins old' -> Save the changes.
- Create a new 'plugins' folder within wp-contents and leave it empty.
- Log in the site and go to Plugins page (You should see a lists of messages saying that the plugins were deactivated).
- Copy the plugins from the 'plugins old' folder to the 'plugins' folder one by one and activate them one by one in the backend of the site.

Could you tell me if the site is working again?

Kind regards,
Carlos

September 4, 2019 at 2:49 pm #4512269

romainO-2

Hello Carlos,

Actually, the site is working well when WPML is deactivated. While when I activate it, I can only use the site in recover mode. Can you have a look please ?

September 4, 2019 at 2:50 pm #4512275

romainO-2

Last email received from WP :

Howdy!

Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

Ici, WordPress a trouvé une erreur avec l’une de vos extensions, « WPML Multilingual CMS ».

First, visit your website (hidden link) and check for any visible issues. Next, visit the page where the error was caught (hidden link) and check for any visible issues.

Veuillez contacter votre hébergeur pour une assistance concernant la résolution de ce problème.

If your site appears broken and you can't access your dashboard normally, WordPress now has a special "recovery mode". This lets you safely login to your dashboard and investigate further.

hidden link

September 4, 2019 at 2:57 pm #4512367

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Montevideo (GMT-03:00)

Hi there,

In this case I would like to ask you to follow this steps in order to isolate the cause of the issue:
- Back up your site first before making any change, this is for security reasons.
- Update all outdated plugins and themes.
- Flush any cache memory that might exists.
- Activate the debug mode by following the steps described in this link: https://codex.wordpress.org/Debugging_in_WordPress
- Deactivate all the plugins that are not related to WPML.
- Switch for a moment to a WordPress default theme like Twenty Seventeen.
- If the issue is gone, activate one by one to see with which one there is an interaction issue.

Could you tell me the result of this steps?

Regards,
Carlos

September 4, 2019 at 3:10 pm #4512427

romainO-2

Ok I did everything you adviced (except that I have add a coming soon plugin as it is the production site) and i got :

Fatal error: Uncaught InvalidArgumentException: element_id and type do not match for element_id:18520 the database contains post_nav_menu_item while this function was called with post_attachment in /home/insuco/www/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php:32 Stack trace: #0 /home/insuco/www/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(1489): WPML_Set_Language->set('18520', 'post_attachment', NULL, 'fr', NULL, true) #1 /home/insuco/www/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php(1904): SitePress->set_element_language_details('18520', 'post_attachment', NULL, 'fr') #2 /home/insuco/www/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php(1874): TranslationManagement->add_missing_language_to_post(Object(stdClass)) #3 /home/insuco/www/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.cl in /home/insuco/www/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php on line 32
Le site rencontre des difficultés techniques. Veuillez relever la boîte de messagerie du compte administrateur du site pour obtenir des instructions.

Please connect to WP if you want to bypass the coming soon mode.

September 4, 2019 at 3:10 pm #4512429

romainO-2

New automatic email from WP :

Howdy!

Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

Ici, WordPress a trouvé une erreur avec l’une de vos extensions, « WPML Multilingual CMS ».

First, visit your website (hidden link) and check for any visible issues. Next, visit the page where the error was caught (hidden link) and check for any visible issues.

Veuillez contacter votre hébergeur pour une assistance concernant la résolution de ce problème.

If your site appears broken and you can't access your dashboard normally, WordPress now has a special "recovery mode". This lets you safely login to your dashboard and investigate further.

hidden link

To keep your site safe, this link will expire in 1 jour. Don't worry about that, though: a new link will be emailed to you if the error occurs again after it expires.

Détails de l’erreur
======================
Une erreur de type E_ERROR a été causée dans la ligne 32 du fichier /home/insuco/www/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php. Message d’erreur : Uncaught InvalidArgumentException: element_id and type do not match for element_id:18520 the database contains post_nav_menu_item while this function was called with post_attachment in /home/insuco/www/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php:32
Stack trace:
#0 /home/insuco/www/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(1489): WPML_Set_Language->set('18520', 'post_attachment', NULL, 'fr', NULL, true)
#1 /home/insuco/www/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php(1904): SitePress->set_element_language_details('18520', 'post_attachment', NULL, 'fr')
#2 /home/insuco/www/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php(1874): TranslationManagement->add_missing_language_to_post(Object(stdClass))
#3 /home/insuco/www/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.cl

September 4, 2019 at 4:44 pm #4513001

romainO-2

Can you please give some feedback ?

September 5, 2019 at 7:45 am #4516361

romainO-2

Hello, if needed if can restore the site to the point when I only had this problem : https://wpml.org/forums/topic/many-translated-pages-have-lost-connection-and-cant-be-manually-re-connected/ (before the crash). But I need quick assistance please.

September 5, 2019 at 9:51 am #4518023

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Montevideo (GMT-03:00)

Hi there,
Thank you very much for your messages.

I have re-saved the attachment with ID 18520 (hidden link) and applied some troubleshooting steps to the site.

Could you tell me if the issue persists?

Regards,
Carlos

September 5, 2019 at 9:52 am #4518027

romainO-2

For your information. This site is not under development. It's a production site. I could not choose it in your list so I defined it as development website.

As I need quick solutions, i'm restarting the migration process and I will open a new ticket if the same problem occurs.

Thank you

September 5, 2019 at 10:01 am #4518207

romainO-2

Sorry our messages crossed...
Got a fatal error again.
Anyway things seem weird. I may have lost some projects so I'd rather restart the migration process.
For further better assistance, should I stay in this ticket or reopen one with the label "Support for production site" ?

September 5, 2019 at 11:31 am #4518807

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Montevideo (GMT-03:00)

Hi,

You can keep this ticket open and if necessary I will escalate it to our 2nd tier of support.

Regards,
Carlos

September 5, 2019 at 11:53 am #4518905

romainO-2

The problem is solved. All the errors were due to the "bad" migration. I migrate again from scratch and everything is ok. Thanks for your time.

September 5, 2019 at 11:53 am #4518907

romainO-2

My issue is resolved now. Thank you!