You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
On a fresh install of WP with WP2Static and RankMath (free) activated, (using the SiteMap options in RankMath), the Generate static site will fail (browser reports a 500 error) and the log file will report an unhandled ClientException.
To Reproduce
Steps to reproduce the behavior:
Install/Activate RankMath
Make sure the options to include Posts, Pages, and Categories are turned on in Rank Math (if you turn off these options WP2Static will process normally, if any of the 3 options are on, WP2Static will fail).
Select WP2Static -> Run and Press "Generate static site"
See error
Expected behavior
WP2Static should not have an unhandled exception that causes the generate to fail.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Hosting OS: Linux 0c15ac11f18a 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64 GNU/Linux
(standard wordpress docker image)
Web server setup: Docker, apache, wordpress
Local host / Docker instance
Log files (please complete the following information):
Please ensure no sensitive information in your log files, then attach to your issue.
WP2Static Logs (found on WP dashboard > WP2Static > Logs)
2021-10-09 00:25:05: Unable to fetch URL contents
2021-10-09 00:25:05: Starting to detect WordPress site URLs.
2021-10-09 00:25:05: Starting URL detection
2021-10-09 00:25:05: Running WP2Static in Headless mode
2021-10-09 00:25:05: Running full workflow from UI
Server logs (PHP and webserver error logs)
Fatal error: Uncaught WP2StaticGuzzleHttp\Exception\ClientException: Client error: `GET http://wplocal.internal//wp-sitemap.xml` resulted in a `404 Not Found` response:
<!doctype html>
<html lang="en-US" >
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width (truncated...)
in /var/www/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Exception/RequestException.php:113
Stack trace:
#0 /var/www/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Middleware.php(69): WP2StaticGuzzleHttp\Exception\RequestException::create(Object(WP2StaticGuzzleHttp\Psr7\Request), Object(WP2StaticGuzzleHttp\Psr7\Response), NULL, Array, NULL)
#1 /var/www/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(204): WP2StaticGuzzleHttp\Middleware::WP2StaticGuzzleHttp\{closure}(Object(WP2StaticGuzzleHttp\Psr7\Response))
#2 /var/www/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(153): WP2StaticGuzzle in /var/www/html/wp-content/plugins/wp2static/src/DetectSitemapsURLs.php on line 160
The text was updated successfully, but these errors were encountered:
When creating a Psr7 request with a base_uri set in the Client and a
path that starts with // (like '//wp-sitemap.xml'), the path is
interpreted as an absolute URL and we get a ClientException for
'unknown host: wp-sitemap.xml'. This is fixed by removing base_uri
from the client and always making Requests with the full url.
This was discovered while debugging #824 and may address that issue.
I was not able to reproduce this issue exactly, but I did find a similar problem that may be related. Can you test with bbc8abb and see if that changes anything for you?
Plugin - Caused unhandled exception
Describe the bug
On a fresh install of WP with WP2Static and RankMath (free) activated, (using the SiteMap options in RankMath), the Generate static site will fail (browser reports a 500 error) and the log file will report an unhandled ClientException.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
WP2Static should not have an unhandled exception that causes the generate to fail.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Linux 0c15ac11f18a 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64 GNU/Linux
Log files (please complete the following information):
Please ensure no sensitive information in your log files, then attach to your issue.
The text was updated successfully, but these errors were encountered: