statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

"Generate new ID" button only generated a new ID for the main locale, but does not update the other locales #2490

Open kije opened 4 years ago

kije commented 4 years ago

Describe the bug When clicking the "Generate new ID" in the CP (when having pages with duplicate IDs), Statamic only updates/regenerates the id for the main locale. The other locales keep their old id, resulting in strange behavior when trying to edit the localized content of such a page afterward.

To Reproduce Steps to reproduce the behavior:

  1. Create a statamic site with 2 ore more locales
  2. Create a page with localized content
  3. Manually duplicate that pages (in the filesystem)
  4. In the CP, go to "Duplicate IDs" and click "Generate new ID" for one of the pages
  5. Look at the page files on the file system, you should see that only the main locale file of that page has a new ID. The localized files have still the old ID

Expected behavior Clicking the "Generate new ID" button in the CP should also assign all localized versions of the page the new ID.

Environment details (please complete the following information):