0

Let's say you've got a bunch of entries in the "Original Generic Page" channel, which are getting replaced by pages with the same URLs in the "New Generic Page" channel. Assume also that entries are linked to one another in various ways (anchors in Wygwam fields; relationships via Playa fields, mainly).

For example, when the old "About" page (entry 5 in the Original Generic Page channel) is closed and replaced with the new one (entry 2000 in the New Generic Page channel), is there a good method for updating all of the other entries that previously referenced entry 5 to point to entry 2000 instead?

This change-over isn't happening all at once, and I suspect it'll be ongoing for quite a while as different channels/layouts are introduced over time.

We're using Structure and Publisher (site is multi-lingual) to possibly complicate things further.

Thoughts, any? Are there any add-ons that can help manage this?

1

Since Publisher is installed it just means whatever is updated in exp_channel_data also needs to occur in exp_publisher_data for each corresponding entry. Same for exp_sites (site_pages column) and exp_publisher_site_pages.

Are all the entries Structure based? If they are, and they all share the same URL, then it means you just need to update the entry_ids in the site_pages array. So you may need to create an array map of all the old entry_ids to the new entry_ids, and iterate over the site_pages array and make the updates to that array, then save it back to the database.

1
  • Interesting; I wonder if I could put something together that would look for entries that are closed and have the same Structure URL as an open entry, and then update the fields appropriately so we wouldn't have to do several rounds of this manually. Sep 15 '15 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.