RTC PR-6.2-dev Pending

User tests: Successful: Unsuccessful:

avatar Devansh-dvd
Devansh-dvd
30 Oct 2026

Pull Request resolves #48710 .

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

Fixes #48710

CategoryView::prepareDocument() in libraries/src/MVC/View/CategoryView.php was only reading metadata from the active menu item params ($this->params), completely ignoring $this->category->metadesc and $this->category->metadata.

As a result, for components relying on CategoryView (such as com_contact and com_newsfeeds), setting Robots or Meta Description on a category had zero effect on the frontend category view.

While com_content previously solved this in its own component-specific HtmlView, the shared base class CategoryView was never updated. This fix brings that capability centrally into CategoryView so all extending components benefit without duplicated logic.

Changes Made

  1. Meta Description Priority: Category metadesc now takes precedence over menu item meta description, falling back to the menu item if empty.
  2. Category Metadata Loop: Iterates $this->category->metadata (e.g. robots, author, rights) and applies it after the menu item check, allowing category-level directives to override menu item defaults.

Testing Instructions

  1. In Joomla backend, navigate to Components → Contacts → Categories.
  2. Edit or create a category (e.g., "Support Team").
  3. Under the Publishing tab → Metadata, set Robots to noindex, follow. Save.
  4. Create a menu item of type Contacts → List Contacts in a Category pointing to this category. Leave its Robots set to Use Global.
  5. Visit the category listing on the frontend and view page source (Ctrl + U).
image

Actual Result (Before Fix)

No <meta name="robots"> tag appears in the <head> (or global default is rendered). The category's noindex, follow directive is completely ignored.

image

Expected Result (After Fix)

<meta name="robots" content="noindex, follow"> is correctly output in the <head>.

image

Documentation Changes Required

None.

avatar Devansh-dvd Devansh-dvd - open - 30 Oct 2026
avatar Devansh-dvd Devansh-dvd - change - 30 Oct 2026
Status New ⇒ Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 Oct 2026
Category ⇒ Libraries
avatar sachin9058
sachin9058 - comment - 30 Oct 2026

Hey @Devansh-dvd, just a heads-up: #48728 was opened earlier for the same issue (#48710) and already has a test. Yours fixes it in the shared CategoryView, which also covers newsfeeds, so maybe the maintainers can pick whichever they prefer. Happy to adjust mine either way!

avatar richard67
richard67 - comment - 30 Oct 2026

Hey @Devansh-dvd, just a heads-up: #48728 was opened earlier for the same issue (#48710) and already has a test. Yours fixes it in the shared CategoryView, which also covers newsfeeds, so maybe the maintainers can pick whichever they prefer. Happy to adjust mine either way!

@Devansh-dvd In addition, please mind that 5.4 has reached end of bugfix support and entered security only support, which lasts one more year. That means PRs for bugfixes should be made for the 6.2-dev branch, not for the 5.4-dev branch.

Finally note that we will not accept PRs where the confirmation of the AI policy has been removed.

avatar Devansh-dvd Devansh-dvd - change - 30 Oct 2026
Labels Added: PR-5.4-dev
avatar joomla-cms-bot joomla-cms-bot - change - 30 Oct 2026
Category Libraries ⇒ Repository Administration com_admin SQL
avatar github-actions[bot]
github-actions[bot] - comment - 30 Oct 2026

This pull request has conflicts, please resolve those before we can evaluate the pull request.

avatar Devansh-dvd Devansh-dvd - change - 30 Oct 2026
Title
…
[5.4] Fix category metadata (robots, metadesc) being ignored in CategoryView (#48710)
[6.2] Fix category metadata (robots, metadesc) being ignored in CategoryView (#48710)
avatar Devansh-dvd Devansh-dvd - edited - 30 Oct 2026
avatar joomla-cms-bot joomla-cms-bot - change - 30 Oct 2026
Category Repository Administration com_admin SQL ⇒ Libraries
avatar Devansh-dvd Devansh-dvd - change - 30 Oct 2026
The description was changed
avatar Devansh-dvd Devansh-dvd - edited - 30 Oct 2026
avatar Devansh-dvd
Devansh-dvd - comment - 30 Oct 2026

hi @richard67
Thank you for clarifying! I have rebased the branch onto 6.2-dev, updated the target branch and title to 6.2, and added the Generative AI policy confirmation checkbox to the PR description.

avatar tecpromotion tecpromotion - test_item - 31 Oct 2026 - Tested successfully
avatar tecpromotion
tecpromotion - comment - 31 Oct 2026

I have tested this item ✅ successfully on 5bc4417

Verdict: works as intended. One behaviour change in com_content worth stating in the description (below).

Verification

6.2-dev + PR (DDEV, PHP 8.3, MariaDB 11.8). One category per component, each with a category menu item. Values set on the category and/or the menu item, then the <head> of the category page read as a guest. Before = same instance with CategoryView.php from 6.2-dev.

Category / menu item contact before → after newsfeeds before → after content before → after
category Robots noindex, follow, menu "Use Global" – → noindex, follow – → noindex, follow noindex, follow (unchanged)
category Meta Description – → category – → category category (unchanged)
category Author – → Cat Author – → Cat Author Cat Author (unchanged)
category Robots noindex, follow + menu Robots index, nofollow menu → category menu → category menu → category
category + menu Meta Description menu → category menu → category menu → category
only menu Robots / Description menu (unchanged) menu (unchanged) menu (unchanged)

Subcategory reached through the parent's menu item uses its own Robots; without own values it keeps the menu's. The testing instructions done through the category form (Publishing tab) work: <meta name="robots" content="noindex, follow"> and the description are in the head. Existing system tests site/com_content/Category, Categories, site/com_contact/Category, Categories pass, as does the new test from #48728 (applies the robots metadata of the category to the category page). php-cs-fixer and phpstan clean.

Notes

  • com_content changes too. Its HtmlView::display() already applied the category values, but then parent::display() → CategoryView::prepareDocument() set the menu Robots/Description again, so the menu item won when both were set. Now the category wins there as well. That matches the article, contact and newsfeed item views (item metadata over menu), but it changes the output of existing sites with both set, so please mention it in the description.
  • The metadesc/robots/metadata block in components/com_content/src/View/Category/HtmlView.php::display() is now done twice and could be removed.
  • A system test would help. The one from #48728 passes here unchanged; one for newsfeeds or the description would cover the rest.

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48729.
avatar tecpromotion
tecpromotion - comment - 31 Oct 2026

I have tested this item ✅ successfully on 5bc4417

Verdict: works as intended. One behaviour change in com_content worth stating in the description (below).

Verification

6.2-dev + PR (DDEV, PHP 8.3, MariaDB 11.8). One category per component, each with a category menu item. Values set on the category and/or the menu item, then the <head> of the category page read as a guest. Before = same instance with CategoryView.php from 6.2-dev.

Category / menu item contact before → after newsfeeds before → after content before → after
category Robots noindex, follow, menu "Use Global" – → noindex, follow – → noindex, follow noindex, follow (unchanged)
category Meta Description – → category – → category category (unchanged)
category Author – → Cat Author – → Cat Author Cat Author (unchanged)
category Robots noindex, follow + menu Robots index, nofollow menu → category menu → category menu → category
category + menu Meta Description menu → category menu → category menu → category
only menu Robots / Description menu (unchanged) menu (unchanged) menu (unchanged)

Subcategory reached through the parent's menu item uses its own Robots; without own values it keeps the menu's. The testing instructions done through the category form (Publishing tab) work: <meta name="robots" content="noindex, follow"> and the description are in the head. Existing system tests site/com_content/Category, Categories, site/com_contact/Category, Categories pass, as does the new test from #48728 (applies the robots metadata of the category to the category page). php-cs-fixer and phpstan clean.

Notes

  • com_content changes too. Its HtmlView::display() already applied the category values, but then parent::display() → CategoryView::prepareDocument() set the menu Robots/Description again, so the menu item won when both were set. Now the category wins there as well. That matches the article, contact and newsfeed item views (item metadata over menu), but it changes the output of existing sites with both set, so please mention it in the description.
  • The metadesc/robots/metadata block in components/com_content/src/View/Category/HtmlView.php::display() is now done twice and could be removed.
  • A system test would help. The one from #48728 passes here unchanged; one for newsfeeds or the description would cover the rest.

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48729.
avatar chmst chmst - test_item - 31 Oct 2026 - Tested successfully
avatar chmst
chmst - comment - 31 Oct 2026

I have tested this item ✅ successfully on 5bc4417


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48729.

avatar chmst
chmst - comment - 31 Oct 2026

I have tested this item ✅ successfully on 5bc4417


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48729.

avatar chmst chmst - change - 31 Oct 2026
Status Pending ⇒ Ready to Commit
Build 5.4-dev ⇒ 6.2-dev
avatar chmst
chmst - comment - 31 Oct 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48729.

avatar chmst
chmst - comment - 31 Oct 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48729.

avatar chmst chmst - change - 31 Oct 2026
Easy No ⇒ Yes
avatar richard67
richard67 - comment - 31 Oct 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48729.

avatar richard67
richard67 - comment - 31 Oct 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48729.

avatar richard67 richard67 - change - 31 Oct 2026
Labels Added: RTC PR-6.2-dev
Removed: PR-5.4-dev
avatar richard67 richard67 - alter_testresult - 31 Oct 2026 - tecpromotion: Tested successfully
avatar richard67 richard67 - alter_testresult - 31 Oct 2026 - chmst: Tested successfully

Add a Comment

Login with GitHub to post a comment