JoomGalleryfriends / JG4-dev

Development repository for JoomGallery v4.x
GNU General Public License v3.0
10 stars 6 forks source link

[All content types] Titles containing only spaces should result in an error #91

Closed eumel1602 closed 8 months ago

eumel1602 commented 1 year ago

In PR #86 I noticed that: If I use an image or a category or a tag with only one or more spaces as a title, it saves it, but I can never edit the image again. Saving a e.g. Image with only one space should show an error from my point of view! / when I save a second image with one or more spaces, the system automatically adds a "(2)" and so it's clickable... bildschirmabgriff

reni68 commented 1 year ago

IMHO, titles that start with a space should also bring an error.

szepty-ziemi commented 1 year ago

We should follow Joomla approach, with the same notice:

obraz

Also, Joomla allows to put any spaces at the beginning of the title without any error:

obraz

It allows to save them... but they are just not displayed on articles list or in frontend.

togo-de commented 1 year ago

Why not trim and check the title data before save? If the title empty after trim, return with an error or include a #NONTITLEGIVEN# string.

Elfangor93 commented 8 months ago

Close this, since it is fixed with PR#176.