[Resolved] Javascript Calc works when logged in, but doesn't work when logged out.

Home Forums Support [Resolved] Javascript Calc works when logged in, but doesn't work when logged out.

Home Forums Support Javascript Calc works when logged in, but doesn't work when logged out.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #690416
    James

    Hi,

    I have installed a Javascript Calculator, when I am logged in it works fine. It is from the current site. I have installed on the development site.
    What could explain why it works logged in and doesn’t logged out.
    Any suggestions would be gratefully accepted.

    #690498
    David
    Staff
    Customer Support

    Hi there,

    I am seeing this error in the console:

    Refused to execute https://raw.githubusercontent.com/jquery/jquery-ui/master/external/jquery-1.11.3/jquery.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.

    #690537
    James

    Hi David,

    Thanks for answering.
    I saw that as well. I can take that line out it makes no difference. And in the original site, it has the same warning and the calculator works fine.
    Similarly when logged in, I get that warning, calc works fine.
    T

    #690926
    Tom
    Lead Developer
    Lead Developer

    WordPress already adds jQuery to the page if needed, so you should be able to remove this line of code:

    <script type="text/javascript" src="https://raw.githubusercontent.com/jquery/jquery-ui/master/external/jquery-1.11.3/jquery.js"></script>

    Let me know ๐Ÿ™‚

    #702006
    James

    Hi Tom,

    Sorry for the late reply, and thank you for yours. I had the calculator working. However I then uninstalled and reinstalled both GP and GP Premium due to other conflicts with Elementor, unable to edit templates. That fixed those.
    However I find myself back here again with the same issue.
    I have followed your instruction and removed that line of code, i am now seeing this error when trying to operate the calc –
    JQMIGRATE: Migrate is installed, version 1.4.1
    /wp-content/plugins/pdf-embedder/js/pdfjs/pdf.worker.min.js:1 Warning: TT: undefined function: 32
    /wp-content/plugins/pdf-embedder/js/pdfjs/pdf.worker.min.js:1 Warning: TT: undefined function: 32
    (index):384 Uncaught TypeError: Cannot read property ‘style’ of undefined
    at submitFunction ((index):384)
    at HTMLInputElement.onclick ((index):718)

    Any suggestions?

    #702372
    Tom
    Lead Developer
    Lead Developer

    Does it go away if you deactivate the pdf-embedder plugin?

    #702389
    James

    Hi,
    No. It simply doesn’t fire at all since I reinstalled. Although the above fix regarding the jquery line of code seems to be fine.

    #702703
    Tom
    Lead Developer
    Lead Developer

    It looks like that file I mentioned above has been re-added?: https://www.screencast.com/t/HOl2IGJ6e

    Can you try removing it again?

    #702980
    James

    Hi Tom,

    I removed it in the Elements, set element to apply only on relevant page. Deactivated plugins I was using previously. And (fingers crossed) it seems to be working without issue.
    Thanks for all the help and advice.
    Love your work.

    #703417
    Tom
    Lead Developer
    Lead Developer

    Glad I could help ๐Ÿ™‚

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