Skip to content
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

[Issue] Google Font Not removed from code, when deactivated #730

Closed
raramuridesign opened this issue Jul 19, 2024 · 13 comments · Fixed by #733
Closed

[Issue] Google Font Not removed from code, when deactivated #730

raramuridesign opened this issue Jul 19, 2024 · 13 comments · Fixed by #733
Labels
help wanted Extra attention is needed
Milestone

Comments

@raramuridesign
Copy link

@sonvnn

Describe the bug
If I have a text logo and disable Google fonts, the referenc to the preconnect and the google font is still present.

image

To Reproduce
Steps to reproduce the behavior:

  1. Go to template astroid_template_two
  2. Click on edit text logo and switch to default
  3. View the source and the font is still there.
  4. See screenshot above.

Expected behavior
If font is disabled to inherit, then it should remove the google reference.

System Informations (please complete the following information):

  • Joomla Version: Joomla 5
  • PHP 8.3.x
  • Astroid Version 3.1.0
@Banuk1616
Copy link

Banuk1616 commented Jul 19, 2024

I also had this problem here and had to search a lot until I realized that it was related to the logo settings.

#601

I don't know if Sonny can change this, but it would be great if it could be changed. I think it would be great if you could activate or deactivate the Google Fonts in the Astroid plugin, similar to the Fontawesome.

@sonny
Could you please see if you can find a solution for this. If you don't notice this and you accidentally load the Google Fonts, you can get into big problems because of the GDPR.

Kind regards Olli

@sonvnn sonvnn added this to the Version 3.1.1 milestone Jul 20, 2024
@sonvnn sonvnn moved this to In review in Astroid Framework Jul 20, 2024
@sonvnn sonvnn added the help wanted Extra attention is needed label Jul 20, 2024
@sonvnn
Copy link
Member

sonvnn commented Jul 20, 2024

I fixed this issue at 3d89777

PS: If you are using two please help me check all widgets, too. We have a text-logo in the footer of template. Please help me disable all google font on your site. It will works. I test on my local site and it works.

@patrickus33
Copy link

@sonvnn
I've applied your fix but google fonts are still present in source code
I have of course cleared the Astroid and Firefox cache.

It's a real problem for european users due to RGPD.

<link href="[https://fonts.gstatic.com?2d79ba](view-source:https://fonts.gstatic.com/?2d79ba)" rel="preconnect" />
<link href="[https://fonts.googleapis.com/css2?family=Arizonia&amp;display=swap](view-source:https://fonts.googleapis.com/css2?family=Arizonia&display=swap)" rel="stylesheet" />

My typo config :
typo

@sonvnn
Copy link
Member

sonvnn commented Jul 20, 2024

Please send me the admin acc via [email protected]. I will help you check it.

@Banuk1616
Copy link

Hi Sonny, I have replaced the Utility.php and tested it on my development environment. First I selected a Google font for the logo and wrote a small logo text (I had an image logo without text before).

Result: The Google font was displayed in the code.

I then set it to show no logo.

Result: The Google font is not displayed in the code.

It seems to work fine now.

@patrickus33
Copy link

For me, no changes.
Google fonts are always loaded whatever I choose for the logo .

@Banuk1616
Copy link

Banuk1616 commented Jul 20, 2024

I have just downloaded the Quickstart, installed it locally, exchanged the Utility.php and tested it. It now works fine there too and the logo text is no longer displayed in Code if no logo is selected.

Have you checked all the widgets? Perhaps a Google font is still being loaded from a widget. I have already spent a lot of time searching because I forgot to select the local font somewhere and then a Google font was loaded somewhere.

@patrickus33
Copy link

@Banuk1616
Your right, I've not checked all widgets.
I'll take a look asap!
Thank you for your help

@Banuk1616
Copy link

@sonny

Wouldn't it be good if you could disable Google Fonts completely if you don't want to use them?

Unbenannt

@patrickus33
Copy link

patrickus33 commented Jul 21, 2024

@Banuk1616
This is absolutely what it would take to be RGPD compliant

@sonvnn @Banuk1616
It was a widget in the footer section who was using Google fonts.

@sonvnn
Copy link
Member

sonvnn commented Jul 21, 2024

@patrickus33 That is footer widget, I mentioned above.

@sonvnn
Copy link
Member

sonvnn commented Jul 21, 2024

I fixed this issue at 3d89777

PS: If you are using two please help me check all widgets, too. We have a text-logo in the footer of template. Please help me disable all google font on your site. It will works. I test on my local site and it works.

@patrickus33 I mentioned about it here

@raramuridesign
Copy link
Author

@sonvnn
I can confirm that

  1. Google font is removed if its a text logo ie your code update
  2. If I have any widget loading and select a google font, then the google font loads.

I do like the option to disable google fonts completely, as I am sure that users would miss widgets when they are troubleshooting where this might load.

So far the template version Two is working perfectly. Thank you.
M

@sonvnn sonvnn linked a pull request Jul 25, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from In review to Done in Astroid Framework Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants