wagtail-localize icon indicating copy to clipboard operation
wagtail-localize copied to clipboard

Cascade deletions/unpublishes to languages?

Open kaedroho opened this issue 5 years ago • 10 comments

If someone deletes an original page, should the translations be deleted as well?

Perhaps this should be an option. But what if the user doesn't have permissions to delete pages in the translated section?

kaedroho avatar Oct 03 '19 10:10 kaedroho

@kaedroho what is the current behaviour? I'm seeing that when creating pages programmatically, translated pages seem to get created automatically even though nobody translated it in the Wagtail Admin and then when deleting the page on Wagtail Admin the "untranslated" page remains there. Anyway to modify this and get the "mirrored" page deleted as well?

vladox avatar Sep 12 '21 13:09 vladox

@vladox When you have tree synchronisation enabled, Wagtail Localize will create alias pages in any locales configured to "Sync from" the locale a new page was created in.

If the source page is removed after these alias pages are created, the alias pages will automatically turn into regular pages.

If the pages were translated. The translated pages would start using the regular Wagtail editor instead of Wagtail Localizes custom translation editor after the source page is deleted.

I'm not sure if we can always delete the mirrored page though, what if the mirrored page has a child that the source page doesn't have?

kaedroho avatar Oct 12 '21 14:10 kaedroho

@kaedroho going back to your original question, I think it should be a configurable option either in the settings or during the deletion of the source page.

vladox avatar Jan 17 '22 13:01 vladox

Hey both, there is a feature planned that would do this, based on a setting. Cannot give ETAs just right now..

@phildexter and I feel this should be Wagtail core rather than wagtail-localize, but happy to be convinced otherwise

zerolab avatar Jan 17 '22 15:01 zerolab

Imagine this situation. I hire a copywriter SEO specialist in English. I only want to give him access to the english not to the dutch, french ... version.

(just giving some ideas) A. when he creates a page I would like to see this in Dutch unplublished B. when she deletes a page I would not like it that my dutch page is also deleted. Can we have some warning in admin "marked for deletion?" "Action required" where the copywriter can leave a message behind? (I deleted this page because of ...)

Maybe there should be programmatically setting in you can add. TRANSLATIONS_AUTO_DELETE = False/TRUE

onno-timmerman avatar Jan 20 '22 13:01 onno-timmerman

Thanks for the feedback!

My understanding is that currently, assuming default functionality, when someone creates a page in English, an Alias page would be created in Dutch too. That Dutch page then shares the same publish status as the English page (e.g. if English is published, the Dutch is published too). So, in the scenario above, although the SEO specialist can only see the English tree, they are actually controlling what is happening to other mirrored pages in other locales. Using this logic, I feel like alias pages should be deleted if the English page is deleted. Does that part make sense?

Then there is a secondary situation. Someone translates the Dutch page. At this stage it has it's own publishing status. Kind of it's own lifecycle - where you can update it on it's own. The SEO specialist has no way to update or change it, or even to push new synced field to it. In this case I can see that if the SEO specialist deletes the English page, we might want to prevent the mirrored pages (e.g. Dutch) from being deleted.

phildexter avatar Jan 20 '22 13:01 phildexter

Imagine you work in a team. And the dutch translator is taking 1 month off. Then english guy is producing 20 artickels during that month. Would these then be published and shown in English on the Dutch site? I think that would be bad for SEO?

onno-timmerman avatar Jan 20 '22 14:01 onno-timmerman

Yep I think that is a common situation at the moment with alias pages, but I don't think it causes issues with SEO. @kaedroho would probably be better to explain but I think search engines are used to this. My understanding is that tags are used to denote that it's a localised version of the content.

phildexter avatar Jan 20 '22 14:01 phildexter

By way of update, https://github.com/wagtail/wagtail/issues/7592#issuecomment-1034790403 is the approach we're taking with core. PRs for wagtail-localize to follow.

e.g. see https://github.com/wagtail/wagtail/pull/8002 for deletion.

zerolab avatar Mar 09 '22 14:03 zerolab

Full support for this - please also include translated snippets.

Maybe a 3-way configurable option (always, never, prompt first) is a good solution. Global setting with ability to override at model level would be good also (eg, never for core pages, prompt on blog etc).

Some kind of visible warning flag on translated objects if their parent has been deleted would be useful.

enzedonline avatar Mar 11 '22 14:03 enzedonline