elementor / elementor/wp2static

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

Open
#824 2 comments 0 reactions 1 assignee Claimed by @john-shaffer View on GitHub
bug
Dominant language
PHP
Stars
1.5k
Forks
294
PR merge metrics
No merged PRs in 30d

Description

## 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](https://user-images.githubusercontent.com/141512/136636703-0bb4e791-ec92-49e6-a2cd-547071d3f5f3.png)
![image](https://user-images.githubusercontent.com/141512/136636781-c512e064-3957-4082-b9fb-3c664b0149b6.png)
![image](https://user-images.githubusercontent.com/141512/136636879-7c0cf384-b57d-436e-9cf2-6e2e6e4156a4.png)
![image](https://user-images.githubusercontent.com/141512/136637042-80ddfd49-4b4d-4ddc-a7a0-04c074c5a8b5.png)

**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:

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.