Problem/Motivation
The patch from #2903524: Don't add quickedit to displays where entities have a forward revision. removes the data-quickedit-entity-id attribute from non-latest revisions, but always adds the data-quickedit-field-id attribute even if the revision being viewed is not the latest revision. This leads to the JS error "Quick Edit could not associate the rendered entity field markup" when viewing a non-latest default revision, because the entity markup has data-quickedit-field-id attributes but no parent data-quickedit-entity-id attribute.
Replication steps:
- Install the Standard profile
- Enable Content Moderation
- Enable the Editorial Workflow for Articles
- Create a published Article
- Create a draft of that Article
- View the default revision of the Article
- See a JS error in your console
I'm setting the priority of this to Major to match #2903524: Don't add quickedit to displays where entities have a forward revision.. In my opinion 8.4 should not be released until this is fixed.
Proposed resolution
Remove the data-quickedit-field-id attribute on non-latest revisions.
Remaining tasks
Review provided patch.
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 2910005-1.patch | 2.05 KB | catch |
| #6 | 2910005-tests-only.patch | 1.08 KB | catch |
| #2 | 2910005-1.patch | 2.05 KB | samuel.mortenson |
Comments
Comment #2
samuel.mortensonComment #3
sam152 commentedThis looks good to me.
Comment #4
wim leers👍
It'd be good to see a failing test-only patch though.
Comment #5
wim leersAlso note this is essentially a follow-up for #2903524: Don't add quickedit to displays where entities have a forward revision., this patch shows we didn't completely solve the "Quick Edit + Content Moderation" integration problems there.
Comment #6
catchTest-only patch + the original to keep the issue green.
Comment #9
catchumm
Comment #10
lauriii#4 includes a easty to understand explanation of the nature of this bug fix, thanks @Wim Leers!
This seems like a non-risky issue which potentially could be backported to 8.4.x. I'm waiting for confirmation from another committer before cherry picking.
Committed 4dee162 and pushed to 8.5.x. Thanks!
Comment #12
catchAgreed we can cherry-pick this to 8.4.x once it's back open now that 8.4.0 is out.
Comment #13
catch