elementor / elementor/wp2static

Error 504 on static site generation (WP2Static)

Open
#787 10 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
PHP
Stars
1.5k
Forks
294
PR merge metrics
No merged PRs in 30d

Description

Hey there.
# The static site generation used to work fine but i am not able to run it from a few hours.
## I get this error:
```
504 error code returned from server.
Please check your server's error logs or try increasing your
max_execution_time limit in PHP if this consistently fails
after the same duration.
More information of the error may be logged in your browsers console.
```
## And this is what I get in the console:
```
load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.7.1:5 JQMIGRATE: Migrate is installed, version 3.3.2
load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.7.1:2 POST https://customer-care-solution.com/wp-admin/admin-ajax.php?_fs_blog_admin=true 500
send @ load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.7.1:2
ajax @ load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.7.1:2
s.ajax.s.ajax @ load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.7.1:5
(anonymous) @ admin.php?page=wp2static:566
dispatch @ load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.7.1:2
v.handle @ load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.7.1:2
admin.php?page=wp2static:547
admin.php?page=wp2static:548

There has been a critical error on this website.

Learn more about troubleshooting WordPress.

```

## Tried wp-cil
```
$ wp wp2static full_workflow
[2021-05-01T14:34:53+05:30] Starting to detect WordPress site URLs.
[2021-05-01T14:34:55+05:30] Detection complete. 4435 URLs added to Crawl Queue.
[2021-05-01T14:34:55+05:30] Starting crawling
[2021-05-01T14:34:55+05:30] Starting to crawl detected URLs.
[2021-05-01T14:34:55+05:30] Using CrawlCache.
[2021-05-01T14:35:00+05:30] 404 for URL /blog/page/1/
[2021-05-01T14:35:00+05:30] 404 for URL /blog/page/2/
[2021-05-01T14:35:03+05:30] 404 for URL /favicon.ico
[2021-05-01T14:35:08+05:30] 404 for URL /sitemap.xml
[2021-05-01T14:35:59+05:30] Crawling progress: 300 crawled, 3887 skipped (cached).
PHP Fatal error: Uncaught WP2StaticGuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: customer-care-solution.comhttp (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://customer-care-solution.comhttp/customer-care-solution.com/wp-content/plugins/all-in-one-wp-migration/lib/view/assets/css/backups.min.css in /usr/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Handler/CurlFactory.php:210
Stack trace:
#0 /usr/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Handler/CurlFactory.php(158): WP2StaticGuzzleHttp\Handler\CurlFactory::createRejection()
leonstafford/lokl#1 /usr/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Handler/CurlFactory.php(110): WP2StaticGuzzleHttp\Handler\CurlFactory::finishError()
leonstafford/lokl#2 /usr/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Handler/CurlHandler.php(47): WP2StaticGuzzleHttp\Handler\CurlFactory::finish()
leonstafford/lokl#3 /usr/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2stati in /usr/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Handler/CurlFactory.php on line 210
Fatal error: Uncaught WP2StaticGuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: customer-care-solution.comhttp (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://customer-care-solution.comhttp/customer-care-solution.com/wp-content/plugins/all-in-one-wp-migration/lib/view/assets/css/backups.min.css in /usr/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Handler/CurlFactory.php:210
Stack trace:
#0 /usr/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Handler/CurlFactory.php(158): WP2StaticGuzzleHttp\Handler\CurlFactory::createRejection()
leonstafford/lokl#1 /usr/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Handler/CurlFactory.php(110): WP2StaticGuzzleHttp\Handler\CurlFactory::finishError()
leonstafford/lokl#2 /usr/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Handler/CurlHandler.php(47): WP2StaticGuzzleHttp\Handler\CurlFactory::finish()
leonstafford/lokl#3 /usr/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2stati in /usr/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Handler/CurlFactory.php on line 210
Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.
```

In the line `PHP Fatal error: Uncaught WP2StaticGuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: customer-care-solution.comhttp (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://customer-care-solution.comhttp/customer-care-solution.com/wp-content/plugins/all-in-one-wp-migration/lib/view/assets/css/backups.min.css in /usr/html/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Handler/CurlFactory.php:210
Stack trace:`

### Why is `http` being appended to `customer-care-solution.com`? And how do I solve this?

# My setup:
1. Lokl site with a reverse proxy running on https.
2. Static site accessible on `customer-care-solution.com`.
3. Modified host files on my computer to point to dynamic WordPress site.

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.