garmeeh / next-seo

Next SEO is a plug in that makes managing your SEO easier in Next.js projects.
MIT License
7.67k stars 399 forks source link

Metadata is not getting overrided #1396

Closed kobyTT closed 8 months ago

kobyTT commented 8 months ago

I'm using Next.js 13 with a page directory structure. In my project, I've set up a DefaultSeo tag in _app.tsx to manage global SEO settings. Additionally, in one of my pages, I'm utilizing the NextSeo tag to dynamically set metadata using getServerSideProps.

Despite successfully overriding the default Open Graph values (title, description, image) in the specific page, social media platforms consistently display the default values when I attempt to share the page link.

Steps to Reproduce:

Set up Next.js 13.4.6 with a page directory structure.
Implement a DefaultSeo tag in _app.tsx for global SEO settings.
Include a NextSeo tag in a specific page to dynamically set metadata using getServerSideProps.
Attempt to share the page link on various social media platforms.
Observe that the shared previews consistently display the default Open Graph values, ignoring the overridden values specified in the NextSeo tag.

One important note is that the dynamic metadata can be inspected in HTML, but it briefly flashes the default values for a fraction of a second before falling back to using the overridden values. However, this behavior is not reflected when sharing a link on social media platforms.

garmeeh commented 8 months ago

Could you share a link to an example page on your website?

kobyTT commented 8 months ago

Hey @garmeeh, the issue seems to be related to PersistGate from redux-persist. I haven't been able to get it working yet, but I think it might be outside the scope of next-seo. Thanks anyway!