Drupal 9 to 10 Migration some TWIG HTML and varaibles are not showing properly for loggedout user

Created on 18 February 2024, 10 months ago
Updated 19 February 2024, 10 months ago

I have recently migrated a multilingual site from Drupal 9 to Drupal 10. Everything seems to be fine and working. One issue I am getting for a logged-out user (pages like page--front.html.twig, /user/login, register page) some HTML elements are not showing on the browser. Some strange behavior showing in the footer content, for some languages it is showing correctly, and for some languages, it showing nothing on the browser or incomplete HTML. Also when I log in to the site everything is working fine.

One more thing I have noted in my local xampp when I enable aggregation of JS & CSS everything is working fine. But on the ngnix dev server either with enable or disable the footer contents are not printing for logged-out users. I can only reproduce the issue in my local xampp by disabling the aggregation.
(In existing Drupal 9 everything is working fine).

In page.html.twig and page--front.html twig the footer contains the HTML and variable like below:

<footer class="container" id="footer">
<nav>
{{ page.footer }}
</nav>
<div class="row">
<p class="col-sm-7">
{{ some_var}}
</p>
<div class="col-xs-12 col-sm-5">
<img src="{{ logopath }}" title="" alt=""/>
</div>
</div>
</footer>
💬 Support request
Status

Postponed: needs info

Version

10.2

Component
Render 

Last updated about 8 hours ago

Created by

🇮🇳India pratishjha

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

Comments & Activities

  • Issue created by @pratishjha
  • Status changed to Postponed: needs info 10 months ago
  • 🇬🇧United Kingdom longwave UK

    There is not really enough information to help you here. You say the bug is reproducible when aggregation is disabled which is interesting and suggests that perhaps there is a problem in your JS or CSS that is being accidentally solved when aggregation is enabled again.

    You need to try and identify what is different about the sections that are not working. Also are there any errors in the Drupal logs or the JavaScript console?

  • 🇮🇳India pratishjha

    Thank you for your reply. There is no error in db log and JavaScript console. The interesting part the issue does not occur when I am logged in to the site with any role. It is only happening for anonymous users.
    For reproducing it locally by xampp I can only see it by disabling aggregation whereas on ngnix server the issue persists either disable or enable.
    Also if I remove the whole custom CSS & JS still some footer parts are still not showing on the browser. For different languages, it shows differently. I have not seen this kind of strange behavior in the entire Drupal experience from 7 to 10.

  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    Are you using big pipe module ?

  • 🇮🇳India pratishjha

    Yes, big pipe is enabled currently. Un-installing big pipe does not resolve the issue.

  • 🇧🇪Belgium gorkagr

    If it is missing to anonymous only it could be some missing permissions (either general ones or maybe inside group if the module is being used)

  • Can you confirm you updated the nginx configuration for Drupal 10.1 ? This is mentioned in release notes.

  • 🇮🇳India pratishjha

    I made these changes as well today. Still not resolved.

Production build 0.71.5 2024