wp2static
wp2static copied to clipboard
Media and Javascript/CSS not included in export because of 404 error
Hi,
i have a strange error when running an export. No media/javascript/css files are included in the export:
The export log is showing the following
Crawling https:/domain.com/wp-content/cache/autoptimize/css/autoptimize_snippet_1850419e4cfbe4e444263f8e2ee0328b.css BAD RESPONSE STATUS (404): https:/domain.com/wp-content/cache/autoptimize/css/autoptimize_snippet_1850419e4cfbe4e444263f8e2ee0328b.css Memory allocated by crawl script: 2048 Exclusion rules wp-json Crawling https:/domain.com/wp-content/cache/autoptimize/css/autoptimize_snippet_1c43cb8f91d07e97aa58658c8a1f4497.css BAD RESPONSE STATUS (404): https:/domain.com/wp-content/cache/autoptimize/css/autoptimize_snippet_1c43cb8f91d07e97aa58658c8a1f4497.css Memory allocated by crawl script: 2048 Exclusion rules wp-json Crawling https:/domain.com/wp-content/cache/autoptimize/css/autoptimize_snippet_29870e94c74d4506a6b6bff969948945.css BAD RESPONSE STATUS (404): https:/domain.com/wp-content/cache/autoptimize/css/autoptimize_snippet_29870e94c74d4506a6b6bff969948945.css Memory allocated by crawl script: 2048 Exclusion rules wp-json Crawling https:/domain.com/wp-content/cache/autoptimize/css/autoptimize_snippet_9eeddc51b0b4a2580a959042d50f826e.css BAD RESPONSE STATUS (404): https:/domain.com/wp-content/cache/autoptimize/css/autoptimize_snippet_9eeddc51b0b4a2580a959042d50f826e.css Memory allocated by crawl script: 2048
It is really strange, because if I open the URLs in my browser, all of the files exist. I already tried to disable the minify plugin, tried it without an minify plugin, but it is always the same. The files in the wp-content folder can not be included because of the 404.
I also tried to do the export again because I thought maybe it regenerates the cache files on each export. But when I check the source code of the page, the cache files stay the same with each export. I can perfectly access the files in the browser but the crawler gets a 404 response.
I'm seeing now that the URLs are all https:/domain.com but should be https://domain.com. I didn't see the / missing and when copy/pasting the URL in the browser, the browser automatically corrected it.
I checked the wordpress url settings, but everywhere https://domain.com is used, how does it happen that WP2Static is using https:/domain.com but only for media/javascript/css files?
Maybe this is a bug?
Okay I've found out that the WPML plugin is causing this. If I deactivate the WPML plugin, all media/javascript/css files get exported.