Closed (duplicate)
Project:
BigPipe
Version:
8.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Support request
Assigned:
Reporter:
Created:
19 Jan 2016 at 12:59 UTC
Updated:
5 Mar 2016 at 23:32 UTC
Jump to comment: Most recent
When accessing a non existing page, with bigpipe enabled, i get following notice.
Notice: Undefined offset: 2 in Drupal\big_pipe\Render\BigPipe->sendPreBody() (line 142 of modules/big_pipe/src/Render/BigPipe.php).
Comments
Comment #2
wim leersThanks for the bug report! Working on reproducing…
Comment #3
mallezieI had it on a clean drupal 8 install. When i enabled devel. The problem did not happen anymore. Perhaps this can help.
Comment #4
wim leersI cannot reproduce this. What's missing from the IS, is that this only happens in case there are no-JS placeholders to be sent, which generally is only when JS is disabled. But even then I can't reproduce this.
The code triggering this PHP notice looks like this:
To trigger the PHP notice that you're seeing, there can be nothing after
$post_scripts_bottom. Quick script to prove this:Running this script reproduces the problem.
But, I do not succeed in getting that last part to be empty. It almost certainly means you're using a custom theme. Because this marker by definition lives before the closing body tag, and I don't see how it could be empty with core's themes:
So: are you using a custom theme?
Comment #5
mallezieThanks for the investigation.
It happened on bartik for me. But when reinstalling D8 i also can't reproduce the problem. My guess is some strange combination of alpha-version test modules created this combination.
Sorry for the confusion, should have tested on a more clean environment.
Comment #6
mallezieComment #7
wim leersThanks for the swift confirmation!
Comment #8
berdirRe-opening, I have the same with 8.1.0-beta1 and big_pipe in core.
I had the same on an access denied page. Specifically, I was on /admin/people and used masquerade to switch to a user without an special permissions. Notice persists on page reloads.
As far as I can tell, doesn't exist at all in the $pre_body string.
The same happens on 404 pages. Normal pages work fine.
I have a large number of modules enabled, this is our install profile. @Wim, if you contact me, we can try to debug this together.
Comment #9
wim leersAh, yep, @mr.baileys reported the same as #8 at #2679867: BigPipe causes PHP notices with JavaScript disabled on error pages. Thanks to his detailed report, I was able to fix it. #8 matches his description exactly. Therefore, tentatively closing this as a duplicate. If #8 turns out to be a different bug (i.e. if #2679867 doesn't fix it), feel free to reopen this!