Unit/System Tests PR-6.2-dev Pending

User tests: Successful: Unsuccessful:

avatar sachin9058
sachin9058
29 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

com_contact category view only applied the Robots value from the menu item and dropped the metadata set on the category itself (Publishing tab: Robots, Author, etc.).

prepareDocument() in components/com_contact/src/View/Category/HtmlView.php now applies the category metadata after the parent call, the same way com_content does. A category-level Robots value overrides the menu item value on the category page. Individual contact pages are unchanged.

A system test is added to tests/System/integration/site/components/com_contact/Category.cy.js.

Testing Instructions

  1. Create a published contact category with at least two published contacts.
  2. Create a menu item of type Contacts > List Contacts in a Category pointing to that category. Leave its Robots setting at "Use Global".
  3. Edit the category, open the Publishing tab and set Robots to noindex, follow.
  4. Open the category page on the frontend and look for <meta name="robots" ...> in the page source.

Actual result BEFORE applying this Pull Request

There is no noindex, follow robots meta tag on the category page. The category's Robots setting is ignored.

Expected result AFTER applying this Pull Request

<meta name="robots" content="noindex, follow"> is present on the category page.

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar sachin9058 sachin9058 - open - 29 Oct 2026
avatar sachin9058 sachin9058 - change - 29 Oct 2026
Status New ⇒ Pending
avatar joomla-cms-bot joomla-cms-bot - change - 29 Oct 2026
Category ⇒ Front End com_contact JavaScript Unit Tests
avatar sachin9058 sachin9058 - change - 29 Oct 2026
Labels Added: Unit/System Tests PR-6.2-dev
avatar sachin9058
sachin9058 - comment - 29 Oct 2026

Hi @Valentyn-M @richard67 The contact category's own Robots metadata is now applied on the category page, like in com_content. It includes a system test that I checked on both MySQL and Postgres. Could you take a look when you have time? Happy to change anything. Thanks!

avatar Valentyn-M
Valentyn-M - comment - 30 Oct 2026

Hi @sachin9058,

Thank you for the quick response and for preparing this fix! I appreciate the effort you put into addressing the issue and adding automated tests.

I've reviewed the proposed changes, and the approach looks good to me. Since I already have a workaround in place on my site, I won't be testing the patch locally, but I'm happy to wait for its inclusion in an official Joomla release.

Thanks again for your contribution to Joomla!

avatar tecpromotion
tecpromotion - comment - 31 Oct 2026

I tested this side by side with #48729 on the same 6.2-dev instance (DDEV, PHP 8.3, MariaDB 11.8): 6.2-dev + this PR vs. 6.2-dev + #48729, category values set on the category and/or the category menu item, <head> read as a guest.

This PR does what it says: the contact category's Robots (and Author) now reach the category page, also over a menu item Robots value, and the new system test passes. php-cs-fixer, phpstan and eslint clean.

#48729 fixes the same thing one level up, in CategoryView::prepareDocument(), and covers more of #48710:

this PR #48729
contact category Robots / Author ✔ ✔
contact category Meta Description ✘ (menu value or nothing) ✔
newsfeed category (same bug) ✘ ✔
3rd-party views extending CategoryView ✘ ✔
com_content category unchanged category now wins over menu (worth mentioning there)
system test ✔ –

Your test passes unchanged with #48729. My suggestion: go on with #48729 and move the test there. Small note on the description: com_content doesn't quite do it "the same way" today. There the menu item Robots still wins when both are set, because CategoryView::prepareDocument() runs after com_content's own code; here the category wins.

avatar chmst
chmst - comment - 31 Oct 2026

Thank you for your contribution!

#48729 fixes the code on the right place, fixes the metadescription, and checks empty data as ou can see in the test above.


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

Thank you for your contribution!

#48729 fixes the code on the right place, fixes the metadescription, and checks empty data as ou can see in the test above.


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

Add a Comment

Login with GitHub to post a comment