• Resolved madefortravellers

    (@madefortravellers)


    Hi,

    Ik heb vorige week de plugin ge?nstalleerd, maar daarna werkte mijn booking.com searchwidget op de homepage niet meer.
    Vervolgens plugin weer verwijderd, eigen thema opnieuw ge?nstalleerd en wordpress opnieuw ge?nstalleerd, maar het werkt nog steeds niet.

    Enig idee hoe ik dit kan oplossen? Alle andere javascript codes / searchwidgets (zoals skyscanner) werken prima.
    Dus ik begrijp niet zo goed wat er misgaat.

    Alvast bedankt voor je hulp.

    Grtz,
    Leon

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Hey Leon;
    Ik zal in het Engels antwoorden, wie weet hebben anderen hier later ook iets aan ??

    Can you try adding plugins/bookingcom-official-searchbox to the comma separated JS and/or CSS optimization exclusion lists?

    Groeten uit Belgi?,
    frank

    Thread Starter madefortravellers

    (@madefortravellers)

    Hi Frank,

    Thanks for you quick response. I added plugins/bookingcom-official-searchbox to both JS/ CSS exclusion lists. But it didn’t do the trick.

    It’s still not showing the search box. I only can see the booking.com url.

    For the homepage, I’m not using the plugin, because that only works as a widget in the sidebar. So I use a custom code from booking.com for the search widgets. This is the code is use;

    
    <ins>
       <ins>
            <a href="//www.booking.com?aid=1720493">Booking.com</a>
    </ins>
    
    <script type="text/javascript">
        (function(d, sc, u) {
          var s = d.createElement(sc), p = d.getElementsByTagName(sc)[0];
          s.type = 'text/javascript';
          s.async = true;
          s.src = u + '?v=' + (+new Date());
          p.parentNode.insertBefore(s,p);
          })(document, 'script', '//aff.bstatic.com/static/affiliate_base/js/flexiproduct.js');
    </script>
    

    Do you have any other ideas how to fix it?

    Grtz

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, I see, can you try adding flexiproduct.js to the comma-separated JS optimization exclusion list?

    Thread Starter madefortravellers

    (@madefortravellers)

    Yes I did. Strange thing is that it shows the search widget the first time, but when I refresh the page, it only shows the link instead of the search widget??

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    that’s … peculiar ??

    OK, so;
    * if you disable JS optimization (and leave CSS active), does the widget always show?
    * if you disable CSS optimization (and leave JS active), does the widget always show?
    * if the widget does not appear, do you have JS errors on the browser console?
    * can you reproduce the widget not working in an anonymous browser session (so not logged on)?

    frank

    Thread Starter madefortravellers

    (@madefortravellers)

    Hello again,

    The answer to all your questions is no. Sometimes the widget shows, sometimes not.

    I also got an answer from Booking.com ;

    If your website is built with WordPress, our links can be used as well as our standard widgets from the Partner Center. However, the widgets will only be displayed in combination with the Product Helper, as the standard html code is not always supported by WordPress, and is thus unreliable. Sorry!

    So I installed the product helper plugin from Booking.com , but that doesn’t do the trick. It still shows only the url instead of the search widget.
    I even disabled Autoptimize plugin; didn’t resolve the problem. Enabled it again ; no luck.
    Downgrade wordpress back to 4.9.8 (because the product helper plugin is not tested with wordpress 5.0) ; no luck.

    So I’m out of ideas… can you still think of something?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Afraid that if it doesn’t even work when AO is disabled, then I (being only knowledgeable about all things AO) am out of ideas @madefortravellers .. The part about “the standard html code is not always supported by WordPress, and is thus unreliable” is .. weird though, don’t understand what they’re implying here, from a technical point of view.

    Thread Starter madefortravellers

    (@madefortravellers)

    Hello again!

    Seems I found what’s the problem , I added to scripts in footer: <script async defer src=”//aff.bstatic.com/static/affiliate_base/js/flexiproduct.js”></script>
    via the plugin ‘insert headers and footers’
    And now it shows the correct widget always ??
    Thanks again for your help!

    Grtz Leon

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Great work Leon, thanks for sharing! ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Search widget Booking.com not showing after installing autoptimize’ is closed to new replies.