Feature RTC Language Change PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar Aashish-Jha-11
Aashish-Jha-11
5 Aug 2025

Summary

Adds a "Year Filter Order" parameter to the archived articles menu item configuration, allowing users to sort years in ascending (oldest first) or descending (newest first) order.

Pull Request for Issue #45772

Resolves #45772

Summary of Changes

  • Added filter_field_years parameter to /components/com_content/tmpl/archive/default.xml
  • Modified ArchiveModel::getYears() to use the parameter with security validation
  • Added language strings for the new parameter
  • Backwards compatible (defaults to ASC - current behavior)

Testing Instructions

  1. Create an "Archived Articles" menu item
  2. Go to Archive Options tab
  3. Find "Year Filter Order" parameter
  4. Set to "Most Recent First"
  5. View the archive page - years should show 2025, 2024, etc. (newest first)

Types of changes

  • New feature (non-breaking change which adds functionality)
  • Backwards compatible

Checklist:

  • My code follows the Joomla! coding standards
  • My change requires a change to the documentation
  • I have added language strings where needed
  • I have added security validation
avatar Aashish-Jha-11 Aashish-Jha-11 - open - 5 Aug 2025
avatar Aashish-Jha-11 Aashish-Jha-11 - change - 5 Aug 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Aug 2025
Category Front End com_content Language & Strings
avatar Aashish-Jha-11 Aashish-Jha-11 - change - 5 Aug 2025
Labels Added: Language Change PR-5.3-dev
avatar richard67
richard67 - comment - 5 Aug 2025

@Aashish-Jha-11 Hmm, you should remember from your previous PR that new features will not go into 5.3.

avatar richard67 richard67 - change - 5 Aug 2025
Title
feat: Add year filter order parameter for archived articles
[5.4] Feature: Add year filter order parameter for archived articles
avatar richard67 richard67 - edited - 5 Aug 2025
avatar richard67
richard67 - comment - 5 Aug 2025

I've rebased this PR for 5.4-dev for now. As said, 5.3 only receives bug fixes, no new features.

avatar richard67 richard67 - change - 5 Aug 2025
Labels Added: PR-5.4-dev
Removed: PR-5.3-dev
avatar dautrich
dautrich - comment - 5 Aug 2025

@Aashish-Jha-11 I used Patchtester to apply your PR to a copy of an existing site. I realized that the new option has not been included on the "Options", but on the "Archive" tab. IMHO this is the better place to put it. But you should change your testing instructions (and later the documentation) from "Archive Options tab" to "Archive tab".

Using Patchtester, I would not get the new language strings applied.

Apart from that, my test was okay. I will follow up a test with the Drone package to get the correct language strings.

avatar dautrich dautrich - test_item - 5 Aug 2025 - Tested unsuccessfully
avatar dautrich
dautrich - comment - 5 Aug 2025

I have tested this item 🔴 unsuccessfully on 9e8a206

The test is okay apart from the language strings:


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45841.
avatar brianteeman
brianteeman - comment - 5 Aug 2025

you obviously have not tested your work as the language string MUST be added to the admin language file

avatar chmst
chmst - comment - 5 Aug 2025

@Aashish-Jha-11 your first contribution to Joomla! Welcome!
As Brian said, there are language files for the administrator and one for the CMS frontend. So please move yout Language Strings into the administrator /language/en-GB.

avatar Sieger66
Sieger66 - comment - 5 Aug 2025

Move the language strings into:
/administrator/language/en-GB/com_content.ini
then it works.
@Aashish-Jha-11 your first contribution to Joomla! Welcome!

avatar Aashish-Jha-11 Aashish-Jha-11 - change - 5 Aug 2025
Labels Added: Feature
avatar joomla-cms-bot joomla-cms-bot - change - 5 Aug 2025
Category Front End com_content Language & Strings Administration Language & Strings Front End com_content
avatar Aashish-Jha-11
Aashish-Jha-11 - comment - 5 Aug 2025

Hi @chmst! Thank you for the warm welcome and guidance! 🙌

You're absolutely right - I've now moved the language strings to /administrator/language/en-GB/com_content.ini as requested. The implementation now follows Joomla's standard pattern for menu configuration language strings.

Thanks for the feedback!

avatar Aashish-Jha-11
Aashish-Jha-11 - comment - 5 Aug 2025

@Sieger66 Exactly right! ✅

The language strings are now properly placed in /administrator/language/en-GB/com_content.ini and removed from the site language file. This follows the correct Joomla pattern for menu configuration strings.

Thanks for confirming the correct location!

avatar Aashish-Jha-11
Aashish-Jha-11 - comment - 5 Aug 2025

@brianteeman Thank you for the feedback! Sir

You're absolutely correct - the language strings are now properly added to the administrator language file at /administrator/language/en-GB/com_content.ini. I've also removed the duplicate strings from the site language file as they should only exist in the admin context for menu configuration.

The implementation now follows proper Joomla standards. Thanks for the guidance!

avatar Aashish-Jha-11
Aashish-Jha-11 - comment - 5 Aug 2025

@dautrich Thank you so much Sir for the detailed testing! 🙏

You're spot on about the field placement - it's in the "Archive" tab which is indeed the better location for this functionality. I've updated the testing instructions accordingly.

Regarding the language strings issue with Patchtester - this is a known limitation where Patchtester sometimes doesn't properly apply language file changes. The strings are correctly implemented in /administrator/language/en-GB/com_content.ini and should work properly with the Drone package or a full installation.

Thanks for the thorough testing and helpful feedback!

avatar brianteeman
brianteeman - comment - 5 Aug 2025

Regarding the language strings issue with Patchtester - this is a known limitation where Patchtester sometimes doesn't properly apply language file changes. The strings are correctly implemented in /administrator/language/en-GB/com_content.ini and should work properly with the Drone package or a full installation.

No its not - you just put them in the wrong place

avatar brianteeman
brianteeman - comment - 5 Aug 2025

Please rename this to SORT not filter

Please move the field so that it is after the field "date for ordering" as its more logical to be placed there than after the filter field option

avatar Aashish-Jha-11
Aashish-Jha-11 - comment - 5 Aug 2025

@brianteeman Thank you Sir for the specific feedback! ✅

I've implemented both of your requests:

  1. Renamed from "FILTER" to "SORT": Changed language strings to COM_CONTENT_FIELD_YEAR_SORT_LABEL and COM_CONTENT_FIELD_YEAR_SORT_DESC, and updated the field name to year_sort_order.

  2. Repositioned the field: Moved it to appear right after the "Date for Ordering" field, which is indeed much more logical placement than after the filter field option.

The field now appears in this order:

  • Article Order
  • Date for Ordering
  • Year Sort Order ← (our new field, perfectly positioned!)
  • Number of Items

Thanks for helping improve the UX! The implementation is now much more intuitive.

avatar dautrich dautrich - test_item - 5 Aug 2025 - Tested successfully
avatar dautrich
dautrich - comment - 5 Aug 2025

I have tested this item ✅ successfully on b490e06


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

avatar ChristineWk ChristineWk - test_item - 5 Aug 2025 - Tested successfully
avatar ChristineWk
ChristineWk - comment - 5 Aug 2025

I have tested this item ✅ successfully on b490e06


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

avatar richard67 richard67 - change - 5 Aug 2025
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 5 Aug 2025

RTC


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

avatar muhme muhme - change - 6 Aug 2025
Labels Added: RTC
avatar dautrich
dautrich - comment - 6 Aug 2025

@Aashish-Jha-11

Off-topic: You don't need to say "Thank you" so often here. I think that we all are here to help each other, and to help make Joomla an even greater product.

avatar muhme
muhme - comment - 6 Aug 2025

✅ Final test before merge

  • JBT graft Joomla_5.4.0-alpha4-dev+pr.45841-Development-Full_Package.zip
    • Found new parameter Menu item > Archive > Year Sort Order
  • Using a live-site clone updating with Joomla_5.4.0-alpha4-dev+pr.45841-Development-Update_Package.zip
    • tested 'Most Recent First' and 'Oldest First' with frontend menu entry
avatar muhme muhme - change - 6 Aug 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-08-06 06:28:11
Closed_By muhme
avatar muhme muhme - close - 6 Aug 2025
avatar muhme muhme - merge - 6 Aug 2025
avatar muhme
muhme - comment - 6 Aug 2025

Thank you @Aashish-Jha-11 for your contribution. Thank you @brianteeman, @Sieger66, @chmst and @QuyTon for supporting this PR. Thank you @dautrich and @ChristineWk for testing.

avatar brianteeman
brianteeman - comment - 6 Aug 2025

@muhme in your rush to merge this you ignored a perfectly valid CS change request from @QuyTon

avatar brianteeman
brianteeman - comment - 6 Aug 2025

see #45853

avatar richard67
richard67 - comment - 7 Aug 2025

@muhme in your rush to merge this you ignored a perfectly valid CS change request from @QuyTon

@brianteeman The change request by @QuyTon was closed by @Aashish-Jha-11 before the merge, so @muhme could not see it and can't be blamed. Possibly a misunderstanding by @Aashish-Jha-11 .

avatar Aashish-Jha-11
Aashish-Jha-11 - comment - 7 Aug 2025

Hi all,
Thanks @richard67 for highlighting this. I wasn’t aware that the change request from @QuyTon had been closed before the merge, which led to the oversight. It seems to have been a simple misunderstanding, and I’ll make sure to be more careful about review statuses in the future.

Sorry for the confusion caused.

avatar Aashish-Jha-11
Aashish-Jha-11 - comment - 7 Aug 2025

Hi all,
Thanks @richard67 Sir for highlighting this. I wasn’t aware that the change request from @QuyTon had been closed before the merge, which led to the oversight. It seems to have been a simple misunderstanding, and I’ll make sure to be more careful about review statuses in the future.

Sorry for the confusion caused.

Add a Comment

Login with GitHub to post a comment