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

The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side render #3388

Closed
AliAbuArab opened this issue Nov 25, 2020 · 1 comment

Comments

@AliAbuArab
Copy link

Version

3.4.9

Reproduction link

https://github.com/AliAbuArab/vue-router-test.git

Steps to reproduce

Hello.
We facing a problem with a vue router when it envloved with unencoded characters.
Please check our repository.
https://github.com/AliAbuArab/vue-router-test.git

The problem occures when reload/refresh the page.
If the route in english its okay and working fine.
But when it comes to hebrew this not working and gives us
The client-side rendered virtual DOM tree is not matching server-rendered content....

export default {
  locales: [
    { 
      code: 'he',
      iso: 'he'
    },
    { 
      code: 'en',
      iso: 'en'
    }
  ],
  defaultLocale: 'he',
  parsePages: false,
  strategy: 'prefix_except_default',
  pages: {
    'categories/index': {
      he: '/קטגוריות',
      en: '/categories',
    },
    'categories/_id': {
      he: '/קטגוריות/:id',
      en: '/categories/:id',
    },
    search: {
      he: '/חיפוש',
      en: '/search'
    },
    promotions: {
      he: '/מבצעים',
      en: '/promotions'
    }
  }
}

What is expected?

Page that rendered from the serve

What is actually happening?

Empty page


We using:
nuxtjs v^2.14.7.
nuxt-i18n v"^6.15.4
Mode: ssr

@posva
Copy link
Member

posva commented Nov 25, 2020

You need to encode your routes: #3350. You should wait for Nuxt to support it too: nuxt/nuxt#8325

@posva posva closed this as completed Nov 25, 2020
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