RMDQ PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar pe7er
pe7er
20 May 2025

Same issue as #45501 but with Category Titles.
When you save a category with spaces, before or after the title, the spaces are saved in the database.
Ordering the Categories on Title, give confusing results with Titles that start with spaces.

Summary of Changes

This PR removes the spaces before and after the Category Title when saving the Category.

Testing Instructions

In the back-end under Content > Categories:

  • create a few categories that start with different letters
  • add some spaces before one of the category titles
  • order the Categories on Title
  • see the weird result (the title with spaces is on top)

Actual result BEFORE applying this Pull Request

(Accidental) spaces before (and after) the Category Title are saved:

category-title-before

The "Some categories have spaces before and after the title" starts with spaces,
which are not visible in the list of categories,
which makes it confusing that this item is listed on top.
Instead you would expect it to be listed between "All categories have titles" and "Uncategorized"

categories-before

Expected result AFTER applying this Pull Request

Saving works well, the spaces before and after the title are trimmed (removed from the title) :

category-title-after-pr

Ordering looks good:

categories-after

Link to documentations

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 pe7er pe7er - open - 20 May 2025
avatar pe7er pe7er - change - 20 May 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 May 2025
Category Administration com_categories
avatar pe7er pe7er - change - 20 May 2025
Title
[5.3] Remove spaces before and after category title
[5.3] Category Titles - Remove spaces before and after title
avatar pe7er pe7er - edited - 20 May 2025
avatar exlemor exlemor - test_item - 20 May 2025 - Tested successfully
avatar exlemor
exlemor - comment - 20 May 2025

I have tested this item ✅ successfully on d5d1663

I have tested this successfully - not sure if it was easy to fix but easy test ;) - Thanks pe7er.


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

avatar krishnaGandhi11 krishnaGandhi11 - test_item - 23 May 2025 - Tested successfully
avatar krishnaGandhi11
krishnaGandhi11 - comment - 23 May 2025

I have tested this item ✅ successfully on d5d1663

Tested Successfully, works as expected!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45502.
avatar QuyTon QuyTon - change - 23 May 2025
Status Pending Ready to Commit
Labels Added: PR-5.3-dev
avatar QuyTon
QuyTon - comment - 23 May 2025

RTC


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

avatar Fedik Fedik - change - 25 May 2025
Status Ready to Commit Pending
avatar Fedik
Fedik - comment - 25 May 2025
avatar webmasterab webmasterab - test_item - 25 May 2025 - Tested successfully
avatar webmasterab
webmasterab - comment - 25 May 2025

I have tested this item ✅ successfully on d5d1663

Tested Successfully, works as expected!


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

avatar HLeithner HLeithner - change - 4 Jun 2025
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2025-06-04 18:21:23
Closed_By HLeithner
Labels Added: RMDQ
avatar HLeithner HLeithner - close - 4 Jun 2025
avatar HLeithner
HLeithner - comment - 4 Jun 2025

Hi @pe7er

thanks for the PR but we discussed this now several times in maintainers channel and come to the following conclusion:

  1. Fedir mentioned in comment that this would prevent our default filter
  2. We shouldn't touch user input if not really needed.

So I'm closing this PR.

Add a Comment

Login with GitHub to post a comment