Skip to content

[5.3] Category Titles - Remove spaces before and after title #45502

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 5.3-dev
Choose a base branch
from

Conversation

pe7er
Copy link
Contributor

@pe7er pe7er commented May 20, 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

@exlemor
Copy link

exlemor commented May 20, 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.

@krishnaGandhi11
Copy link

krishnaGandhi11 commented May 23, 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.

@QuyTon
Copy link
Contributor

QuyTon commented May 23, 2025

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label May 23, 2025
@Fedik
Copy link
Member

Fedik commented May 25, 2025

Same as #45501 (comment)


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

@Fedik Fedik removed the RTC This Pull Request is Ready To Commit label May 25, 2025
@webmasterab
Copy link
Contributor

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.

@richard67 richard67 added the RMDQ ReleaseManagerDecisionQueue label May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-5.3-dev RMDQ ReleaseManagerDecisionQueue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants