We have a site with many filters on it, such as brand, colour, price, size, gender.
There appears to be a bug in a specific situation, which causes one of the filters to be removed for no known reason.
We start by selecting 2 brand filters, which produces this filter hash:
features_hash=V11145.V275
We then select Male gender, which gives this hash:
features_hash=V11145.75.V2
Here, the 2nd brand we chose has been removed (its only this one brand which this happens to, may be clear below)
The hash SHOULD include a ‘V275’ but it has been removed.
The ‘75’ should be V275. There is something removing the V2, I suspect it is due to the Male filter being called ‘V2’.
Is there a known fix for this? I suspect it’s in the javascript for filters stripping something out wrong?
Changed fn.catalog.php line 5145 from:
$pattern = '/(' . $element . '[\.]?)|([\.]?' . $element . ')(?![\d]+)/';
To:
$pattern = '/([\.]?' . $element . ')(?![\d]+)/';
This stops the filters replacing the V2 in 'V275' when removing the 'V2' filter.