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

href lang #2

Open
nickdring opened this issue Jul 14, 2021 · 7 comments
Open

href lang #2

nickdring opened this issue Jul 14, 2021 · 7 comments

Comments

@nickdring
Copy link

Hi there, we have the latest version of the plugin running on our Joomla sites with varnish. We developed our own plugin that makes sure that varnish keeps emptying the cache when changes are made to the site and all is good.
But I noticed on two sites that are multilingual with your plugin active the HTML lang is always set to en-gb.
If I disable the plugin they go back to the right language.
Do we need to change the plugin settings or is it something else?
Here is a link to the settings: https://ibb.co/GnRpPQS
Cheers!

@fevangelou
Copy link
Contributor

One guess is that if you have client side caching enabled (in your screenshot it's off though), then Varnish probably picks up the cache-control header sent by the plugin and caches content regardless of language. And if English is the main language, then it's normal for it to cache the en-gb variant.

In any case, I can only know for sure if you enable the plugin and send me a URL to test both your HTTP headers and the actual HTML.

@nickdring
Copy link
Author

hi, we don't use client side caching the settings are as you see them

@nickdring
Copy link
Author

ok plugin enabled here: https://memexproject.eu/ if you go to s language that's not EN and look at the source you'll see it

@fevangelou
Copy link
Contributor

I don't think it's the plugin to blame. I triple checked any replacements and regex's.

My guess is that it merely surfaces an issue coming from another plugin.

I recommend re-ordering your system type plugins like so:
a) Make sure URL Normalizer is the last
b) If you have the Page Cache system plugin enabled, make that the last one and move URL Normalizer right above it.

@fevangelou
Copy link
Contributor

For the record, something's not right with your site for sure... Check this meta tag in your content:

<meta content="text/html; charset=UTF-8; X-Content-Type-Options=nosniff" http-equiv="Content-Type" />

Something put X-Content-Type-Options there and this something could be the culprit.

@nickdring
Copy link
Author

HI, I removed the meta script from the template and set the normalizer plugin to last in the order. Page Cache plugin is not activated. I still see the wrong lang flag whenever the URL normalizer is activated, as soon as I deactivate it the flag is correct.

@fevangelou
Copy link
Contributor

I'm sorry but I can't help you further. All I know is that the code does not directly affect the <html...> tag in any way, let alone choose to "keep" the en-gb property over the other ones.

Like I said, my guess is that it merely surfaces an issue coming from another plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants