New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preload Links: Javascript siteUrl variable is using WordPress Address and not Site Address #3071
Comments
@tombonez Thanks for the detailed report. In case you haven't noticed, as an interim solution you can take advantage of the rocket_preload_links_config filter. @hellofromtonya Can you please take a look when you have a chance? |
Thanks @arunbasillal that's definitely good to know 😃 |
@arunbasillal What do you think of this in the next minor release? |
@hellofromtonya For sure 👍 |
Related ticket: https://secure.helpscout.net/conversation/1280540274/194381/ |
- 3rd party compatibility: Automatic compatibility with DreamPress hosting (#2789) - Enhancement: Add additional auto-exclusion from defer JS and combine JS to prevent issues - Enhancement: Add index file inside WP Rocket generated directories to prevent direct access to them (#3057) - Bugfix: Update trustpilot pattern for delay JS to prevent JS errors (#3080) - Bugfix: Remove Google recaptcha from delay JS default list (#3075) - Bugfix: Added pixel caffeine JS script to delay JS default list to prevent JS errors (#3088) - Bugfix: Update preload links configuration to prevent an issue when WordPress is installed in a sub-directory (#3071)
The siteUrl variable output in the Preload Links Javascript code is using the WordPress Address and not the Site Address, so whilst using WordPress in a sub-directory environment (e.g. Bedrock) this variable will output as
https://example.com/wp
instead ofhttps://example.com
stopping preloading links from working (if I understand the Javascript code correctly).Steps to reproduce
Expected behavior
The siteUrl variable to output the Site Address (using
home_url()
or similar) so that all links under the website can be preloaded on hover.Additional context
The code in question is the following:
And I believe the code that needs modifying is here:
The text was updated successfully, but these errors were encountered: