Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Invalid slug with multi language #8

Open
vishalshah6153 opened this issue Jan 19, 2022 · 5 comments
Open

Invalid slug with multi language #8

vishalshah6153 opened this issue Jan 19, 2022 · 5 comments

Comments

@vishalshah6153
Copy link

Hi, I configured the plugin as per instructions and it's working perfectly with a single language feature. But, when we have a multi-language feature it's not working properly as I haven't seen a language selection dropdown. I have used the https://github.com/vsimak/datocms-plugin-nextjs-preview-multilang-sidebar fork and installed it.

When I click on the preview link, the link will be open in the browser as below
https://example.com/api/preview?slug=/null/home&secret=784854 where null should be selected locale. And it's ended up with a 404 not found error.

Any idea for this?
Thanks in advanced.

@wbobeirne
Copy link
Owner

Hey @vishalshah6153, we'll have to hear from @vsimak about why that might be, I haven't looked at his fork. There's also a PR open (#5) that attempts to add locales as well.

Unfortunately I no longer work at the company that was using DatoCMS, and so I don't have an environment to work on this plugin. I may archive this repo or try to find someone else to maintain it.

@marcello-palmitessa
Copy link

Hi, I have the same issue for a Next multi-language website, and the client is very angry about this issue....

@cymkd
Copy link

cymkd commented May 3, 2022

Hi @vishalshah6153, and hi @wbobeirne.
I had a project and needed to have a working multi-language DatoCMS preview plugin.
I've forked and fixed the locale appending in the URL that did not work properly on the other plugin's I tried.

I am unsure what is going wrong on your end, we are using the same plugin for a live website, and all is working fine.

What you are describing - the null issue for locale - is why I forked and edited the code a bit to get it working in the first place.

Bare in mind, there is no dropdown language selector, the Preview Link plugin checks the active language tab in DatoCMS and appends that language to the url.

@robrechtme
Copy link

Hi

Are you accepting PR's? If so I have a working version of the plugin with locales.

@wbobeirne
Copy link
Owner

Hey @robrechtme, you're probably better off forking and using your own version. I've stopped using DatoCMS so won't easily be able to test any submitted PRs. I'll probably switch the project into archive mode, thanks for the reminder.

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

No branches or pull requests

5 participants