Using Magento 2 with Nginx/Varnish
Issue: I can’t save category when using PageBuilder with MegaMenu. I get an infinite wheel saying Please wait…
This is my Nginx config:
location /static/ {
if ($MAGE_MODE = "production") {
expires max;
}
location ~ ^/static/version {
rewrite ^/static/(versiond*/)?(.*)$ /static/$2 last;
}
location ~* .(ico|jpg|jpeg|png|gif|svg|svgz|webp|avif|avifs|js|css|eot|ttf|otf|woff|woff2|html|json|webmanifest|m>
add_header Cache-Control "public";
add_header X-Frame-Options "SAMEORIGIN";
expires +1y;
if (!-f $request_filename) {
rewrite ^/static/(versiond*/)?(.*)$ /static.php?resource=$2 last;
}
}
location ~* .(zip|gz|gzip|bz2|csv|xml)$ {
add_header Cache-Control "no-store";
add_header X-Frame-Options "SAMEORIGIN";
expires off;
if (!-f $request_filename) {
rewrite ^/static/(versiond*/)?(.*)$ /static.php?resource=$2 last;
}
}
if (!-f $request_filename) {
rewrite ^/static/(versiond*/)?(.*)$ /static.php?resource=$2 last;
}
add_header X-Frame-Options "SAMEORIGIN";
}
Nothing in the error logs and nothing in var/report
Only errors is in web inspector:
tons of these errors:
...
Unable to resolve the source file for 'adminhtml/Magento/backend/en_US/**Magento_PageBuilder**/js/mass-converter/converter-pool-factory.js.map'
Another types of errors:
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (delay-until.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (url.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (preview.js.map, line 0)
...
[Error] TypeError: undefined is not a function (near '...require.config...')
Global Code (554108405e227c7a40e2a526ad6232230989cc88a42e1a512ee30edec609a401:26)
[Error] TypeError: Object is not a function (near '...require...')
Global Code (554108405e227c7a40e2a526ad6232230989cc88a42e1a512ee30edec609a401:46)
I believe that because of this I am unable to save the category after using PageBuilder. I tried:
- Clearing the cache
- Redeploying
- etc.
Any suggestions are welcome.