Problem/Motivation

Page titles for landing pages are being rendered as H2 links when promoted to the front page even with correct block configuration. The H1 title is correctly hidden when the landing page content is viewed by itself, i.e. not promoted to front page. Inspecting in the console confirms that the page title is labelled H2 and a bookmark so it isn't being hidden as per the block setting.
Changing the theme to a default like Olivero or Stark correctly hides the page title. I've worked with Belgrade theme using Commerce Kickstart and the same block and landing page configurations for some years and not encountered this problem before, all displayed correctly in past versions of Belgrade.

Steps to reproduce

Create Landing page content type, setting core Page title block as hidden on pages and create a Landing page, then place blocks using Layout builder. When saved, the following shows up and there's no way to hide it using settings in views, blocks or Layout builder
screenshot of page title on website
screenshot of console details

Maybe something has changed since I last configured a site, any advice is appreciated

Issue fork belgrade-3606179

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

niki v created an issue. See original summary.

niki v’s picture

The problem stems from an interaction between the theme and how Drupal handles H1 elements in feeds. The Landing page is being treated as a feed item. I'm not sure if it's intentional behaviour so I'm unsure whether to mark this 'works as designed' or a bug report because people trying out Commerce by copying Commerce Kickstart settings are going to struggle.

The workaround: edit the View Modes to enable the Landing Page on Full Content so that it's available in Layout builder, then edit the Frontpage view to show Full Content view mode, set the Views filter to show Content:Landing Page and ensure that the Frontpage (Content) view path, landing page URL alias and front page path in the system settings coincide. Then the landing page can created with Layout Builder

majmunbog made their first commit to this issue’s fork.

majmunbog’s picture

Version: 3.0.4 » 3.x-dev
Category: Support request » Bug report

majmunbog’s picture

Thanks for pointing this out and opening the issue.

The linked H2 is from the node template (rel="bookmark"), not the Page title block. Belgrade used deprecated {% if label and not page %} while core/Olivero use view_mode != "full". This is fixed by aligning Belgrade’s node templates with core. MR/patch

majmunbog’s picture

Status: Active » Needs review
sumi’s picture

Status: Needs review » Reviewed & tested by the community

Tested the MR and all is now working as expected.

  • majmunbog committed 377e0b8b on 3.x
    fix: #3606179 H1 page titles displayed as H2 links on landing pages...
majmunbog’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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