Skip to main content
Inspiring
October 13, 2021
Répondu

Does anyone know the way to fix the following errors whic are listed in the Safari /Inspect Element/

Does anyone know the way to fix the following errors whic are listed in the Safari /Inspect Element/Console:

 

[Error] Not allowed to load local resource: file:///MacBook%20Pro%20HD/Users/ann/Desktop/Web%20Sites/Shelbourne-America/phpmailer-contact-form/form.css (formpage-customised.html, line 11)
[Error] Not allowed to load local resource: file:///MacBook%20Pro%20HD/Users/ann/Desktop/Web%20Sites/Shelbourne-America/phpmailer-contact-form/form.js
[Error] Not allowed to load local resource: file:///MacBook%20Pro%20HD/Users/ann/Desktop/Web%20Sites/Shelbourne-America/Enable%20Submit%20Button%20in%20iOS.js

 

My ISP tells me that i ned to fix these erors from my end but I don't know how to do that!

    Ce sujet a été fermé aux réponses.
    Meilleure réponse par Nancy OShea

    I have changed the positions on my HD of both my own site and the Taumel site so there are no gaps in the names once the folders are viewed on a Browser from my ISP’s hosting site.

     

    If I was a visitor, to the Taumel site I would expect to be able to fill the Form and that it would then be emailed to the Contact when I hit Submit. 

    And that was working previously — but now it seems not to be?

     

    In Safari, this is what I get from the Inspect Elements/Console when I am supposedly accessing the site across the Internet:

    And Firefox cannot find “phpmailer-contact-form/form.js” although it is present.

     

    The Form worked when I had it on my own site but things went wrong when I tried to access it through the 

    https://taumel.shelbourne-america.net

    link.

     

    I though that adding the required “event conversion” Google scripts to the end of the html files  might have caused the problem so I removed them again but it hasn’t helped.

     

    What can I try next?


    No browser can find it because it's pointing to FILE:/// on your MacBook.  Until your resolve that manually in your code, it won't work from any server.

     

    To save time, you could change the path to an absolute URL.

    https : // domain / folder / filename/

     

    4 commentaires

    B i r n o u
    Legend
    October 13, 2021
    Inspiring
    October 13, 2021

    To get rid of the spaces, I would have to rename all of my folders and the name of the MacBook Pro?!

    That is quite some undertaking?!

    Can I install the websites at System-level on a Mac  in-order to by-pass the file-renaming problem?

    Nancy OShea
    Community Expert
    Community Expert
    October 13, 2021

    What works on your local Mac won't work on Linux/Apache web servers.   On the web, spaces in folder & filenames are converted to HTML entities %20 by browsers.

     

    However, HTML5 doesn't allow spaces in filenames and using them will result in code errors.  You may replace spaces with _underscores or hyphens-, but no special characters (&^%$+~) which have a special purpose on web servers.

     

    Nancy O'Shea— Product User & Community Expert
    Nancy OShea
    Community Expert
    Community Expert
    October 13, 2021

    You're not working within a defined local site folder as evidenced by the FILE:/// paths pointing to resrouces on a  local MacBook computer.   Once your site is properly defined, the file paths should resolve to site assets within your local site folder, not your computer HD.

     

     

     

     

    Nancy O'Shea— Product User & Community Expert
    Inspiring
    October 13, 2021

    Nancy;

    I did think that I had set up my DW Site correctly but it seems not?!

     

    This is what I am seeing in DW:

     

    The image is very small but the line (which may be the one that counts?) seems to lead back to my MBP?

    :

    Nancy OShea
    Community Expert
    Community Expert
    October 13, 2021

    When you save a file, paths to asset files should resolve to the correct ones in your site folder.  DW gets confused by code errors though and may not resolve corerctly if there are errors in your code. 

     

    Failing that, remove the old asset and reinsert it.  Save document (Cmd + S).

     

     

    Nancy O'Shea— Product User & Community Expert
    B i r n o u
    Legend
    October 13, 2021

    first question... if you use Dreamweaver, have you created a site, or at least defined a site from Dreamweaver ?

     

    These errors occur because the file paths shown are files using local sources on the computer. They cannot be loaded by browsers for security reasons, most of the time because they are called by a script.

     

    Use a relative path either to the document or to the root of the site.

    if you don't understand what I'm saying, don't hesitate to say so, I'll try to be more clear 😉

    Inspiring
    October 13, 2021

    Birnou:

    Thank you so much for your very quick reponse.

    Yes, I do work within a DW-Site and I thought that the scripts were all safely contained within the Site folder.

    I uploaded the complete Site folder manually to my ISP using Filezilla.

    The strange thing is that the PHPMailer Contact Form was working perfectly but just stopped working?

    This what my Site Folder contains:

    I don't know how to "Use a relative path either to the document or to the root of the site." so I would love to know how to do that!

    B i r n o u
    Legend
    October 13, 2021

    instead of using such a path

    file:///MacBook%20Pro%20HD/Users/ann/Desktop/Web%20Sites/Shelbourne-America/phpmailer-contact-form/form.css

    I suppose that your web site is located in the folder Shelbourne-America, so

    if you want to define a path relative to the web site, it means relative to the root of the folder where your web site is contained... you use a slash to start the path... so the path will

    /phpmailer-contact-form/form.css

     

    now if you want to use a path relative to the document... the starting point wont be the web site root folder, but the document that call (or include) the related file... but this time the path doesn't start at all by a slash. so in the previous exemple, if the hosting file is located at the root folder (sibling of the phpmailer-contact-form, the new path will be

    phpmailer-contact-form/form.css

    same as the previous one but without the starting slash

     

    does this makes sense for you ?

     

     

     

    by the way I see in the current path you use, that you use spaces... space are represented by the %20 string ... it is completly not permited in safe web... so use a - or a _ but not a space

    see... you have thre %20

    file:///MacBook%20Pro%20HD/Users/ann/Desktop/Web%20Sites/Shelbourne-America/phpmailer-contact-form/form.css

     

    anyway if you define corretly the web site in dreamweaver and use relative path (document or website, whatever) those %20 will not appear, because your path will be resume to

    /phpmailer-contact-form/form.css

    or to

    phpmailer-contact-form/form.css

    and there is now spaces in those ones...

    Inspiring
    October 13, 2021

    Sorry for the appalling typos in my previous message! I tried to edit but the Edit button doesn't work