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
Failed to execute 'setAttribute' on 'Element': '0' is not a valid attribute name. #449
Comments
Could you all the |
From the layout: head () {
const nuxtI18nSeo = this.$nuxtI18nSeo()
return {
meta: [
{
hid: 'description',
name: 'description',
content: this.$t('_meta.description'),
},
{
property: 'og:description',
content: this.$t('_meta.description'),
},
{
property: 'og:image',
content: process.env.BASE_URL + '/img/social-' + this.$i18n.locale + '.png',
},
...nuxtI18nSeo.meta,
],
}
}, From a page extending the layout: head () {
const nuxtI18nSeo = this.$nuxtI18nSeo()
return {
title: this.$t('_pg.faq.title'),
meta: [
{
property: 'og:title',
content: `${this.$t('_pg.faq.title')}`,
},
{
property: 'og:url',
content: process.env.BASE_URL + this.$route.fullPath,
},
...nuxtI18nSeo.meta,
],
}
}, |
Strange, looks good to me indeed. You dont have any residual config anywhere, eg in If not, please create a reproduction because not sure what info to ask for to debug this further. One remark though, its strongly recommended to use string templates instead of concatenation. Eg instaed of |
I followed the documentation, here's what it looks like: head: {
base: process.env.BASE_URL,
titleTemplate: '%s • MySite',
meta: [
{
'http-equiv': 'Content-Type',
content: 'text/html; charset=utf-8',
},
],
} Another weird thing, when I switch between pages the title is blinking randomly: https://streamable.com/p9uwd, any idea about that? 🤔 Thanks for the recommendation by the way, I usually use the template string but didn't optimize this part yet 😊 |
The blinking can happen when there is a delay between the old page component being removed and the new one being created. In nuxt there can be a measurable delay between these two. vue-meta has an option to prevent this but you cant set this option with nuxt unfortunately. Still on the todo list to change that. |
Thanks for your contribution to vue-meta! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you would like this issue to remain open:
|
Anyone know what this is about still? I cannot stop it from happening even if I remove all the head hooks! |
@romucci There is probably a "," or some invalid character somewhere in your template. I removed a "," from inside the opening tag if an element and it fixed it |
this was my problem. In my case, a "&&". Thanks! |
Hey, I'm creating a new module for Nuxt and when I'm adding a plugin pushing a script to the DOM, the following error is throwed in the console:
The plugin:
Is it still a bug or I'm doing something wrong? Thanks!
The text was updated successfully, but these errors were encountered: