? ? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
3 Oct 2017

Numerous options in the plugins and templates are for numbers but the xml field type is text. This pr changes them to the correct value of number.

This ensures that a user cannot enter a letter and only numbers. There are no b/c issues as only a numerical character could ever have worked and there is no change in the way the data is stored.

I spotted this when debugging a user's site where they put "five" in the count field instead of "5" and wondered why it didnt work. After this PR that isnt possible

avatar joomla-cms-bot joomla-cms-bot - change - 3 Oct 2017
Category Front End Plugins Templates (site)
avatar brianteeman brianteeman - open - 3 Oct 2017
avatar brianteeman brianteeman - change - 3 Oct 2017
Status New Pending
avatar C-Lodder
C-Lodder - comment - 3 Oct 2017

In which case you can probably remove filter="integer" and class="validate-numeric"

avatar mbabker
mbabker - comment - 3 Oct 2017

filter="integer" is server side handling (and typecasts the value as an integer versus the default string). The class on the other hand I'll leave to whomever understands whatever the validation logic is in the client side stuff.

avatar C-Lodder
C-Lodder - comment - 3 Oct 2017

@mbabker well you'd like to think type="integer" would automatically cast the value to an integer

avatar mbabker
mbabker - comment - 3 Oct 2017

Well, if we had a data handling layer in the form API that would automatically do conversions then I'd agree with you, but we don't have that so...

avatar brianteeman
brianteeman - comment - 3 Oct 2017

While I agree i think it is beyond the scope of this PR for the reasons I mentioned before

avatar brianteeman brianteeman - change - 3 Oct 2017
Labels Added: ?
avatar Quy Quy - test_item - 3 Oct 2017 - Tested successfully
avatar Quy
Quy - comment - 3 Oct 2017

I have tested this item successfully on 6d5dd76

Code review.


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

avatar Quy
Quy - comment - 5 Oct 2017

Related PR #15020 ?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Oct 2017

@brianteeman @infograf768 can you please look if this PR is related to #15020 as @Quy asked above?

avatar brianteeman
brianteeman - comment - 26 Oct 2017

the changes proposed there are beyond the scope of this pr. If after this one is merged the other changes from that pr are still required then it can be merged once the resulting conflicts are resolved

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Oct 2017

thanks @brianteeman, will test now.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 26 Oct 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Oct 2017

I have tested this item successfully on 6d5dd76


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 26 Oct 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Oct 2017

RTC after two successful tests.

avatar mbabker mbabker - change - 27 Oct 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-10-27 13:30:43
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 27 Oct 2017
avatar mbabker mbabker - merge - 27 Oct 2017
avatar brianteeman
brianteeman - comment - 27 Oct 2017

thanks

Add a Comment

Login with GitHub to post a comment