Wrong links when installed in a subfolder
-
Hei
I noticed, that when I have WordPress installed in a subfolder, the links do not work correctly.Admin Bar -> Noted Visual Feedback
mypage.com/wordpress becomes mypage.com/wordpress/wordpress/?notedFrontend -> Noted view -> Dashboard
mypage.com/wordpress_12345?page_id=10¬ed-> mypage.com/wordpress/wp-admin/upgrade.php?_wp_http_referer=%2Fwp-admin%2F
Backend -> Noted Visual Feedback -> Dashboard / Backend -> Noted Visual Feedback -> Pages
Same problem here, the subfolder gets added twice.This happens because:
- home_url() already includes the subfolder: https://example.com/wordpress
- remove_query_arg() / add_query_arg() return the path from $_SERVER['REQUEST_URI'], which also includes the subfolder: /wordpress/my-page/?noted=
So home_url('/wordpress/my-page/?noted=') becomes https://example.com/wordpress/wordpress/my-page/?noted=Also, when closing the overlay, the admin bar stays hidden. It can be fixed by just reloading the page, but is not ideal.
Best, Daniel
You must be logged in to reply to this topic.