BigPipe doesn't display a block in a specific language

Created on 25 June 2023, about 1 year ago
Updated 18 August 2023, 10 months ago

When looking at a french node (/fr/node/xxx) the primary tabs are displayed.
But if I change the language (/nl/node/xxx) the primary tabs are not displayed anymore.
If I uninstall the BigPipe module, the primary tabs are displayed again in all circumstance.

πŸ› Bug report
Status

Closed: works as designed

Version

11.0 πŸ”₯

Component
BigPipeΒ  β†’

Last updated about 13 hours ago

Created by

πŸ‡§πŸ‡ͺBelgium DuneBL

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

  • Issue created by @DuneBL
  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    Is this reproducible on a fresh Drupal installation or are some steps required to exhibit the bug? What are the primary tabs? Please be specific.

  • πŸ‡§πŸ‡ͺBelgium DuneBL

    The primary tabs are the links created by drupal core to edit or view a node.
    Unfortunately, I have no steps to reproduce this bug on a fresh install. In fact, I have no idea (and time) to check if this problem arise on a clean install. Sorry to not be more specific.

  • πŸ‡¨πŸ‡¦Canada kiwad

    Tested on simplytest

    Create vanilla site FR/NL (D10.1.1)
    Activate Language/Content translation and configure basic content translation
    Go to /fr/node/xxx
    Go to /nl/node/xxx

    I see tabs--primary on both

    I guess more info would be needed to resolve this issue

  • Status changed to Postponed: needs info 12 months ago
  • πŸ‡ΊπŸ‡ΈUnited States cilefen
  • πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί
    • Does this happen in all languages other than the site's default, or in just this one?
    • Can you please set system.site:error_level to ERROR_REPORTING_DISPLAY_VERBOSE and try again? That'd surface log messages immediately on the page, rather than only sending them to the site's log
  • πŸ‡§πŸ‡ͺBelgium DuneBL

    @Wim Leers: This is the default setting on my dev site.
    But I have some more information on the browser console log

    With BigPipe enabled:
    If I display a not translatable node in the site default language: no error
    If I display the same node in another language (in any languages except default), I have a lot of errors in the console (some are coming from bigpipe) and the primary tabs disappeared for some role (not for admin)

    Uncaught TypeError: drupalSettings.bigPipePlaceholderIds is undefined
        bigPipeProcessPlaceholderReplacement http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:21
        bigPipeProcessDocument http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:45
        timeoutID http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:56
        setTimeout handler*bigPipeProcess http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:55
        <anonymous> http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:61
        <anonymous> http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:68
    big_pipe.js:21:9
        bigPipeProcessPlaceholderReplacement http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:21
        forEach self-hosted:203
        bigPipeProcessDocument http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:45
        timeoutID http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:56
        (Async: setTimeout handler)
        bigPipeProcess http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:55
        <anonymous> http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:61
        <anonymous> http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:68
    Uncaught TypeError: l.eu_cookie_compliance is undefined
        <anonymous> http://txs10/modules/contrib/eu_cookie_compliance/js/eu_cookie_compliance.min.js?v=9.5.9:1
        <anonymous> http://txs10/modules/contrib/eu_cookie_compliance/js/eu_cookie_compliance.min.js?v=9.5.9:1
    eu_cookie_compliance.min.js:1:41
    Uncaught TypeError: drupalSettings.simple_popup_blocks is undefined
        attach http://txs10/modules/contrib/simple_popup_blocks/js/simple_popup_blocks.js?v=9.5.9:8
        attachBehaviors http://txs10/core/misc/drupal.js?v=9.5.9:24
        attachBehaviors http://txs10/core/misc/drupal.js?v=9.5.9:21
        bigPipeProcessDocument http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:43
        bigPipeProcessDocument http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:42
        timeoutID http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:56
        setTimeout handler*bigPipeProcess http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:55
        <anonymous> http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:61
        <anonymous> http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:68
    simple_popup_blocks.js:8:28
    Uncaught TypeError: path is undefined
        attach http://txs10/core/misc/active-link.js?v=9.5.9:11
        attachBehaviors http://txs10/core/misc/drupal.js?v=9.5.9:24
        attachBehaviors http://txs10/core/misc/drupal.js?v=9.5.9:21
        bigPipeProcessDocument http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:43
        bigPipeProcessDocument http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:42
        timeoutID http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:56
        setTimeout handler*bigPipeProcess http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:55
        <anonymous> http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:61
        <anonymous> http://txs10/core/modules/big_pipe/js/big_pipe.js?v=9.5.9:68
    active-link.js:11:25
    Uncaught TypeError: drupalSettings.simple_popup_blocks is undefined
        attach http://txs10/modules/contrib/simple_popup_blocks/js/simple_popup_blocks.js?v=9.5.9:8
        attachBehaviors http://txs10/core/misc/drupal.js?v=9.5.9:24
        attachBehaviors http://txs10/core/misc/drupal.js?v=9.5.9:21
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:24
        listener http://txs10/core/misc/drupal.init.js?v=9.5.9:14
        domReady http://txs10/core/misc/drupal.init.js?v=9.5.9:20
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:23
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:26
    simple_popup_blocks.js:8:28
    Uncaught TypeError: path is undefined
        attach http://txs10/core/misc/active-link.js?v=9.5.9:11
        attachBehaviors http://txs10/core/misc/drupal.js?v=9.5.9:24
        attachBehaviors http://txs10/core/misc/drupal.js?v=9.5.9:21
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:24
        listener http://txs10/core/misc/drupal.init.js?v=9.5.9:14
        domReady http://txs10/core/misc/drupal.init.js?v=9.5.9:20
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:23
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:26
    active-link.js:11:25

    Also my name on the toolbar has disappeared (near the user icon to display the profile links)
    With BigPipe disabled:
    The primary tabs and my name near the User icon reapears but there are still console errors on the page (in all languages except site default)

    Uncaught TypeError: l.eu_cookie_compliance is undefined
        <anonymous> http://txs10/modules/contrib/eu_cookie_compliance/js/eu_cookie_compliance.min.js?v=9.5.9:1
        <anonymous> http://txs10/modules/contrib/eu_cookie_compliance/js/eu_cookie_compliance.min.js?v=9.5.9:1
    eu_cookie_compliance.min.js:1:41
    Uncaught TypeError: drupalSettings.simple_popup_blocks is undefined
        attach http://txs10/modules/contrib/simple_popup_blocks/js/simple_popup_blocks.js?v=9.5.9:8
        attachBehaviors http://txs10/core/misc/drupal.js?v=9.5.9:24
        attachBehaviors http://txs10/core/misc/drupal.js?v=9.5.9:21
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:24
        listener http://txs10/core/misc/drupal.init.js?v=9.5.9:14
        domReady http://txs10/core/misc/drupal.init.js?v=9.5.9:20
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:23
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:26
    simple_popup_blocks.js:8:28
    Uncaught TypeError: path is undefined
        attach http://txs10/core/misc/active-link.js?v=9.5.9:11
        attachBehaviors http://txs10/core/misc/drupal.js?v=9.5.9:24
        attachBehaviors http://txs10/core/misc/drupal.js?v=9.5.9:21
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:24
        listener http://txs10/core/misc/drupal.init.js?v=9.5.9:14
        domReady http://txs10/core/misc/drupal.init.js?v=9.5.9:20
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:23
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:26
    active-link.js:11:25
  • πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί
    drupalSettings.bigPipePlaceholderIds is undefined
    

    should never happen 😳

    But then again, even with BigPipe disabled you get

    l.eu_cookie_compliance is undefined
    

    and

    drupalSettings.simple_popup_blocks is undefined
    

    This indicates the problem lies elsewhere.

    Hunch: your HTML markup is invalid. Can you upload the full HTML response for when BigPipe is disabled as a .txt file? πŸ™

  • πŸ‡§πŸ‡ͺBelgium DuneBL

    Here it is.
    Logged in as an admin, without big Pipe:
    I have the NL page (with console errors)
    and the FR page (without console error)
    =>Sorry, I couldn't upload those files even with the txt extension or pasted into a doc file (odt): the ajax stuff quickly appears and disapear after I clicked on the upload button
    =>I have made a compare between FR and NL and I didn't spot anything except regular translation changes

    Here are the errors for the NL page

    Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. modernizr.min.js:3:5914
    Uncaught TypeError: drupalSettings.user is undefined
        <anonymous> http://txs10/core/modules/contextual/js/contextual.js?v=9.5.9:15
        <anonymous> http://txs10/core/modules/contextual/js/contextual.js?v=9.5.9:152
    contextual.js:15:25
    Uncaught TypeError: Drupal.contextual is undefined
        <anonymous> http://txs10/core/modules/contextual/js/models/StateModel.js?v=9.5.9:8
        <anonymous> http://txs10/core/modules/contextual/js/models/StateModel.js?v=9.5.9:45
    StateModel.js:8:49
    Uncaught TypeError: Drupal.contextual is undefined
        <anonymous> http://txs10/core/modules/contextual/js/views/AuralView.js?v=9.5.9:8
        <anonymous> http://txs10/core/modules/contextual/js/views/AuralView.js?v=9.5.9:27
    AuralView.js:8:47
    Uncaught TypeError: Drupal.contextual is undefined
        <anonymous> http://txs10/core/modules/contextual/js/views/KeyboardView.js?v=9.5.9:8
        <anonymous> http://txs10/core/modules/contextual/js/views/KeyboardView.js?v=9.5.9:30
    KeyboardView.js:8:50
    Uncaught TypeError: Drupal.contextual is undefined
        <anonymous> http://txs10/core/modules/contextual/js/views/RegionView.js?v=9.5.9:8
        <anonymous> http://txs10/core/modules/contextual/js/views/RegionView.js?v=9.5.9:38
    RegionView.js:8:48
    Uncaught TypeError: Drupal.contextual is undefined
        <anonymous> http://txs10/core/modules/contextual/js/views/VisualView.js?v=9.5.9:8
        <anonymous> http://txs10/core/modules/contextual/js/views/VisualView.js?v=9.5.9:50
    VisualView.js:8:48
    Uncaught TypeError: drupalSettings.user is undefined
        <anonymous> http://txs10/modules/contrib/quickedit/js/quickedit.js?v=9.5.9:341
        <anonymous> http://txs10/modules/contrib/quickedit/js/quickedit.js?v=9.5.9:374
    quickedit.js:341:25
    Uncaught TypeError: drupalSettings.path is undefined
        <anonymous> http://txs10/core/modules/toolbar/js/toolbar.menu.js?v=9.5.9:8
        <anonymous> http://txs10/core/modules/toolbar/js/toolbar.menu.js?v=9.5.9:89
    toolbar.menu.js:8:20
    Partitioned cookie or storage access was provided to β€œhttps://static.addtoany.com/menu/sm.24.html#type=core&event=load” because it is loaded in the third-party context and dynamic state partitioning is enabled.
    Uncaught TypeError: pathInfo is undefined
        <anonymous> http://txs10/core/modules/toolbar/js/escapeAdmin.js?v=9.5.9:11
        <anonymous> http://txs10/core/modules/toolbar/js/escapeAdmin.js?v=9.5.9:26
    escapeAdmin.js:11:7
    Uncaught TypeError: drupalSettings.ckeditor is undefined
        <anonymous> http://txs10/modules/contrib/ckeditor/js/ckeditor.js?v=9.5.9:192
        <anonymous> http://txs10/modules/contrib/ckeditor/js/ckeditor.js?v=9.5.9:205
    ckeditor.js:192:3
    Uncaught TypeError: l.eu_cookie_compliance is undefined
        <anonymous> http://txs10/modules/contrib/eu_cookie_compliance/js/eu_cookie_compliance.min.js?v=9.5.9:1
        <anonymous> http://txs10/modules/contrib/eu_cookie_compliance/js/eu_cookie_compliance.min.js?v=9.5.9:1
    eu_cookie_compliance.min.js:1:41
    Uncaught TypeError: drupalSettings.path is undefined
        url http://txs10/core/misc/drupal.js?v=9.5.9:101
        fetchMissingMetadata http://txs10/modules/contrib/quickedit/js/quickedit.js?v=9.5.9:258
        attach http://txs10/modules/contrib/quickedit/js/quickedit.js?v=9.5.9:290
        attachBehaviors http://txs10/core/misc/drupal.js?v=9.5.9:24
        attachBehaviors http://txs10/core/misc/drupal.js?v=9.5.9:21
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:24
        listener http://txs10/core/misc/drupal.init.js?v=9.5.9:14
        domReady http://txs10/core/misc/drupal.init.js?v=9.5.9:20
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:23
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:26
    drupal.js:101:5
    Uncaught TypeError: drupalSettings.simple_popup_blocks is undefined
        attach http://txs10/modules/contrib/simple_popup_blocks/js/simple_popup_blocks.js?v=9.5.9:8
        attachBehaviors http://txs10/core/misc/drupal.js?v=9.5.9:24
        attachBehaviors http://txs10/core/misc/drupal.js?v=9.5.9:21
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:24
        listener http://txs10/core/misc/drupal.init.js?v=9.5.9:14
        domReady http://txs10/core/misc/drupal.init.js?v=9.5.9:20
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:23
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:26
    simple_popup_blocks.js:8:28
    Uncaught TypeError: path is undefined
        attach http://txs10/core/misc/active-link.js?v=9.5.9:11
        attachBehaviors http://txs10/core/misc/drupal.js?v=9.5.9:24
        attachBehaviors http://txs10/core/misc/drupal.js?v=9.5.9:21
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:24
        listener http://txs10/core/misc/drupal.init.js?v=9.5.9:14
        domReady http://txs10/core/misc/drupal.init.js?v=9.5.9:20
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:23
        <anonymous> http://txs10/core/misc/drupal.init.js?v=9.5.9:26
    active-link.js:11:25
  • πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    I don't need the final DOM with AJAX updates. I just need the original HTML. Option+command+U in Google Chrome ("View source"), copy/paste what you get into a .txt file and upload it πŸ™

  • πŸ‡§πŸ‡ͺBelgium DuneBL

    Here it is

  • πŸ‡§πŸ‡ͺBelgium DuneBL

    An here is the french without errors

  • πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    @DuneBL Thanks!

    Observations:

    1. The toolbar_menu module causes an ENORMOUS amount of HTML to be transfered on each page load apparently? 😳
    2. You have Twig Debug output enabled. It generates a huge amount of additional markup, using HTML comments. I'm wondering if this problem specifically occurs when there's HTML comments present. Could you please disable Twig Debug, enable BigPipe, and try again? πŸ™
    3. This appears to be using a forked Olivero theme. Can you reproduce it with core's Olivero?
    @malcomio reported a duplicate issue at πŸ› drupalSettings.ajaxTrustedUrl sometimes undefined Closed: duplicate , copy/pasting it here and merged that issue with this one:

    Problem/Motivation

    In some scenarios, BigPipe causes ajax errors where drupalSettings.ajaxTrustedUrl is undefined at https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/misc/ajax.j...

    Uncaught TypeError: Cannot read properties of undefined (reading '') at new Drupal.Ajax

    Steps to reproduce

    This is a strange one - we have observed this on a search API page, with facet blocks

    For some search terms, the facet blocks do not appear, and the JavaScript error appears in the console.
    For other terms, the page loads as expected, with no errors in the console. In that scenario, drupalSettings.ajaxTrustedUrl is populated with the current page URL.

    With the BigPipe module disabled, the error does not occur.

    Other modules enabled which may be relevant:

    * better_exposed_filters
    * facets
    * search_api_autocomplets
    * views_ajax_history

    TODO: check whether the issue is actually caused by one of these modules, or by custom code

    @malcomio: What theme are you using?

  • πŸ‡¬πŸ‡§United Kingdom malcomio

    Our issue is with a custom theme - some of the JS code is not in Drupal behaviors, which I suspect may be the reason for our problems - still need to dig into it further.

  • πŸ‡§πŸ‡ͺBelgium DuneBL

    @Win Leers, many thanks to dig into this: I have removed twig comments and I have removed my forked olivero (it use the core's olivero)
    Unfortunately, the console errors are still there (only in NL) and if I enabled Big Pipe my first tabs disappears.
    Attached the produced html

  • πŸ‡§πŸ‡ͺBelgium DuneBL

    @Wim Leers regarding this

    The toolbar_menu module causes an ENORMOUS amount of HTML to be transfered on each page load apparently?

    Do you think it is a toolbar_menu bug?

  • πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    @malcomio in #15:

    some of the JS code is not in Drupal behaviors, which I suspect may be the reason for our problems - still need to dig into it further.

    That's very likely indeed. It's fine if JS is not in Drupal behaviors, but then it does need to be written in a very robust way.

    @DuneBL in #16 + #17: Did the console errors change? Can you try reproducing this with a fresh Drupal 10.1 site, just to rule out environment issues? And yes, temporarily uninstalling toolbar_menu to rule that out would be very helpful to pinpoint the root cause πŸ™

  • Status changed to Closed: works as designed 10 months ago
  • πŸ‡§πŸ‡ͺBelgium DuneBL

    I found the origin of the problem: it was a simple translation error! The french string was bla bla <strong>bla bla</strong> and the dutch string was bla bla </strong>bla bla<strong>.
    This simple error (closing tag before opening tag) breaks the page and big pipe
    @Wim Leers : you were right at the very begining when you said "your HTML markup is invalid"
    I am very sorry for the time being lost!!!!

  • πŸ‡¬πŸ‡§United Kingdom malcomio

    In our case, we managed to trace the error to views configuration, and figured out that this was a false positive:

    In our Search API index preprocessor, we were using the highlighting prefix and suffix to wrap the matched search term in <strong> tags.

    In the view, we were trimming the search extract to a character limit, but didn't have the "Field can contain HTML" checkbox ticked, so the HTML tags were not properly closed after trimming.

    This meant that it was only happening where the matching search term was close to the character limit in the extract.

    Having enabled HTML in the views field, the problem went away.

Production build 0.69.0 2024