• Hi support,

    I’ve inserted “search form widget” to my home page and it works great. However, after clicking on a chosen date from datepicker pop-up it does not change on the search form. I can see that backend is reading date changes correctly beacuse after submiting the form it returns valid results. I can also see that the calendar pop-up see the changes because it highlights the “day-after” date in the “check-out” section after choosing the date in the “check-in” section. Same thing happens with “Guests” section – after clicking “2 rooms” on a pop-up, front-end does not react, only backend does. Only “Category” section reacts correctly on the front-end as well as on the back-end side. Do you know how can I resolve this issue?

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author e4jvikwp

    (@e4jvikwp)

    Hi,

    Thanks for sharing a link to your website home page, where we do see the “Search Form” widget of VikBooking.

    The datepicker calendars are not working correctly because of JavaScript errors caused by third-party plugins. If you use the console of your browser, you will see such JavaScript errors.

    More precisely, the error indicates a “JavaScript syntax error”, which is caused by a plugin on your website that manipulates the source code of the page, by converting pure JavaScript code into HTML entities.
    Basically, some process/plugin on your website is currently replacing pure JS code like “&&” into “&&”, which is the corresponding HTML entity of the ampersand character. This obviously breaks the whole JavaScript code, hence the datepicker calendars.

    No process or third-party plugin should manipulate, encode or convert the source code of your page, especially if such text is actually JavaScript code inside a script tag.

    The only thing we can suggest is to try to look for the plugin or process/hook responsible of this behavior, because it’s currently generating JavaScript errors on your website by breaking any JavaScript application, such as the datepicker calendars. You can use the browser console to see such errors with all their details.

    We hope this helps!

    The VikWP Team

    Thread Starter antoni2003

    (@antoni2003)

    Hi thanks for great response,

    I have deleted all of my plugins beside vikbooking and the errors still appear. I am currently using “Legacy Widget” plugin to insert “Legacy Widgets” into the page but I don’t think it works correctly. When i switched to none-Gutenberg theme your widget works great but on my current one I dont have “Customizer” section. I?have also updated my?theme “function.php” file so I could find “Widgets”?option below “Appearance” section in WordPress Admin site. After that I’ve added?“Search Form” widget into the “Home right sidebar” widget area. I can’t really figure?out what to do next and how to insert “Search Form” widget into my home page. Also when i clicked on “manage live preivew” from “Widget” section it says “Your theme has 1 widget area, but this particular page does not display it.“. Can you assist me on that issue?

    Plugin Author e4jvikwp

    (@e4jvikwp)

    Hi,

    We are sorry to hear you are still having the same JavaScript conflicts. If it was not a plugin, then it may be the Theme that is somehow manipulating the source code of the page.

    If you use the browser console in your home page, you will notice immediately the error “Uncaught SyntaxError: ‘#’ not followed by identifier”. This takes you to the JavaScript code declared by VikBooking to render the datepicker calendars. However, the “Syntax Error” is caused by the fact that the original JavaScript source code of VikBooking is manipulated (converted to HTML entities), hence broken. The native code of our plugin uses a common “AND” logical operator, which is written as “&&” (double ampersand character). However, the source code of your page is using the respective HTML entity of such character, which is “#038;”, and this obviously breaks the whole code.

    Unfortunately, the most we can suggest is to show the situation to the Theme developers, because whoever is converting text into HTML entities is doing it wrongly, because JavaScript snippets should remain unchanged, or the page will be broken with JavaScript errors. The code that is being manipulated is inside a script tag, and so no processes should modify it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Search form widget’ is closed to new replies.