Uncaught SyntaxError: Unexpected token /

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

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 6 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6940
    Ariel Jolo
    Ariel 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 Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

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

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

    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:

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

    That should fix the problem 🙂

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #7136
    Ariel Jolo
    Ariel 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)

    Attachments:
    You must be logged in to view attached files.
    #7146
    Ernest Marcinko
    Ernest 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?

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.