Primary local tasks not rendering on entity routes due to striptags filter

Created on 20 December 2023, 12 months ago
Updated 9 January 2024, 11 months ago

Problem/Motivation

Primary local tasks (View/Edit/Revisions etc) are invisible on entity pages or any other page where the block renders as a lazy builder.

Steps to reproduce

Use Gin on Drupal 10.2, edit an entity.

Proposed resolution

Unclear, but that check can't rely on rendering that region.

The problem is in page.html.twig here: {% if page.header|without(page_title_block)|render|striptags|trim is not empty %}

That block is a lazy builder on some pages, which means when tags are stripped it will be empty since there's no text content until later.

This was introduced in issue πŸ› Recent change to gin.css hides on gin_login templates Fixed (commit)

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States karlshea Minneapolis πŸ‡ΊπŸ‡Έ

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

Merge Requests

Comments & Activities

  • Issue created by @karlshea
  • πŸ‡ΊπŸ‡ΈUnited States karlshea Minneapolis πŸ‡ΊπŸ‡Έ

    Stock Gin:

    Removed check:

  • πŸ‡ΊπŸ‡ΈUnited States karlshea Minneapolis πŸ‡ΊπŸ‡Έ

    Figured out the actual cause: that block is sometimes a lazy builder, so using striptags on the region won't work since there's no text content until it's rendered later.

  • Merge request !348Check for empty header differently β†’ (Merged) created by karlshea
  • Status changed to Needs review 12 months ago
  • πŸ‡ΊπŸ‡ΈUnited States karlshea Minneapolis πŸ‡ΊπŸ‡Έ

    Not sure if this is the right way to do this check, but the tasks are showing for me now.

  • Status changed to Needs work 12 months ago
  • πŸ‡ΊπŸ‡ΈUnited States karlshea Minneapolis πŸ‡ΊπŸ‡Έ

    I actually don't think this will work either, since Element::isEmpty is just checking for child array elements, which will always exist.

  • Status changed to Postponed: needs info 12 months ago
  • πŸ‡¨πŸ‡­Switzerland saschaeggi Zurich

    I'll need steps to reproduce as I'm unable to reproduce this on any of my 10.2.x sites currently

  • Status changed to RTBC 12 months ago
  • πŸ‡¨πŸ‡­Switzerland saschaeggi Zurich

    Verified βœ… Let's get this merged πŸš‚

  • Status changed to Fixed 12 months ago
  • πŸ‡¨πŸ‡­Switzerland saschaeggi Zurich

    Thanks @KarlShea!

  • Automatically closed - issue fixed for 2 weeks with no activity.

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

    I've just started to use Gin theme, and could not find the 'uninstall' tab on the Extend page. I asked on Slack and was directed to this issue. Thought you would like to know that it fixes this problem. See screen grabs.

    Thank you for such a great admin theme, a huge improvment on Claro :-)

Production build 0.71.5 2024