Error when restoring if the default language is in the directory
-
When restoring the site from a backup, all links to other pages of the site in the default language, when a directory is also created for this language, are changed to links without this directory. For example, links like test.com/en/page are changed to test.com/page. I contacted WPML plugin support, because the directory for the default language is created through it. I got the following answer:
Following your instructions, I created a new page and added a link to another page within it. Then, I created a backup using AIO Migration and restored the backup. In the English version, I noticed that the default language directory was removed.
However, when I checked the AIO Migration package, I found a package.json file and noticed that the SiteURL and HomeURL configurations are different. This mismatch in the HomeURL configuration may not have been correctly interpreted during the restoration process, leading to incorrect links.
Interestingly, when I created the package using the Duplicator plugin and restored it, I didn’t encounter this issue. The internal links in both the default and other languages were displayed correctly.
Therefore, the issue might be specific to the All-in-One Migration plugin. Could you please try using the Duplicator plugin again? In the meantime, I recommend reporting the issue to the AIO Migration plugin support team and asking them to investigate this scenario. They might be able to provide a better solution in this case.
Accordingly, I am contacting you regarding this issue.
In my particular case, I reproduced the error for WPML support as follows. I specified the use of a directory for English, which is the default language. Then I created page tst-2 (en/tst-2), translated it into French and Spanish, added it to the exclusion blacklist (this is a WPML feature to keep the link unchanged in all languages), created page 148-2 (fr/148-2) in French, linked it to page en/tst-2, translated page 148-2 into English and Spanish, and verified that the exclusion blacklist worked correctly, the link in all languages still pointed to the English page despite the existence of translations. I then backed up the site and restored it from the backup and found that the link to the en/tst-2 page (which is on page 148-2) had changed to tst-2 everywhere, with no directory.
- You must be logged in to reply to this topic.