Closed (duplicate)
Project:
Drupal core
Version:
8.1.x-dev
Component:
big_pipe.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
21 Jan 2016 at 16:57 UTC
Updated:
9 Mar 2022 at 12:30 UTC
Jump to comment: Most recent
Comments
Comment #1
Anonymous (not verified) commentedivanjaros created an issue. See original summary.
Comment #2
wim leersI'm 99% certain this is caused by #736066: ajax.js insert command sometimes wraps content in a div, potentially producing invalid HTML and other bugs.
To be 100% certain, can you please copy/paste the part of the HTML response starting at
until the very end?
Also: while this is definitely a bug, it also means you're testing with:
Comment #3
Anonymous (not verified) commentedCan you be more specific? My theme is not broken in any way that I can see and it certainly is not poorly developed, on the contrary.
Comment #4
wim leersFirst:
Comment #5
Anonymous (not verified) commentedThi is just one block since there is too much text to paste in here(unicode is converted).
Comment #6
wim leersThanks, that's enough :)
Look at this bit:
decoded, that says:
<div class="myentity-search-block-form block small-8 columns" data-drupal-selector=…In other words: no wrapping
<div>. Hence this proves my hypothesis in #2 that this is effectively a duplicate of #736066: ajax.js insert command sometimes wraps content in a div, potentially producing invalid HTML and other bugs.Comment #7
Anonymous (not verified) commentedWrapping div si there ..
or:
Comment #8
wim leersYour theme is using selectors that are brittle. If they were more robust, then an unexpected additional
<div>level, it wouldn't break.And since this problem is not specific to the BigPipe module, but is a generic problem you'll see with just about every bit of content that is inserted by the AJAX system, that means that the brokenness you reported when using BigPipe must also exist when using other modules loading inserting content using the AJAX system. Perhaps nothing is breaking because those parts just happen to use different selectors. But that's merely accidental, because anything could be loaded via AJAX.
Hence what I said at the bottom of #2. It's just an observation of the interaction of the markup with the CSS, it's not personal.
Comment #9
Anonymous (not verified) commentedSo you're saying that because I have blocks that use data- attributes AJAX is "broken"?
Comment #10
wim leersNo, that's not at all what I'm saying. Where did I say that? Please read #736066: ajax.js insert command sometimes wraps content in a div, potentially producing invalid HTML and other bugs.
Comment #11
tic2000 commentedThe issue is the "\n" at the end. And that happens even with the default theme Drupal 8 comes with.
That new line is added every time the insert command is called with a render array.
I submitted a patch in #736066-68: ajax.js insert command sometimes wraps content in a div, potentially producing invalid HTML and other bugs that should fix the issue and also give developers more freedom on when and what wrapper to use.
Comment #12
Anonymous (not verified) commentedComment #13
wim leersComment #14
wim leers#2738685: BigPipe leaves wrapper <div>s in place, because AJAX system leaves them — this can cause some CSS to break is a duplicate of this.