Skip to content

Custom category layout update not affecting products #27285

Closed
@codedge

Description

@codedge

Preconditions (*)

  1. Magento 2.3.4

Steps to reproduce (*)

  1. Create a custom layout update

I created a file catalog_category_view_selectable_276_noindexnofollow.xml in app/design/frontend/<VENDOR>/<THEME>/Magento_Catalog/layout. That file should set noindex, nofollow for a certain category.

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <meta name="robots" content="NOINDEX,NOFOLLOW"/>
    </head>
</page>

So we imagine we have a category with ID 276, named Shirts.

  1. In Admin got to the category with ID 276 and select this update via the Custom Layout update dropdown. Please see that I also set Apply Design to Products.

layout_update

  1. Go to a sub category of this former category and enable Use parent category settings. Additionally I enabled Apply Design to Products for this category as well.

This is a subcategory of Shirts, named Soccer Shirts.

layout_update_sub

  1. In the frontend check the head section of this three pages:
  • Category page Shirts
  • Category page Soccer shirts
  • Product page of category Soccer shirts

Expected result (*)

  1. ✔️ The category page Shirts should have <meta name="robots" content="NOINDEX,NOFOLLOW">:
  2. ✔️ The category page Soccer shirts should have <meta name="robots" content="NOINDEX,NOFOLLOW">
  3. ✔️ The product page of a product of Soccer shirts should have <meta name="robots" content="NOINDEX,NOFOLLOW">:

Actual result (*)

  1. ✔️ The two category pages do have the entry <meta name="robots" content="NOINDEX,NOFOLLOW">
  2. ❌ The product page of the sub category Soccer shirts does not have this entry

Metadata

Metadata

Assignees

Labels

Component: CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: ready for confirmationPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.3.4Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions