In a Swift site when searching for some but not all search terms an error was generated:
The filter operation returned a script error. Please try again, and contact us if the error persists. The error was: [SyntaxError: parseJSON]
This error persisted despite applying the fixes at:
https://community.sellerdeck.com/for…rror-parsejson
and
https://community.sellerdeck.com/for…taining-quotes
Sellerdeck Development have kindly come up with a solution:
Please go to the current site folder and take a backup copy of ‘SearchScript.pl’
Open the script in a plain text editor and find the following lines of code::
my $nResultCount = scalar (@arrProductFields); my $sResults = join ('","', @arrProductFields);
and replace it with::
my $nResultCount = scalar (@arrProductFields); for (@arrProductFields) { s/"/\\"/g; } my $sResults = join ('","', @arrProductFields);
Save the changes and upload the site
This resolve the issue that Norman noted, but the other issue is with regard to caching. I think this deals with another issue, sadly the ‘ SyntaxError: parseJSON’ error is a catchall.
Thanks and acknowledgements to Gary Green and Sellerdeck Developers
Keep in touch and share
Graphicz on Social Media
01323 872296. 07836 551000.
Email: