? Pending

User tests: Successful: Unsuccessful:

avatar chmst
chmst
12 Nov 2021

Pull Request for Issue #36016.

Summary of Changes

As title says. For both tag modules.

Testing Instructions

Use more than 20 tags to yor articles,
Set the maximum to a number > 20 and make sure that the tags are displayed corrctly in frontend

Actual result BEFORE applying this Pull Request

see #36016

Expected result AFTER applying this Pull Request

Any number is possible

Documentation Changes Required

avatar chmst chmst - open - 12 Nov 2021
avatar chmst chmst - change - 12 Nov 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 Nov 2021
Category Modules Front End
avatar HLeithner
HLeithner - comment - 12 Nov 2021

if you do it this way you have to modify the php code to allow "0" as no limit option.

avatar Shubhamverma2796
Shubhamverma2796 - comment - 12 Nov 2021

Before:
screen shot 2021-11-12 at 14 24 55

Clearly visible that the maximum count is 20

After:

screen shot 2021-11-12 at 14 28 02

Now user can set the value of the maximum count.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36019.
avatar Shubhamverma2796 Shubhamverma2796 - test_item - 12 Nov 2021 - Tested successfully
avatar Shubhamverma2796
Shubhamverma2796 - comment - 12 Nov 2021

I have tested this item successfully on 38eb9e9


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

avatar BertaOctech BertaOctech - test_item - 12 Nov 2021 - Tested successfully
avatar BertaOctech
BertaOctech - comment - 12 Nov 2021

I have tested this item successfully on 38eb9e9

I followed the test instructions and the patch worked as described.


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

avatar alikon alikon - change - 12 Nov 2021
Status Pending Ready to Commit
avatar alikon
alikon - comment - 12 Nov 2021

RTC


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

avatar brianteeman
brianteeman - comment - 12 Nov 2021

@HLeithner requested valid changes. please remove RTC

avatar alikon
alikon - comment - 12 Nov 2021

oops missed that

avatar chmst
chmst - comment - 12 Nov 2021

@HLeithner default is 5 as in other modules. The value 0 is not really useful, of course, as the result then would be empty, but for mysql this is not a problem.
If I change it here ( 0 = all), we must change it in all other modules too.

avatar Quy Quy - change - 12 Nov 2021
Labels Added: ?
avatar HLeithner
HLeithner - comment - 13 Nov 2021

@HLeithner default is 5 as in other modules. The value 0 is not really useful, of course, as the result then would be empty, but for mysql this is not a problem. If I change it here ( 0 = all), we must change it in all other modules too.

That's the reason I requested the implementation for this case in php (check for 0 and remove the setlimit call)

avatar chmst
chmst - comment - 14 Nov 2021

Made the changes as requested by @HLeithner . Only if the input is > 0, the maximum number is set as limit. Could you please re-test? @BertaOctech @Shubhamverma2796 ? Thanks!

avatar richard67 richard67 - change - 14 Nov 2021
Status Ready to Commit Pending
avatar richard67
richard67 - comment - 14 Nov 2021

Back to pending.


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

avatar Shubhamverma2796
Shubhamverma2796 - comment - 14 Nov 2021

@chmst I applied the path and here are the results:

Screenshot (272)

As you can clearly see the maximum tag value can be set as negative too. I think you should set the lower limit to 0 because obviously there is no point in setting -ve values.

avatar chmst
chmst - comment - 16 Nov 2021

The min attribute in the number field is not validated. Also with min=0 it is possible to enter every negative value. This is not in scope of this PR.

avatar chmst chmst - change - 16 Nov 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-11-16 17:49:55
Closed_By chmst
avatar chmst chmst - close - 16 Nov 2021
avatar richard67
richard67 - comment - 16 Nov 2021

@chmst Why closed?

avatar chmst
chmst - comment - 16 Nov 2021

@Shubhamverma2796 would you like to open an issue for the bug you found in joomla? #36019 (comment)
Maybe you also find a solution ;)

avatar Shubhamverma2796
Shubhamverma2796 - comment - 17 Nov 2021

@chmst How can I open an issue because this PR is closed before getting merged, and the hard limit is still 20. Please correct me if I'm wrong.

avatar chmst
chmst - comment - 17 Nov 2021

The hard limit is independent from this. You found out, that it is possible to enter a negative value into a field of type="number" , also when the attribute min="0" is set. The field does not validate the input.

You can open a new issue here
image

and write a bug report. If you want ;)

avatar Shubhamverma2796
Shubhamverma2796 - comment - 19 Nov 2021
2021-11-19.17-53-40.mp4

@chmst In the above video, you can see that I've fixed the issue; whenever the user tries to input any -ve value, the value automatically gets changed to 0. In this way, we can easily prevent the user from entering any negative value.
The problem is I am new here and not well-versed with the PHP and code structure of Joomla. Therefore, I cannot figure out where(in which file or folder) I should put the function written by me so that everything works fine. If anyone can guide me, then it would be my pleasure.
Thanks

Link to the function

avatar brianteeman
brianteeman - comment - 19 Nov 2021

@Shubhamverma2796 javascript is not the solution

avatar brianteeman
brianteeman - comment - 20 Nov 2021

The min attribute in the number field is not validated. Also with min=0 it is possible to enter every negative value. This is not in scope of this PR.

Just add validate="number" and this will ensure that the min=0 is validated

avatar Shubhamverma2796
Shubhamverma2796 - comment - 22 Nov 2021

@chmst should I open a new pr for #36016 or will you re-open this pr itself?

Add a Comment

Login with GitHub to post a comment