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

Duplicate html "lang" attribute on page redirect from SSR #562

Closed
njam opened this issue May 15, 2020 · 3 comments · Fixed by #563
Closed

Duplicate html "lang" attribute on page redirect from SSR #562

njam opened this issue May 15, 2020 · 3 comments · Fixed by #563

Comments

@njam
Copy link

njam commented May 15, 2020

Version

v2.12.2

Reproduction link

https://gitlab.com/njam/repro-nuxt-html-lang

Steps to reproduce

1: Clone the repro repo:

git clone https://gitlab.com/njam/repro-nuxt-html-lang
cd repro-nuxt-html-lang

(relevant commit: https://gitlab.com/njam/repro-nuxt-html-lang/-/commit/be48fd82f0fdfd8197dbf7870a4cb9d74778a09f)

2: Build the static files, and serve them

yarn install
yarn run generate
npx serve ./dist

3: Open the page in the browser: http://localhost:5000

What is expected ?

The browser redirects to "/foo", and the html-tag has the attribute lang="de"

What is actually happening?

The browser redirects to "/foo", and the html-tag has the attribute lang="de de"

Open the browser's dev tools to inspec the "lang" attribute:
Screenshot from 2020-05-15 17-39-14.png

Additional comments?

Maybe vue-meta cannot correctly detect that the previous "lang"-value is coming from a server-rendered file when redirecting?

This vue-meta ticket might be related: #404

This bug report is available on Nuxt community (#c10664)
@pimlie
Copy link
Collaborator

pimlie commented May 16, 2020

Thanks for the report, this is a duplicate of #541

Closing in favor of that issue

Spoke too soon, doesnt seem to be related after all ;)

@pimlie
Copy link
Collaborator

pimlie commented May 16, 2020

See the linked PR, would appreciate your input on my comments about the fix too!

@njam
Copy link
Author

njam commented May 28, 2020

Nice, thanks for the fix @pimlie !

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

Successfully merging a pull request may close this issue.

2 participants