RTC bug PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar AdarshSantoria
AdarshSantoria
18 Apr 2025

Pull Request for Issue #45303

Summary of Changes

This PR fixes a bug where creating a new article after filtering by multiple categories (e.g. "News" and "Events") incorrectly displays all custom fields from all those categories on the "Fields" tab.

Joomla previously used the catid filter directly from user state or input, which led to ambiguous behavior when multiple categories were selected. This fix:

  • Detects when category_id filter is an array
  • Selects the first selected category from the filtered list
  • Ensures only relevant custom fields are loaded for the selected category
  • Supports fallback logic for single-category filter or default category

This resolves #45303 and improves clarity and correctness of the custom field rendering in the admin UI.


Testing Instructions

  1. Create two categories: Events and News
  2. Create two custom fields:
    • events_title → assigned to Events
    • news_title → assigned to News
  3. Go to Content > Articles
  4. Apply category filter for both "Events" and "News"
  5. Click New Article
    • ✅ Only one custom field (events_title or news_title) should appear on the "Fields" tab
  6. Change category using dropdown
    • ✅ Custom fields update correctly

Actual result BEFORE applying this Pull Request

Screenshot (37)

  • When filtered by multiple categories and clicking "New", all fields from all selected categories are loaded.
  • Changing category does not reload the field list properly.

Expected result AFTER applying this Pull Request

Screenshot (36)

  • Only the first selected category’s custom fields are loaded initially
  • Changing category in the form correctly reloads the associated custom fields dynamically
  • Prevents confusion and clutter in the custom fields UI

Link to documentation

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar AdarshSantoria AdarshSantoria - open - 18 Apr 2025
avatar AdarshSantoria AdarshSantoria - change - 18 Apr 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Apr 2025
Category Administration com_content
avatar AdarshSantoria AdarshSantoria - change - 18 Apr 2025
Labels Added: PR-5.3-dev
avatar brianteeman brianteeman - test_item - 19 Apr 2025 - Tested successfully
avatar brianteeman
brianteeman - comment - 19 Apr 2025

I have tested this item ✅ successfully on 56c2e62

Functionality works as described


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

avatar JackJoeJack
JackJoeJack - comment - 19 Apr 2025

I also have tested this item ✅ successfully on 56c2e62

Functionality works as described

avatar QuyTon QuyTon - alter_testresult - 19 Apr 2025 - brianteeman: Tested successfully
avatar QuyTon QuyTon - alter_testresult - 19 Apr 2025 - JackJoeJack: Tested successfully
avatar QuyTon QuyTon - change - 19 Apr 2025
Status Pending Ready to Commit
avatar QuyTon
QuyTon - comment - 19 Apr 2025

RTC


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

avatar QuyTon QuyTon - change - 19 Apr 2025
Labels Added: RTC bug
avatar richard67
richard67 - comment - 20 Apr 2025

I've just double-checked this PR and it works and seems not to break anything else.

avatar richard67 richard67 - change - 20 Apr 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-04-20 12:24:34
Closed_By richard67
avatar richard67 richard67 - close - 20 Apr 2025
avatar richard67 richard67 - merge - 20 Apr 2025
avatar richard67
richard67 - comment - 20 Apr 2025

Thanks all (author and testers).

Add a Comment

Login with GitHub to post a comment