Polylang language links for page lost with rewrite & republish functionality
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 53
- Forks
- 38
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 1
Description
Hi
The language links for Polylang language plugin break when using the Duplicate Post plugins Rewrite & Republish functionality. Steps to reproduce:
- Install Duplicate post & Polylang
- Add at least 2 languages in polylang (For example FI & EN)
- Add the Polylang "Language switcher" to the menu
- Create a new page for both language and link them together. For example "Sivu" in FI and "Page" in EN
- If you now go to the Fi page "Sivu" and click the language switcher in the menu, you end up to the linked page called "Page" in english and when you click the language switcher in "Page" you end up to the page "Sivu".
- Use the "Rewrite & REpublish" functionality to one of the pages, for example "Sivu" in FI. MAke some changes and republish
- After republish, when you go to the FI page "Sivu" and click the language switcher, you end up to the linked page called "Page" BUT when you click the language switcher in the "Page", you end up to the front page, which is normal Polylang behaviour, if the other language page is not found. So basicly the link from EN to FI is broken when you use rewrite & republish for the FI page.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the seven steps with Duplicate Post and Polylang, focusing on Rewrite & Republish and the language switcher links. Trace how the republished Finnish page is associated with its English translation. Done means both language links still resolve to the corresponding pages after republishing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100