-
Notifications
You must be signed in to change notification settings - Fork 639
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
[4.x]: Autosave Drafts reloads all other languages of an entry, not just the language where the change was made #14814
Comments
This is working as intended. The other tab will get refreshed because something about its content may have just changed, e.g. any non-translatable fields, or things like the entry’s post date. |
Ok, that makes sense... so what about |
That hasn’t been the case nearly as much in Craft 4+, and we’re continuing to find ways to improve performance with each major release, and the plan is to remove it once long save times are fully resolved. So it’s a performance hack; not meant to be an alternate workflow you might want to opt into. |
I've updated the site in question to Craft 4.x, and the auto-refreshing is more disruptive than expected. The content is long-form, so smallish WYSIWYG fields don't really cut it, which is why the content editor has the WYSIWYG fields in their full-screen modes. There are multiple language windows open in parallel, each with their WYSIWYG in full-screen mode. Whenever changes are registered in any of the open windows, they all refresh, which exits them out of full-screen and reloads their pages, losing the place in the long-form content being edited. For now, what they're doing is pasting the English reference content into a temporary entry, and only editing one translation at a time. Obviously, this greatly slows down the editing process. So this is a multi-tasking, content-editing related issue, made difficult by the Autosave Drafts feature. Do you have any suggestions? |
Hey @proimage, couple updates:
You can update to Craft 4.10 / 5.2 and the Redactor change right now by setting the following constraints in composer.json, and then running // Craft 4.10
"craftcms/cms": "4.10.x-dev as 4.10.0-alpha",
"craftcms/redactor": "3.x-dev as 3.1.0-alpha",
// Craft 5.2
"craftcms/cms": "5.2.x-dev as 5.2.0-alpha",
"craftcms/redactor": "4.x-dev as 4.1.0-alpha", 1 Other tabs will still reload when a provisional draft is first created in the active tab, or when a draft is deleted/applied, because it’s crucial that all tabs are working with the correct revision at those points. 2 I’m assuming that’s what you’re using, but the same logic could easily be applied to other rich text editors (besides CKEditor, which doesn’t have first party fullscreen mode). |
Thanks, @brandonkelly, that looks like those changes should address the core issue. :) As I understand it, Redactor scroll positions will be kept more consistent due to a bugfix, and in full-screen mode (which I presume cannot be automatically re-triggered when an auto-save + page refresh happens), there's a way for Redactor to pause autosaving. My main question is CKEditor. With Redactor being deprecated, I had planned on transitioning over to CKE either under Craft 4.x or 5.x, but if CKE has no full-screen mode... is there a plugin that provides that functionality? |
Craft 4.10.0 and 5.2.0 are out, as well as Redactor 3.1.0 and 4.1.0. |
What happened?
Description
My client has a multi-lingual site (~12 languages), and the weekly article they post gets translated into almost all of those languages. Perhaps needless to say, their Content Editor doesn't speak/read all of those 12 languages. They just receive the original English, apply consistent semantic formatting, and post it.
Meanwhile, multiple translators work on translating the article into their own languages. When each translation is ready, it's sent (usually as a Word doc, so badly in need of semantic formatting) to the Content Editor.
The Content Editor then opens two side-by-side tabs of the article in the backend: one English, and the other in the language they're working on. Therein lies the problem with the Autosave Drafts feature, however, since when, say, a Spanish version of the entry is autosaved, the tab with the English version also gets refreshed.
So, is there a future-proof way going forward (I know
autosaveDrafts
is deprecated in Craft 4.x for some reason) to either disable autosaving of drafts, or perhaps better, to not refresh all language versions of an entry when a draft is made in some other language?Steps to reproduce
Expected behavior
Autosaving of a draft entry in one language would not cause the Edit Entry page of all other languages to reload.
Actual behavior
Autosaving of a draft entry in one language DOES cause the Edit Entry page of all other languages to reload.
Craft CMS version
4.8.8
PHP version
8.2.17
Operating system and version
Linux 4.19.286-203.ELK.el7.x86_64
Database type and version
MySQL 23
Image driver and version
Imagick 3.5.0 (ImageMagick 6.9.10-68)
Installed plugins and versions
The text was updated successfully, but these errors were encountered: