[Resolved] Adding translation doesn't work/save after importing pages
This thread is resolved. Here is a description of the problem and solution.
Problem: You are trying to add/update and save translations in WPML after importing pages using WP Import. Initially, this method worked, but on subsequent attempts, you encounter issues where the updated content does not appear in translations, and the 'Add translation' option reappears instead of updating the existing translation. Solution: We recommend the following steps to address this issue: 1. Go to WPML > Export & Import, choose to export content from your site, and select WP Export as the method. 2. Export your posts, ensuring the export includes both original posts and their translations. 3. Import the same file without deleting any posts or changing post IDs and slugs. 4. Avoid running the final migration step at WPML > Export & Import after re-importing.
Please try these steps and see if the issue persists. This was kind of an edge case that was not replicable on a new WordPress install.
If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your specific case, please open a new support ticket. We also highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, you can contact us through the WPML support forum.
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.
Background of the issue:
I am trying to add/update and save translations.
I did minor changes to most pages on the site, on this specific site I imported the changes using WP Import in Tools.
Disable WPML > Remove old pages > Import new pages > Turn on WPML > Issue
This metod worked the first time perfectly, the second time I encountered this situation.
Than You in advance
Symptoms:
When translating a page, I don't see updated content. When trying to save it shows it was successful, I get redirected to WP pages, and the 'Add translation' changes to 'Edit translation', but no flag to switch language is present on 'translated' page. After refreshing or going back to WP pages, I again have the option to 'Add translation'. This issue occurs on all pages that need to be translated or updated.
Questions:
Why don't I see updated content when translating a page?
Why does the 'Add translation' option reappear after saving?
How to fix the issue?
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hello,
Do I understand correctly, that you only removed the old original pages and now you expect the old existing translation to connect to the newly imported pages?
Take note, that this behavior would be expected, as each page has a proper ID and your new imported pages must have different IDs than the old one that you deleted. WPML uses these IDs to connect the content.
Thank You for fast reply, and sorry for poor issue description. The copies I talked about are 1:1 copies of the pages I removed with minor but still important adjustments.
As You pointed out, pages have proper ID, that's why I had to first delete the old pages and the translations and import updated copies/pages only in English.
I thought it would be just like making changes manually in an editor in the original language.
All the pages react as they should to WPML Translation Editor, and seem to connect to designated translations, except for the fact that they do not show the changes and do not save.
I have tried steps in the link provided, and I'm confused.
I connected this site to it's copy before the data update, so the partial translations can be stored on it and to test on it.
The translations are not showing in WP Pages, so I do not see a way to connect them to the original language.
After the data update, translations were supposed to be pulled from connected site that is a copy with exact page IDs
This exact method worked 2 days prior on a test batch of imports.
So I'm clear main goal right now is to have a way to import edited pages to a website and still have the partial translations.
I have 2 sites, 1 with old translations, 2 page where I need to import updated pages.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Sorry for the misunderstanding.
In fact, the WP Export includes the post ID and if you remove the old posts, then the new imports usually will use the same IDs.
It seems to me we have a bug here, that occurs when running the final import step to connect the imports.
What seems to work out is:
- Go to WPML > Export & Import, select that you are exporting the content from this site, and set the WP Export option as the method.
- Now, export your posts. The export will include original posts and translations.
- Do not delete any posts. Simply import the same file after having made the adjustment. Only make sure to not change the post ID and I would also not suggest changing the post slugs.
- Now, import the same file again but do not run the final migration step at WPML > Export & Import.
I will need to run some further tests and will update you once I am done.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hi,
I would like to offer to take a closer look and request temporary access (wp-admin and FTP) to the site to investigate the issue further.
The required fields are below the comment section when you log in to leave the next reply. The information you provide is private, meaning only you and I can see and access it.
IMPORTANT
Please be sure to back up the site and database before granting us access.
If you can't see the "wp-admin / FTP" fields, your post and site login details will be set to "PUBLIC". DO NOT publish the data unless you see the required wp-admin / FTP fields.
The private reply form looks like this: hidden link
The next time you reply, click on "I still need assistance".
Video: hidden link
Please note that we are obliged to request this information individually on each ticket. We are not allowed to access any credentials that were not specifically submitted on this ticket in the private response form.