Closed (duplicate)
Project:
Drupal core
Version:
8.3.x-dev
Component:
quickedit.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
1 Aug 2014 at 22:57 UTC
Updated:
12 Feb 2017 at 23:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jrockowitz commentedI added the steps needed to reproduce the issue.
There seems to something off with how the field ids are being found via the CSS selector but I am not sure what exactly is the going on in the processField(fieldElement) function.
I think the provided patch is just suppressing the issue and resulting in block and/or certain fields not being quick-editable.
Comment #2
wim leersThis is a symptom of another bug: #2284917: In-place editing of custom blocks broken *again* (because attributes and contextual links of custom blocks are lost).
We're working on a solution there.
Comment #3
Kyna commentedNote, bug visible after cache clear.
Comment #4
berdirIt might be a symptom, but we are still seeing this with a version that has #2284917: In-place editing of custom blocks broken *again* (because attributes and contextual links of custom blocks are lost).
Maybe it is something that just happens on our site, because of different markup or something, but I still think that quickedit should not cause an error here, because that breaks JS completely on the affected page.
So re-opening, would be great to have at least the fix from above, or maybe something else, that logs an error that helps to track down what happens/is missing.
Comment #5
manuel garcia commentedJust confirming this right now on HEAD.
I've tested this using stark theme, but it happens also with Bartik. You can see the error by setting up the a view with ajax pagination, and clicking on next on the pager.
This bug basically breaks ajax pagination, and I'd guess other things that rely on behavoiurs..
DrupalBehaviorError: detach:unload ; quickedit: fieldModel is undefinedComment #6
droplet commentedCan't reproduce the reported issue.
#5 looks like a different bug.
Comment #7
edwardchiapetI had the same issue in a View using QuickEdit and an AJAX pagination, and the update to 7.x.1.3 fixed it for me. All the console errors noted by Manuel Garcia are now gone, and AJAX pagination is working flawlessly now.
Comment #8
wim leersComment #9
moleculefff commentedThis can also occur if you are rendering a node in a page template that does not
As it's missing the content div
Comment #10
rgpublicI've created a more recent patch for Drupal 8.1.3. It also happens for me when my template doesn't include $page['content'] but renders the fields more specifically - but hey, that's what templates are for, aren't they? So, I think this simple patch should be included with Drupal core. This will avoid ugly unnecessary errors in these cases since quickedit is working great otherwise.
Comment #11
berdirComment #12
berdirComment #13
agoradesign commentedabsolutely agree with rgpublic. It is so damn easy to trigger this error. The patch makes quickedit far more fault tolerant!
Comment #14
phjouI have reproduced this error with a node which has a field reference to a custom block. When the block is rendered, the "TypeError: entityElement.get(...) is undefined" is triggered.
I think that quickedit being more tolerant is a good idea.
Comment #15
manuel garcia commentedHere is a patch that applies properly to 8.1.x
Comment #16
phjouThanks Manuel, the patch works again :)
Comment #17
heddnWhile this fixes the problem, it is missing comments.
Comment #18
wolffereast commentedRe rolled the patch from 15 against 8.2.x and added an initial stab at some descriptive comments.
Comment #19
manuel garcia commentedComment looks clear enough for me, taking the leap and marking it as RTBC.
Comment #20
wim leersWe can now actually have test coverage for this to prevent this from ever breaking again. So let's do that.
Comment #21
Benia commentedPassed in 8.2.0 and 8.2.1.
Comment #22
Benia commentedCan more people please test this? So needed in 8.2.4...
Comment #23
wim leersOnce #2828528: Add Quick Edit Functional JS test coverage is in, we have a solid foundation to write more functional JS tests. That will make addressing #20 a lot easier. We should be able to just codify the STR. Unfortunately, that means blocking this issue.
@Benia: we don't need more manual testing. We need automated testing.
Comment #24
manuel garcia commentedThanks @Wim Leers for that, had a brief look at the patch, it will indeed make testing this far easier
Comment #26
berdirDuplicate of #2551373: contextual.js and quickedit.js should fail gracefully, with useful error messages, when Twig templates forget to print attributes and there's at least one more I think. Also, @catch there said that we don't need automated test coverage for it, as creating this scenario would be pretty complex and not worth it.