elementor / elementor/static-html-output
edge cases not handled for subfolder installations
- Dominant language
- PHP
- Stars
- 128
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/leonstafford/static-html-output/blob/10cf1af363a07c90d1bec426f7db99f40cadfff9/src/WPSite.php#L327
When WP is installed in a subfolder, however deep, the count of folders cannot be found just from `parse_url`. The site could be multisite, with its different structure, or the content folder could be moved.
Especially on localhost, the WP folder could be several folders deep.
A better method would be to get the difference between the home URL and the content URL(shows if content is in subfolder), or between home URL and site URL (shows if WP is in subfolder).
Using `parse_url` on localhost returns the subfolder as part of the path, so generating crawling URLs is incorrect. My home URL is set to `http://localhost/testsite` and the crawl list has `/testsite/2020/05/05/` whereas the other paths do not start with `testsite` .
This is _after_ I changed the `parse_url` call in FilesHelper.php (in getAllWPPostURLs).
Generating a site, I end up with posts at the top level, but duplicated under a `testsite` folder.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.