elementor / wp2static

WordPress static site generator for security, performance and cost benefits
https://wp2static.com
The Unlicense
1.43k stars 270 forks source link

500 error returned - when generating static site with RankMath plugin activated #824

Open jhatmaker opened 3 years ago

jhatmaker commented 3 years ago

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:

  1. Install/Activate RankMath
  2. 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).
  3. Select WP2Static -> Run and Press "Generate static site"
  4. 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. image image image image

Environment (please complete the following information):

Log files (please complete the following information):

Please ensure no sensitive information in your log files, then attach to your issue.

john-shaffer commented 3 years ago

Thanks for the detailed report!

I was not able to reproduce this issue exactly, but I did find a similar problem that may be related. Can you test with https://github.com/leonstafford/wp2static/commit/bbc8abba9103d097a62a6bbbd8d7a4229e788f4b and see if that changes anything for you?

crstauf commented 2 years ago

I encountered this issue with v7.1.7, and I do not have RankMath plugin installed.

[06-Apr-2022 18:55:09 UTC] PHP Fatal error:  Uncaught WP2StaticGuzzleHttp\Exception\ClientException: Client error: `GET http://site.local//wp-sitemap.xml` resulted in a `404 Not Found` response:

Option siteurl does not have a trailing slash.