Settings have no effect at all in Drupal 10

Created on 16 November 2023, over 1 year ago

Problem/Motivation

I was using version 2.1x in multiple Drupal 9projects very effectively and likewise when using Drupa 9, upgrading to 3.x was fine too.

HOWEVER, I have only just noticed that neither 2.1x nor 3.x appear to work at all in Drupal 10 qt all in the sense that my Manage Display settings for any node Title field have absolutely no effect at all on the rendered field.

For example, here is a screenshot for a simple adjustment made to the Manage Display settings for the Basic page content type...

So the result should be that I see all Basic page Titles wrapped in h2 and containing a link but, ...

After Drupal cache-clearing and browser cache-clearing rendered mark-up for the Title field appears...

(Twig debug mode ON)

<h1>
<!-- THEME DEBUG -->
<!-- THEME HOOK: 'entity_page_title' -->
<!-- BEGIN OUTPUT from 'core/themes/stable9/templates/field/entity-page-title.html.twig' -->
<span>
  A Basic page
</span>
<!-- END OUTPUT from 'core/themes/stable9/templates/field/entity-page-title.html.twig' -->
</h1>

I have tested this with Drupal 10.1.6 using Olivero as the default theme as well as other themes such as Bootstrap 5.

Nothing at all seems to have any effect!?

Now I feel that I must need to do something differently in Drupal 10 but I'm a bit stumped because there don't seem to be others reporting similar symptoms?

Can anyone shed any light here please?

Thanks

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom SirClickALot Somerset

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

Comments & Activities

  • Issue created by @SirClickALot
  • πŸ‡¬πŸ‡§United Kingdom SirClickALot Somerset
  • πŸ‡¬πŸ‡§United Kingdom SirClickALot Somerset
  • πŸ‡¬πŸ‡§United Kingdom juc1

    @SirClickalot have you tried enabling the core field_layout module as mentioned here https://www.drupal.org/project/manage_display/issues/3306918 πŸ› Title field only seems to render when Field Layout (core) module is enabled Closed: duplicate

  • Status changed to Closed: works as designed over 1 year ago
  • πŸ‡ΊπŸ‡¦Ukraine AstonVictor

    Hi @SirClickalot,

    actually, there is no title field on the page. It renders the page title (you can check the twig output).

    for rendering the page title as a field you can:
    1. use layout builder and add the title field to any position you want.
    2. add access and force show the title as a field. it can be done e.g.

    function theme_preprocess_node(&$variables) {
      $variables['content']['title']['#access'] = TRUE;
    }
    

    in both cases, $tag will be added as a wrapper.

    thanks

  • πŸ‡¨πŸ‡¦Canada bohemier QuΓ©bec city, Qc

    I find that this module fixes some long-time inconsistencies, especially with the handling of title.

    Is there a reason for having #access=false by default? Doesn't this defeat the purpose of the module? After setting a field formatter for title, a user would expect that field to be displayed, just like the OP mentioned.

    Or perhaps there could be a configuration form somewhere to allow access?

    Thanks!

  • leymannx Berlin

    Also to me this is really confusing. I think the module should clearly state these limitation on both the module page and in the README. This would help a lot to get the people maybe even create the MRs that are missing to make this work OOTB. Should we add an issue for it?

  • πŸ‡©πŸ‡ͺGermany 4kant

    I agree with @leymannx.
    Luckily I found this issue...

    I donΒ΄t want to use layout builder by the way.

    Thanks for the module!

  • Status changed to Needs work 12 days ago
  • πŸ‡©πŸ‡°Denmark ressa Copenhagen

    I believe I also just saw this in Drupal 11 ... I installed the module, and "Authored on" and "Authored by" fields were available on the Display page and working fine, but I could not change position of the Title ...

    Perhaps someone can add a solution under the "Proposed solution" section I just added in the Issue Summary? For example, if Layout Builder is required, that's a pretty big deal, and important piece of information. Thanks.

  • πŸ‡©πŸ‡°Denmark ressa Copenhagen

    Or will this be taken care of in ✨ Allow node/entity to display title/label field as normal Needs work , allowing to change the position of Title field in a plain vanilla Drupal 11 installation on the "Manage display" page /admin/structure/types/manage/article/display, simply by installing the Manage display module?

    It is pretty hazy to me ... it would be awesome if the README and project page had the minimum required steps to allow changing the position and display of the Title field, as of today. Thanks!

  • πŸ‡©πŸ‡°Denmark ressa Copenhagen
Production build 0.71.5 2024