Regex /([^\d]*)(?:[\d .,]+)([^\d]+)(?:[\d .,]+)(.*)/
in file \modules\ps_facetedsearch\_dev\front\slider.js
on line 29 uses character ' '
instead of '\s'
for space, which leads to incorrect group matching behavior in situations where you use space-separated product properties like weight/price, for example: 1 234
(Notice space between 1 and 2). I dont know exactly why, because i'm not a JS-geek or smth, i was just doing my site and wasted good 8 hours diggin into code trying to understand why after enabling filter in my website i see some extra numbers for weight/price filter label. Suddenly i have no time currently to make a proper pull request, because i am only focusing on making theme for my website currently.
Consider this:
min = 180,
max = 24568
unit = "g"
This is displayed as 180g - 24568 568g
.
Also, moving slider changes value 24568 instantly, and when finaly mousehold is over, last value also updated, but i believe it had nothing to do with the initial bug and it is just a consequence.
I expected to see range slider with this filter label:
180g - 24 568g
Steps to reproduce the behavior:
Facetedsearch module
for main catalogue pageScreenshots
Before changing regex pattern:
After changing regex pattern to /([^\d]*)(?:[\d\s.,]*)([^\d]*)(?:[\d\s.,]*)([^\d].*)/
directly inside modules\ps_facetedsearch\views\dist\front.js
I have to say that is one of the most complete bug reports I have ever seen 馃憦
Hi @neonVoice ,
Thanks for the report.
I manage to reproduce this using PS 1.7.6.8 and faceted_search module v3.5.0 and v3.6.0.
I鈥檒l add this to the debug backlog so that it鈥檚 fixed.
If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Thanks!
Most helpful comment
I have to say that is one of the most complete bug reports I have ever seen 馃憦