Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Unexpected token '�', "�ή啉Ȩ顑с̩p�光"… is not valid JSON
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 5 months, 1 week ago.
- AuthorPosts
- March 27, 2024 at 12:54 pm #47612
It’s not every session, but I’m often getting the following error, which is preventing the live search from executing and even stopping the person from clicking enter or clicking on the search symbol:
Uncaught SyntaxError: Unexpected token ‘�’, “�ή啉Ȩ顑с̩p�光”… is not valid JSON
at JSON.parse (<anonymous>)
at asp-wrapper.js:122:33
at Array.forEach (<anonymous>)
at window.ASP.getInstances (asp-wrapper.js:114:34)
at window.ASP.initializeSearchByID (asp-wrapper.js:89:29)
at asp-wrapper.js:142:37
at Array.forEach (<anonymous>)
at IntersectionObserver.<anonymous> (asp-wrapper.js:140:33)March 27, 2024 at 5:47 pm #47625Hi Douglas,
I hope you are doing fine!
After some debugging I have found that one of the search element outputs is altered after it’s printed causing an invalid data object.
The issue is caused by a backslash character added to the output here: https://i.imgur.com/W3JVtcz.pngThat character is not coming from the plugin, I verified by printing the output, as-is. I suspect perhaps a HTML minification, obfuscation, threat protection via CDN or something along those lines is trying to minify/change the output and somehow that gets there.
I recommend checking any HTML minify, CDN options or anything along those lines.The page looks minified, so it is very likely related to that feature.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 27, 2024 at 7:37 pm #47631Thanks Ernest, I’ll dig in deeper to see what i can find!
March 28, 2024 at 10:04 am #47632Let me know 🙂 Maybe I can do something to test and avoid in a future release.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.