Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › ASP form throws javascript errors on search results page
- This topic has 4 replies, 2 voices, and was last updated 4 years, 6 months ago by
feelslikefriday24.
-
AuthorPosts
-
December 6, 2021 at 12:19 pm #35877
feelslikefriday24
ParticipantOn the search result page the plugin throws an error and just shows the spinning wheel:
TypeError: undefined is not an object (evaluating ‘d.style[a]=b’) asp-prereq.js:18:393
When I hit enter after change the input value (or click the magnifying glass) the console shows this error:
SyntaxError: The string did not match the expected pattern. asp-prereq.js:9:490
(Link https://firstfriday.biz.feelslikefriday.com/?s=learn&asp_active=1&p_asid=1&p_asp_data=1&customset%5B%5D=training-academy&customset%5B%5D=team-members&customset%5B%5D=product&customset%5B%5D=page&customset%5B%5D=post&asp_gen%5B%5D=excerpt&asp_gen%5B%5D=content&asp_gen%5B%5D=title&filters_initial=1&filters_changed=0&qtranslate_lang=0&woo_currency=GBP¤t_page_id=1796 – note that you will need to click the search icon in the top menu to make the search form appear)
I’ve tried:
– Disabling all plugins bar ASP, the error remains
– Changed to blankslate plugin, added the ASP form to the search page and checked: issue still there.
– Emptying the search page template (bar header and footer), the error remains.
– Removed a lot of functions in functions.php that would potentially interfere with search the page but to no avail.
– Changed to Javascript source to non-minified and script loading method to classic in the Compatibility settings
It throws different error (but effectively caused by the same issue it seems):
TypeError: selector.indexOf is not a function. (In ‘selector.indexOf(‘asp_es_’)’, ‘selector.indexOf’ is undefined)I checked error_log but that file’s empty
I inherited this website from a developer who magically disappeared and am still trying to understand how it’s all set up. It’s using blankslate theme with custom templates. I’m really hoping you ran into this issue before and it’s an easy fix!
https://firstfriday.biz.feelslikefriday.com/wp-admin/
U: tmp-admin
P: $Brlou*S6)B!fMh#^7l^*C34December 6, 2021 at 1:15 pm #35878Ernest Marcinko
KeymasterHi,
Thank you very much for the details, it helped a lot!
I found the issue, it was a minor script bug, where an element selector was empty, and the script halted at that point with an error message. I will make sure to include this fix in the upcoming release, it should be all right now 🙂
December 6, 2021 at 2:08 pm #35879feelslikefriday24
ParticipantNice catch Ernest, and thanks for your quick reply! I’m looking forward to the next release 🙂
cheers,
PeteDecember 6, 2021 at 2:12 pm #35880Ernest Marcinko
KeymasterYou cannot access this content.
December 6, 2021 at 2:19 pm #35881feelslikefriday24
ParticipantYes, please close ticket and I will leave you a review.
-
AuthorPosts
- The topic ‘ASP form throws javascript errors on search results page’ is closed to new replies.