-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft "Update Entry" opaque behavior in multi site setup (Could lead to unexpected content changes) #4642
Comments
Quick update – this is marked as an enhancement because it is currently working as intended. Drafts in Craft 3.2+ now store content for all sites, as opposed to just the site the draft was created from. When you apply a draft, it is expected that all sites’ content would be updated because each of those sites could contain changes within the draft. That said it is clearly leading to unexpected consequences, so it’s worth revisiting. |
@brandonkelly - Thank you for considering bumping this issue up in priority. Unfortunately, the way "Drafts" has been designed for Craft 3.2 breaks the basic translation workflow model for any content managers who want to update and manage their Target Entries and Sites on an individual basis. We will put together some generic professional translation workflow details further explaining the need for a solution to this issue and will share with you soon. We look forward to discussing this further, but we think one potential option for Craft to fix this issue would be to allow for single Drafts to be updated independently from each other across multi-sites. Reference 'closed' ticket: #4811 |
@brandonkelly - Do you think it could make sense to add a default I see how draft propagation can be useful in certain workflows but compared to previous versions of Craft, I think it can be confusing when a user creates a draft that auto-propagates when expecting it to be site-specific. Thoughts? |
Ditto what @ifrimere said. Am I correct in thinking that content managers in different languages have to work off the same draft or else they run the risk of overwriting each other's content? |
I would just like to add more priority to this. When the editor saves the entry without creating a draft, saving only the language works well. |
There should be a config option to go between the current functionality (versions and drafts and propagate across sites) and the functionality that sparked the change here: #2669 |
I'll also add that switching section settings back to "Only save entries to the site they were created in" shouldn't automatically delete all entries in the other sites as that creates a whole different set of issues. |
Very true. Have been hammering my head on this when a client told us their translations got overwritten every time they modified an entry, apparently after they previewed it first (which automatically creates a draft), only to find out this is default behaviour... Is there any short-term solution on how this can be avoided? We can't afford having this client lose their translated content every couple of days by just previewing and updating an entry.. |
|
@brandonkelly I too believe this needs more priority than an enhancement for a next release. It currently breaks our clients content-editing workflow as they are losing already translated content. Unless there is a way that I'm not aware of right now in that we can change something in our structure / field settings that could prevent this from happening? Thanks a lot for looking into this! |
Hmm apparently I now only experience this issue in Neo fields.. Of which I've created an issue here => link |
This is now resolved for Craft 3.4!
Change tracking is built on top of delta update support (#5146), so these features will only be available to drafts that were created after updating to Craft 3.4. To help test, change your "require": {
"craftcms/cms": "3.4.x-dev",
"...": "..."
} Then run |
@christianruhstaller and @ifrimere, did this update resolve your issues? If I understood Christian's initial request, this is still a major unresolved issue if multiple site authors are working on the same entry. Screenshare example: https://download.hamiltonsupport.com/wl/?id=DNEmxczbYGZA0kIzcf42asHvQ1LLOhtu This is the dilemma as I understand and experience it:
I guess my question is has anyone figured out an acceptable procedure for their users to work on the same entry and not accidentally publish each others drafts? |
@huelabs in the scenario you describe above, the draft changes get applied simultaneously because you are working within the same "EN Draft." Ideally, you should be able to create multiple drafts, merge content updates that have occurred since draft creation, and publish them asynchronously. However, Craft still has issues with merging localized content into drafts, particularly Matrix fields #5503, so that may not be a viable option.
If you're referring to the https://github.com/AcclaroInc/craft-translations plugin, we have a solution to support asynchronous draft publishing while avoiding the content overwrite issues. As long your "nested" block types (i.e., Matrix, SuperTable, Neo, etc.) are localized (stored on a per-site/language) basis, you can publish drafts created through the plugin on a per-site/language basis without content getting reverted or overwritten. |
I believe we still have some serious issues when creating multiple drafts by multiple authors. I could be totally off here, but any clarification would be super useful. Here's a new screen share with 3 scenarios: https://download.hamiltonsupport.com/wl/?id=nWwwOiTDNwiwWH8OreZ5NUvloahfpQ8N |
@huelabs - scenarios 2 & 3 are a tough challenge to watch in your shared video b/c putting myself in the shoes of a content manager, source content should never unexpectedly revert to a previous version just b/c target content changes in any way. But maybe there's something in the Craft internal loc workflow I'm not aware of. @sidedwards - do you have any recommendations for @huelabs to better enable simultaneous content (not structure) updates to source/target entries whereby the source entry won't get changed in an undesirable way? |
Has there been any updates on this because as far as I can see this is still a major issue in CraftCMS version 3.7.13 and is causing us headaches. Our use case is: Site A Are both sites in English, in different groups and hosted on different domains. Reverting the content to an earlier version on Site A also changes the content for Site B and vice versa. Any help would be massively appreciated. |
@JamesNock It’s not possible to revert an entry’s content in just one site. When you revert a prior revision, all of that revision’s content across all sites will be reverted, not just whatever site you are looking at. |
Thank you very much for confirming this to be the case @brandonkelly. As far as I can tell, it doesn't actually revert the other sites to the earlier version that they were on but actually replaces their content with that which is in the revisiion you just chose. i.e. Site A in January had an entry with a title of 'TITLE A Jan' Site A in February had an entry with a title of 'TITLE A Feb' If, in March, I change the revision of Site B to be that of January's then I thought the expected behaviour would be: Site A title stays as 'TITLE A Feb' Your comment suggests that it will actually be 'TITLE A Jan'. But in fact it will actually be 'TITLE B Jan'. I hope that helps in some way and that my contrived example makes some kind of sense because something feels off here. |
@JamesNock Just tested this, and both sites’ titles are getting reverted to their prior versions as expected on my end. Make sure you’re running the latest version of Craft, and go to Settings → Sections and edit the entry type you’re working with, and ensure that its Title Translation Method is set to “Translate for each site”, if that’s the behavior you want. |
Description
If you have a multisite Craft installation and you want to work with drafts the behavior when updating an entry from a draft is not what a normal user would expect and could lead to changed content on the entry on a different site.
If you create a draft for an entry this draft will be created for all the sites (If configured) and this is expected. Now you want to use this draft only for the english site. This draft is scheduled to be published in 3 days. In the meantime you fix an error on the german site of the same entry (not via the draft) und save the entry.
After 3 days you will publish the draft from the english site. The english sites draft is published and works perfectly. But what you do not know is that your fix on the german site was overwritten by the german sites draft entry which was not updated by the fix you made on the german entry which is in my opinion a valid and practical workflow.
Steps to reproduce
Observed behavior
After you publish the draft your changes on the german sites are overwritten by the state of the german draft
Expected behavior
You only want to publish the draft for the english site and not the german site.
Actually it could be quite confusing that a draft will get automatically created for another site.
A typical use case could be a promo action only for the us site and not the german site.
I think this "feature" needs some refinement.
Additional info
The text was updated successfully, but these errors were encountered: