Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate static site fails fast with 500 error #50

Open
nvnivs opened this issue Mar 24, 2022 · 2 comments · May be fixed by #55
Open

Generate static site fails fast with 500 error #50

nvnivs opened this issue Mar 24, 2022 · 2 comments · May be fixed by #55
Labels
bug Something isn't working

Comments

@nvnivs
Copy link
Collaborator

nvnivs commented Mar 24, 2022

When generating a static site, getting a 500 error straight away.

This is the error on the container logs:

[Tue Mar 22 08:13:24.798527 2022] [php7:error] [pid 114] [client 1.2.3.4:30368] PHP Fatal error:  Uncaught WP2StaticGuzzleHttp\\Exception\\ClientException: Client error: `GET http://wordpress.example.com/http://wordpress.example.com/wp-sitemap.xml` resulted in a `404 Not Found` response:\n<!DOCTYPE html>\n\n<html lang="pt-PT">\n\n<head>\n\t<title>P\xc3\xa1gina n\xc3\xa3o encontrada &#8211;</title>\n<meta name (truncated...)\n in /var/www/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Exception/RequestException.php:113\nStack trace:\n#0 /var/www/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Middleware.php(69): WP2StaticGuzzleHttp\\Exception\\RequestException::create()\n#1 /var/www/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(204): WP2StaticGuzzleHttp\\Middleware::WP2StaticGuzzleHttp\\{closure}()\n#2 /var/www/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(153): WP2StaticGuzzleHttp\\Promise\\Promise::callHandler()\n#3 /var/www/html/wp-content/plugins/wp2static/vendor/leonsta in /var/www/html/wp-content/plugins/wp2static/src/DetectSitemapsURLs.php on line 125, referer: http://wordpress.example.com/wp-admin/admin.php?page=wp2static

Looks like the same issue reported here: https://staticword.press/t/404-error-when-crawling-sitemap/368/7, fixed in this commit: elementor/wp2static@59540b1

Think the issue is that the package under modules/codebuild/codebuild_files/serverless-wordpress-wp2static.zip was generated on Jun 19, 2021 and the package v7.1.7 containing the fix on Sep 5, 2021.

@petewilcock petewilcock added the bug Something isn't working label Mar 24, 2022
@petewilcock
Copy link
Contributor

Good call. I did deliberate about passing in an attribute and explicitly downloading a dynamic package for WP2Static so it's not fixed in the bundled zip, but it's also released fairly infrequently and I wanted to guarantee functionality of a version I'd tested. It definitely needs an update though so I can grab the latest source, recompile, and bundle in an update.

@nvnivs
Copy link
Collaborator Author

nvnivs commented Mar 24, 2022

Bundling it does make sense to guarantee results, but adding the attribute would be valuable.

It could default to a known good version (ex 7.1.7) and downloadfrom the releases on container build.

Would also give users the flexibility to pin to a particular version, but this would be an enhancement of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants