?
avatar ReLater
ReLater
1 Aug 2021

During migration of some "living" J3 pages clones to J4 I recognized that some fields Meta Description in articles look empty. But they aren't empty tells me the browser inspector. The character counter that is activated (not overridable and not configurable) for all core fields of name="metadesc" stupidly hides the text and stupidly shows a message "160 characters remaining of 160 characters".

This happens whenever a database field metadesc of an article has more than 160 characters.

Steps to reproduce the issue

  • Create an article. Enter 160 Characters in field Meta Description.
  • Save.
  • Go into databse table #__content edit the article entry by copying the metadesc to double length or so.
  • Inspect the article again:

02-08-_2021_01-07-42

Expected result

  • A character counter shouldn't cut existing text and not hide existing text. Users must have a possibility to correct their Meta Descriptions (and only if they want to). Therefore they must see it in full length.
  • A core-side limitation of the length without the possibility of configuration is a no-go. No one knows whether the default length of 160 characters is also recommended for the future.
  • There is only the possibility to manipulate the JLayout textarea.php, but not in a flexible way.

Actual result

  • See image and description above

Additional comments

avatar ReLater ReLater - open - 1 Aug 2021
avatar joomla-cms-bot joomla-cms-bot - change - 1 Aug 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Aug 2021
avatar brianteeman
brianteeman - comment - 2 Aug 2021

This is actually not because of the shortandsweet javascript

The field has a maxlength of 160 defined in the xml

avatar coolcat-creations
coolcat-creations - comment - 2 Aug 2021

Thats not good, there are different recommendations for the desc and the administrator should be able to set an own limit or disable the limit. Last year there were even recommendations for 270 chars - now we are back to 156.

avatar ReLater
ReLater - comment - 2 Aug 2021

This is actually not because of the shortandsweet javascript

Believe me that I have tested that in detail before I post statements like above. When the character counter is disabled then you see the whole text. If enabled you see nothing. But you see whole text in browser inspector.

Used current Firefox

Follow my test instructions. Go to articles.xml. Remove charcounter="true". Let the rest like it is. Then open the article in BE.

02-08-_2021_16-22-21

avatar ReLater
ReLater - comment - 2 Aug 2021

Last year there were even recommendations for 270 chars - now we are back to 156.

There were also tests that made clear that the recommendations differ extremely between mobile and desktop search views and from search engine to se.

We use our custom, half-assed and ugly char counter plugin on all sites (but not a11y). Therefore a global override of textarea.php is not a problem for us to get rid of the core counter. But at least existing texts shouldn't be cropped or invisible; for any user. And the global override is not a practicable solution for all sites and users.

avatar brianteeman
brianteeman - comment - 2 Aug 2021

retested without charcount=true and the ability to type text stops after 160 chars

avatar ReLater
ReLater - comment - 2 Aug 2021

and the ability to type text stops after 160 chars

That's not what I'm talking about. I talk about existing meta descriptions, not newly created ones. In my test scenario you get the old description, you see it and can save the article without changing it. Length not cropped.

avatar ReLater
ReLater - comment - 2 Aug 2021

Sometimes I wonder why we have to provide testing instructions...

avatar brianteeman
brianteeman - comment - 2 Aug 2021

unsubscribe

avatar dgrammatiko
dgrammatiko - comment - 3 Aug 2021

There's a PR upstream: rikschennink/short-and-sweet#5

I can't fix it in this repo as the bug is not in our codebase ?‍♂️

avatar ChristineWk
ChristineWk - comment - 3 Aug 2021

Unfortunately can't be of any help because I don't understand enough about it. Thanks for your investigation @dgrammatiko

avatar rikschennink
rikschennink - comment - 4 Aug 2021

Merged the upstream PR, couldn't reproduce the issue, so should it remain, please provide a plain HTML test case and I'm happy to investigate.

avatar dgrammatiko
dgrammatiko - comment - 4 Aug 2021

@rikschennink thanks for merging the PR!

@ReLater please test #35039

avatar alikon alikon - change - 4 Aug 2021
The description was changed
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-08-04 08:40:51
Closed_By alikon
Labels Added: ?
Removed: ?
avatar alikon alikon - close - 4 Aug 2021
avatar alikon
alikon - comment - 4 Aug 2021

closing

Add a Comment

Login with GitHub to post a comment