Before you ask please READ THIS

Script issue in a page

edited June 2016 in Photon Posts: 37
Dear customer support,

I'm having troubles to load a script into a page, the script was given to me by the fork and it is a reservation module.

The script looks like this

<script src="https://module.lafourchette.com/en_GB/js/iframe/mypersonalID" type="text/javascript"></script>
the strange thing is that if i click on the top menu "reservations" the page is displayed but the module is not, but if i refresh the page o I just click again on Reservations on the top menu, the module is shown and working.

Why the first time I load the page it is unable to load the script?

the website is www.thaigallery.it
the page is "reservations"

I have all AD block disabled and I tried with safari and also with firefox.

thank you.
Post edited by Air on

Comments

  • Posts: 37
    it seems that I cannot post script, please tell me if i can message you with the script
  • AirAir
    Posts: 10,970
    Hello:-)

    Posting code: http://support.apollo13.eu/discussion/12/before-you-ask-read-this-#general_rules point 7

    Your issue - do you have AJAX ON? Disable it if you plan to use external scripts http://apollo13.eu/docs/photon/#!/ajax_settings

    With kind regards.
  • Posts: 37
    Yes I have ajax on because i have music on the website and it seems that disabling it will reload the music for every page
  • edited June 2016 Posts: 37
    The code is this:
    
    <script src="https://module.lafourchette.com/en_GB/js/iframe/mypersonalID" type="text/javascript"></script>
    
    Post edited by Air on
  • AirAir
    Posts: 10,970
    If it fixes the issue, then you can't have both things, you have decide or modificate code so it will work with AJAX(hard task).

    With kind regards.
  • Posts: 37
    ok it works disabling the ajax, so now I have the AJAX ON and i'm writing the rules for
    "Sites that shouldn't be loaded dynamic"

    I added

    /prenotazioni_fork/
    /reservations_fork?lang=en

    the firs is the permalink for the Italian page, the second is the relative english page with WPML.
    in italian is working, but in english it seems like the rule doesn't recognize the link, also if I remove the parameter ?lang=en

    any suggestions?
  • AirAir
    Posts: 10,970
    Try putting not working page as first entry in that list, cause maybe there is problem in that mechanism.

    With kind regards.
  • Posts: 37
    mmm if I put the not working page as first row, nothing works no more, even the second one that normally is working (the italian page)
  • AirAir
    Posts: 10,970
    Probably parameters ?lang=en in address breaks this functionality. Can't you switch to languages that creates permalinks like /en/sample-page ?

    With kind regards.
  • Posts: 37
    yes this is a good trick, now it is working

    thank you
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion