Closed mt8 closed 5 years ago
I saw the following error when starting up the editor.
Fatal error: Uncaught RuntimeException: Invalid host label, check its content in /var/www/html/wp-content/plugins/tx-onepager/vendor/league/url/src/Components/Host.php:164
It means that the verification of the host name failed.
ref: https://github.com/themexpert/onepager/blob/develop/src/functions.php#L73-L79
Depending on web server configuration, $_SERVER ['SERVER_NAME'] may return the following values:
*.example.com
In this case, the editor will not start and an error will be output.
I suggest using home_url() instead of $_SERVER['SERVER_NAME'] to get the current page URL in get_current_page_url().
home_url()
$_SERVER['SERVER_NAME']
get_current_page_url()
Thanks.
Issue fixed https://github.com/themexpert/onepager/commit/c6e22b109d1c2f5857fc0eb8a72390dff008ceca and tested on Shifter platform its working.
Big shoutout to @mt8 for the PR 🍻
Really appreciate @mt8 ❤️
I saw the following error when starting up the editor.
It means that the verification of the host name failed.
ref: https://github.com/themexpert/onepager/blob/develop/src/functions.php#L73-L79
Depending on web server configuration, $_SERVER ['SERVER_NAME'] may return the following values:
In this case, the editor will not start and an error will be output.
I suggest using
home_url()
instead of$_SERVER['SERVER_NAME']
to get the current page URL inget_current_page_url()
.Thanks.