Success

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
31 Mar 2017

The new maxlength field parameter introduced in #14458 is using a text type, therefore it does not validate when saving.
It concerns text and textarea custom fields plugins

If someone enters some text i.e. "something" it is changed to 0 on save.

Summary of Changes

Changed to type="number"

Testing Instructions

Use staging. Patch.
After patch one will get:

screen shot 2017-03-31 at 09 24 43

screen shot 2017-03-31 at 09 25 08

If someone saves with some alpha string ("something", the field will be saved empty in the database instead of 0

In any case the Tip is really incomplete (not changed in this PR yet).
We have multiple cases:
1.
No value is set in the plugin params
No value is set for the field.
Result => No limit

0 is chosen in the plugin params
No value is set for the field.
Result => No limit

A value is set in the plugin params
No value is set for the field.
Result => The limit is the one set in the plugin params

Any value is set in the field.
Result => The limit is the one set in the field
If value is 0 => No limit.

Therefore we may need a specific tip for the plugin and another one for the field where some of this is explained as what we have now is only:
"The maximum number of characters that can be entered."

We could use for the plugin the existing constant PLG_FIELDS_TEXT_PARAMS_MAXLENGTH_DESC
and for the field
PLG_FIELDS_TEXT_FIELD_PARAMS_MAXLENGTH_DESC

@brianteeman
Any idea to make these tips informative enough?

@laoneo @Bakual

avatar infograf768 infograf768 - open - 31 Mar 2017
avatar infograf768 infograf768 - change - 31 Mar 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 31 Mar 2017
Category Front End Plugins
avatar infograf768 infograf768 - change - 31 Mar 2017
The description was changed
avatar infograf768 infograf768 - edited - 31 Mar 2017
avatar brianteeman
brianteeman - comment - 31 Mar 2017

PLG_FIELDS_TEXT_PARAMS_MAXLENGTH_DESC="The maximum number of characters that can be entered. Enter 0 for no limit."

But personally I dont see the need for that change.

avatar franz-wohlkoenig franz-wohlkoenig - change - 1 Apr 2017
Category Front End Plugins com_fields Front End Plugins
avatar franz-wohlkoenig franz-wohlkoenig - change - 1 Apr 2017
Status Pending Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 1 Apr 2017
Easy No Yes
avatar Crometor Crometor - test_item - 21 Aug 2017 - Tested unsuccessfully
avatar Crometor
Crometor - comment - 21 Aug 2017

I have tested this item 🔴 unsuccessfully on 6d46ae6

I tested the Patch with the "Joomla! Patch Tester" (3.0.0 Beta 3).

The Issue he descriped was recreatable.

After the Patch all non mathematical relevant letters were not accepted by the input field.
But mathematicall relevant letteres/characters like "e","+","-", "," ,"." could still be filled in.
If you do it like that and save, the value displays and saves nothing, but there is no error.

To prevent this behavior "w3schools" did made a fast check up before saving it.
URL: https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_type_number
That gives an Error that says you shall give in a real number (I tested it and typed "3+3" and "4,2" in).

The issue is not fully eradicated yet, so I can not approve it as successfully tested.

@icampus


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

avatar brianteeman
brianteeman - comment - 21 Aug 2017

Try adding step=1

avatar brianteeman
brianteeman - comment - 4 Jan 2018

Closing as the fields must have been updated elsewhere to have type=number

avatar brianteeman brianteeman - change - 4 Jan 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-01-04 19:17:24
Closed_By brianteeman
avatar brianteeman brianteeman - close - 4 Jan 2018
avatar joomla-cms-bot joomla-cms-bot - change - 4 Jan 2018
Category Front End Plugins com_fields Front End Plugins

Add a Comment

Login with GitHub to post a comment