Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Steps to reproduce:
- Install D8 HEAD (http://drupalcode.org/project/drupal.git/commitdiff/396cacba7cbebb380e78... or later).
- Create an article node with a non-empty body.
- Go to
/node/1
. - Click the contextual links, notice that "Quick edit" is missing.
- Look at the browser console, notice the JS errors.
- Look at the
/quickedit/attachments
XHR, notice that it's printing a PHP fatal!
This was introduced by #2030605: Expand Editor with methods, but stayed under the radar because it only happens when you have a page that uses editor.module
's in-place editor. For example: this bug does not happen on the frontpage of a default install, but it does on full node pages.
That being said, it should've been caught by a test.
Proposed resolution
Fix it + write regression test.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
#1 | editor_breaks_quickedit-2263351-1.patch | 2.69 KB | Wim Leers |
Comments
Comment #1
Wim LeersThe "test only" patch should fail.
Comment #2
BerdirI was wondering what that didn't work (anymore) :)
As did @EclipseGc in IRC...
Not specific to this fix, but wondering why this doesn't load all editors together and foreaches on that, then it simply won't do anything if there's nothing?
There is no editor_load_multiple(), but it can use the entity manager or entity_load_multiple().
#2190313: Add $EntityType::load() and loadMultiple() to simplify loading entities would help, which currently doesn't deprecate/replace entity_load() (please review that :))
Comment #3
dawehnerJust learned a new thing
Comment #4
EclipseGc CreditAttribution: EclipseGc commentedThis looks pretty rtbc to me, and fixes a huge wtf imo.
Eclipse
Comment #5
Bojhan CreditAttribution: Bojhan commentedHah, I did notice this - thought it was my computer acting up.
Comment #6
webchickCommitted and pushed to 8.x. Thanks!
Comment #8
jcisio CreditAttribution: jcisio commentedNotice: the default.settings.php change should have been part of #2241633: Simplify site-specific service overrides.
Comment #9
Wim Leers#8: Wrong issue?
Comment #10
jcisio CreditAttribution: jcisio commentedNope, it was a notice for a mistake in webchick's commit http://drupalcode.org/project/drupal.git/commitdiff/5f79a75. And it's this issue ;)
Comment #11
webchickHm. Strange. Re-appled that hunk of the diff and committed and pushed to 8.x. Thanks!
Comment #13
jcisio CreditAttribution: jcisio commentedI didn't mean a patch, just a note for whom who do git blame, because I thought that extra note had already been removed in #2241633: Simplify site-specific service overrides. But in fact no. I've just checked again in that issue, catch reverted the commit, but then undid that revert.
So this commit is actually good. Thanks.
Comment #14
Wim Leers