• Resolved jdurdach

    (@jdurdach)


    I am currently working on a website for a client. I am attempting to move the website from a dev to a stage environment. I do this using ServMask’s All-In-One migration plugin. The site is built with Divi.

    When I export the site from dev, then import it to stage, several resources on the homepage display incorrectly and there are a handful of console errors (see below).

    Access to font at 'https://192.168.98.2/blackandbrass/wp-content/themes/Divi/core/admin/fonts/modules/all/modules.ttf' from origin 'https://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

    GET https://192.168.98.2/blackandbrass/wp-content/themes/Divi/core/admin/fonts/modules/all/modules.ttf net::ERR_FAILED

    Access to font at 'https://192.168.98.2/blackandbrass/wp-content/themes/Divi/core/admin/fonts/modules/all/modules.woff' from origin 'https://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

    GET https://192.168.98.2/blackandbrass/wp-content/themes/Divi/core/admin/fonts/modules/all/modules.woff net::ERR_FAILED

    192.168.98.2 is the dev server and localhost is the stage. I’ve used this method for several other projects before and I have never had this issue. Does anyone have any insight on this issue? Please let me know, thank you.`

    • This topic was modified 3 years, 2 months ago by jdurdach. Reason: Updated info from original post
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Yani

    (@yaniiliev)

    I think you might have hardcoded these URLs in your files. Check your theme, especially the css files and make sure that you are using relative urls. For example:

    .theme-image {
      background-image: url('../images/header-img.jpg');
    }
    Thread Starter jdurdach

    (@jdurdach)

    @yaniiliev thank you for the reply, that solved it! I just used VS Code’s find + replace feature to bulk update all of my files for now. I’ll parse through at a later date. Much appreciated!

    @yaniiliev it also happens from my side. The situation is our WP is hosted on the AWS server and we have staging env and prod env. And we are using WP as the CMS. So live site is hosted on another server. When I use all-in-one to export the file from staging and import it to the prod, some of the imgs are having CORES issue (not all of them) and if I ctrl+F5 to refresh the page, those imgs might work, but other imgs which was working will have the CORES issue.
    Access to XMLHttpRequest at 'https://aws_prod/wp-json/wp/v2/pages/12548' from origin 'https://1800accountant.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

    Do youhave any idea about this? Thank you !

    • This reply was modified 2 years, 11 months ago by potatolianyi.
    • This reply was modified 2 years, 11 months ago by potatolianyi.
    • This reply was modified 2 years, 11 months ago by potatolianyi.

    hope to hear from you

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Console Errors After Migration from Dev to Stage’ is closed to new replies.