This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Uncaught SyntaxError: Unexpected token /

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Uncaught SyntaxError: Unexpected token /

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6940
    Ariel JoloAriel Jolo
    Participant

    Hi ! I was using ajax search pro 4.5.1 but when I upgraded to 4.6.0 the plugin stopped working and I get this message in the browser console:

    Uncaught SyntaxError: Unexpected token /

    You can check the search boxes in the homepage and http://dev.openqube.io/calificar-empresa/

    Thanks

    #6941
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I see the following text in the “No results text” parameter:

    [code]<a href=/calificar>No se encontraron empresas. <strong>Agregala!</strong></a>[/code]

    Unfortunately this is no longer possible to use HTML in the parameter there. It raised security concerns and I had to remove it.
    Please remove HTML tags from the No results text option on the Layout Options -> Results layout panel.

    You can still use that HTML though, by using result templating, which is much safer and update proof as well. Here is a quick tutorial link.

    In your case you will have to first copy the wp-content/plugins/ajax-search-pro/includes/views/results/no-results.php file into a new folder named “asp” in your current theme folder. Then make the change on that copied file on line 30 to:

    [html]<a href=/calificar>No se encontraron empresas. <strong>Agregala!</strong></a>[/html]

    That should fix the problem 🙂

    #7136
    Ariel JoloAriel Jolo
    Participant

    Hi, thank you very much for your reply ! indeed that was the issue.

    In WordPress 4.3.1 I could fix the problem the way you suggested but in 4.4 I’m getting this (see attachment)

    #7146
    Ernest MarcinkoErnest Marcinko
    Keymaster

    I’m not sure what should I look for on the screenshot. Is the text missing or something else?

    Is there an example where I can look at this?

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.