statamic / ideas

๐Ÿ’กDiscussions on ideas and feature requests for Statamic
https://statamic.dev
31 stars 1 forks source link

Make Duplicator action work for multi-site #942

Closed duncanmcclean closed 8 months ago

duncanmcclean commented 1 year ago

Before the Duplicator PR (statamic/cms#6307) was merged in, the ability for it to work on multi-sites was removed.

Now that I've archived my Duplicator addon, there's no way for people who need it to work on multi-site to upgrade to 3.4 (other than me un-archiving my addon and tagging another release).

Jason left some context on the PR which I've copied in here to prevent going between this issue and the PR ๐Ÿ˜†

I'm disabling the ability to duplicate entries when you use multi-site, temporarily.

The existing functionality was a bit ambiguous and to some people it may not work like you'd expect (myself included).
e.g. https://github.com/duncanmcclean/duplicator/issues/41 - the person who asked for the feature.

Gotta figure out how to handle the different scenarios. Like....

If you duplicate an entry that has localizations, should they also get duplicated?
If the entry wasn't localized into all sites, should the new entry get localized into all sites, or only the ones the original was localized into?
If you duplicate a localized entry, what do you do with its origin?
What if you just wanted to just localize an entry into another site, you might think the duplicate action would do that.
Disabling for multisite will at least let this feature get merged so you can start using it, and we can figure out multisite later.
GertTimmerman commented 1 year ago

Ah, this makes sense, i was looking all over the place where this functionality was because i also had removed the Duplicator addon.

PatrickJunod commented 1 year ago

Really looking forward for this functionality. Here are my 2 cents on that:

Entry only in one language

If the entry is only in one language, you can simply duplicate it

Entry in multiple languages

If the entry is in multiple languages, when you copy it, a modal opens up and let you select (checkboxes) the other languages than you also want to copy.

Based on that here are a few thoughts:

If you duplicate an entry that has localizations, should they also get duplicated?

The user could choose with the modal which localizations he wants to also get duplicated

If the entry wasn't localized into all sites, should the new entry get localized into all sites, or only the ones the original was localized into?

Same as before, the user could choose which localizations should be duplicated. The ones that does not exist should not be selectable with a clear indication that the page does not exists in this language.

What if you just wanted to just localize an entry into another site, you might think the duplicate action would do that.

If you show the user correctly that the duplicate will be made on the same site, it should not be an issue ?

Thanks for your work by the way ! Cheers,

duncanmcclean commented 1 year ago

In the meantime, I've updated my Duplicator addon so it's compatible with Statamic 3.4 to allow you to continue using the 'Duplicate' action in your sites.

If you've not already, add a ๐Ÿ‘ reaction to this feature request so the Statamic Team know its something people want to see added.

Sennik commented 1 year ago

Thank you! You saved my day!

GertTimmerman commented 1 year ago

In the meantime, I've updated my Duplicator addon so it's compatible with Statamic 3.4 to allow you to continue using the 'Duplicate' action in your sites.

If you've not already, add a ๐Ÿ‘ reaction to this feature request so the Statamic Team know its something people want to see added.

Thank you, you have made my content creators colleagues very happy!

PatrickJunod commented 1 year ago

In the meantime, I've updated my Duplicator addon so it's compatible with Statamic 3.4 to allow you to continue using the 'Duplicate' action in your sites.

If you've not already, add a ๐Ÿ‘ reaction to this feature request so the Statamic Team know its something people want to see added.

Awesome, thanks a lot !

vaites commented 11 months ago

If you are using the Eloquent driver, the Duplicator addon has some issues (see https://github.com/duncanmcclean/duplicator/issues/61). Please, verify this before enabling this feature for multi-site...

duncanmcclean commented 10 months ago

I've opened a PR in Statamic to make the Duplicator work in multi-sites, see statamic/cms#8665.