Magento 2.3.3 Missing content in admin panel
-
16-03-2021 - |
سؤال
After updating to version 2.3.3 and set SSL URL The content of several pages(cms pages/consumer/orders/cms blocks and more) is admin panel is missing this is what I get:
After on debug Error showing as: "this is the error I get: Access to XMLHttpRequest at '332092-1019808-1-raikfcquaxqncofqfm.stackpathdns.com/pub/static/…' from origin 'url.co.il' has been blocked by CORS policy: Request header field x-requested-with is not allowed by Access-Control-Allow-Headers in preflight response. and solved now by remove Base URL for Static View Files. "
Any help?
Thanks
المحلول
You are running into CORS issues..This issue is not due to Magento for this you need to make changes in Apache or nginx configuration file. You can contact your server provider for this. Or check below Links which will help you:
- https://crunchify.com/how-to-fix-access-control-allow-origin-issue-for-your-https-enabled-wordpress-site-and-maxcdn/
- https://www.digitalocean.com/community/questions/blocked-by-cors-policy-the-access-control-allow-origin-mean-stack
- https://github.com/magento/magento2/issues/23339
Or try to add below code in .htaccess
<ifmodule mod_headers.c="">
SetEnvIf Origin "^(.*\.domain\.com)$" ORIGIN_SUB_DOMAIN=$1
Header set Access-Control-Allow-Origin "%{ORIGIN_SUB_DOMAIN}e" env=ORIGIN_SUB_DOMAIN
Header set Access-Control-Allow-Methods: "*"
Header set Access-Control-Allow-Headers: "Origin, X-Requested-With, Content-Type, Accept, Authorization"
</ifmodule>
I hope it will help you.