No Code Attached Yet
avatar Waleet
Waleet
25 Aug 2021

Steps to reproduce the issue

Go to System -> Global Configuration -> Smart Search -> Index

image

Here you can input negative weight multipliers.

Expected result

After inputting negative weight multipliers and trying to save said changes, get a popup/message notifying you that negative values are prohibited.

Actual result

You can save negative values for weight multipliers.
This will result in an error when trying to index your data with the new multipliers.

image

System information (as much as possible)

This has been tested on Joomla 4.0 dev and Firefox 91.0.2 64bit with ~1300 articles and Sample blog data installed.

Additional comments

This option makes sense for values from 0-n but values below 0 should be prohibited.

avatar Waleet Waleet - open - 25 Aug 2021
avatar joomla-cms-bot joomla-cms-bot - change - 25 Aug 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Aug 2021
avatar brianteeman
brianteeman - comment - 25 Aug 2021

It would just need this xml updating

so that each of the fields has min="0"

avatar alikon alikon - change - 25 Aug 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-08-25 13:59:10
Closed_By alikon
avatar alikon alikon - close - 25 Aug 2021
avatar alikon
alikon - comment - 25 Aug 2021

please test #35367

avatar Waleet
Waleet - comment - 25 Aug 2021

@alikon oh my bad, I searched for weight multiplier and did´nt find anything but I can test your PR

avatar richard67
richard67 - comment - 25 Aug 2021

@Waleet Please test #35367 and after test mark the test result in the issue tracker here https://issues.joomla.org/tracker/joomla-cms/35367 by using the "Test this" button at the top left corner, then selecting the appropriate test result and then submit. Thanks in advance, and thanks for reporting the issue. Good catch.

avatar Waleet
Waleet - comment - 25 Aug 2021

@richard67 Ty Richard happy to help :)

Add a Comment

Login with GitHub to post a comment