• Resolved Andre

    (@andreaskrasa)


    Hey,

    I have downloaded and installed your plugin but cannot get it to work. In edit-mode the maps just don’t load and the map-builder icon cannot be clicked on. The Safari web developer console throws a bunch of errors such as:

    [Error] Origin is not allowed by Access-Control-Allow-Origin.
    [Error] Failed to load resource: Origin is not allowed by Access-Control-Allow-Origin. (js, line 0)
    [Error] Cross-origin script load denied by Cross-Origin Resource Sharing policy.
    [Error] ReferenceError: Can’t find variable: google
    Global Code (map-icons.js:40)
    [Error] ReferenceError: Can’t find variable: google
    Global Code (admin-maps-controls.min.js:1)
    [Error] Cross-origin script load denied by Cross-Origin Resource Sharing policy.
    [Error] ReferenceError: Can’t find variable: google
    initialize_map (admin-google-map.min.js:1:5324)
    init (admin-google-map.min.js:1:137)
    (anonymous function) (admin-google-map.min.js:1:29151)
    dispatch (load-scripts.php:3:12450)
    handle (load-scripts.php:3:9179)

    I have already added

    Header set Access-Control-Allow-Origin “*”
    Header set Access-Control-Allow-Methods “GET, POST, OPTIONS, HEAD, DELETE, PUT”
    Header set Access-Control-Max-Age “3600”
    Header set Access-Control-Allow-Headers “Accept, Authorization, Client-Security-Token, Content-Type, Origin, X-Requested-With”

    to my .htaccess but to no avail. I can’t edit maps – and if I publish an unedited map and add the short-code to a post or page, it is not being displayed either.

    I am using WP Rocket in combination with Cloudflare to cache and minify my site but also after disabling WP Rocket and setting Cloudflare to developer mode the problem still persists.

    Do you have any ideas what’s going on?

    Cheers!

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

    (@webdevmattcrom)

    Can you provide a link to the map so I can see the problem live? That’s really the only way I can have any insight into what the problem might be.

    Thread Starter Andre

    (@andreaskrasa)

    Hi Matt,

    thanks for getting back to me. I have tried to track down the problem by disabling all plugins – and that solved the problem. Turns out that a plugin called WordPress SRI (which I use for creating SRI Hashes on the fly) for some reason didn’t handle the JS-includes from your plugin correctly.

    Disabling SRI solved the problem.

    Thanks again,
    Andreas

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    Glad to hear @andreaskrasa thanks for following up on this.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Maps aren’t being displayed – neither in post nor in edit mode’ is closed to new replies.