BigPipe may break images from getting displayed to authenticated users

Created on 26 July 2019, over 5 years ago
Updated 27 April 2023, over 1 year ago

This is a tough one to describe, as it is somewhat conditional.

Using Views as blocks. The view is of a Content Type with three sections (not using Paragraphs or Field Collections), each with a image field with a default image and a formatted text field. If the text field is present it is re-written with an element for the Background Image Formatter to target (targets use unique css identifiers - the Image field is not included in this and no Tokens for the Image field were used).

When a user is anonymous, everything is fine and all background images are displayed in all possible variations (one, two, or all three sections).

When the user is authenticated, then there is a much different behavior. If only one re-written field/element is rendered then the background image is rendered. Reviewing the page source shows all three style tags in the head with the correct css settings. If more than one field/element is rendered then no background images are visible and the style tags have not been rendered in the head of the document.

It does not matter if the logged in user has access to the admin toolbar or any other drupal overlay things. All permissions are install default and it doesn't matter if the user has any elevated permissions. (Can it be permission based if it works with one image but not multiple?)

Module was originally installed as 1.6, but has been updated to 1.10 with no change in behavior. On Drupal 8.7.1.

*****

Edits: add correct module version & add drupal version & a word.

More edits: I've been digging around the module and I can see it is building the elements correctly in viewElements() for all cases, and firing when required.

πŸ› Bug report
Status

Active

Version

1.10

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States jmouse888

    Three and a half years later, still having the same problem. Running Drupal 9.5.8 and bg_image_formatter 8.x-1.16,

    However, some how it's only happening our front page. All internal pages are rendering the inline styles just fine, even with authenticated users. Only thing different for the front page is it's using a different page--front.html.twig. The rest of the site is using page.html.twig

    From browser source code, BigPipe are loaded for both page templates. Don't know why it will work with one but not the other.

    Uninstalled BigPipe and everything is working.

    May be if I trace the difference between the two page templates may result some clue. Will investigate further down this route.

Production build 0.71.5 2024