-
Notifications
You must be signed in to change notification settings - Fork 219
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
3.18 - Front-end display - Duplicated tag added to the page #7104
Comments
Miraeld
added
the
type: bug
Indicates an unexpected problem or unintended behavior
label
Nov 13, 2024
8 tasks
Scope a solutionAs mentioned in the |
8 tasks
8 tasks
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When we are enabling the Host Google Font, we are getting a duplicated tag in the HTML.
To Reproduce
feature/7063-google-font-front-end
from Closes #7063: Google font - Frontend part #7091Media
tab.For example, if on my page I get
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
As an output I'll get the following:
Expected behavior
We should have only one tag added.
Additional context
To get more understanding of the issue, this is happening before the Google Font Combination is happening before our new feature. This way, we don't have to duplicate the combination of google font. That's the easiest way to do and this is what we did.
However, in here:
wp-rocket/inc/Engine/Optimization/GoogleFonts/AbstractGFOptimization.php
Line 113 in 7348869
We are adding the
rel="preload"
tag that is annoying us.If the
rel="preload"
isn't necessary while we are hosting the font css locally, we could add a check wether the new feature is enabled or not, depending on this, we could add the preload tag or not.The text was updated successfully, but these errors were encountered: