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

Problem with locales #56

Open
Burans opened this issue Jul 24, 2019 · 3 comments
Open

Problem with locales #56

Burans opened this issue Jul 24, 2019 · 3 comments
Labels

Comments

@Burans
Copy link

Burans commented Jul 24, 2019

Hi!
I've been using Fetch for a while without any problems.
Yesterday I added a second locale to a site and got into some issues.

  • Primary locale works fine.
  • I'm using Fetch to output JSON in a script tag with{{ fetch pages="{ url }" }}
  • I can access the correct localised data with/!/Fetch/page/default-slug?locale=en (en is the secondary locale in my case.)
  • But /!/Fetch/page/localised-slug gives an error Page [localised-slug] not found.

Is this the intended behaviour? Shouldn't Fetch work with localised slugs also?

Thanks!

@Burans
Copy link
Author

Burans commented Jul 25, 2019

I got it partly working by {{ fetch pages="{default locales url}" locale="{current locale}"}} but now all assets have wrong urls. They should stay /assets/img/image.jpg but they become /locale/assets/img/image.jpg.

Any help greatly appreciated!
Thanks!

@aryehraber
Copy link
Owner

Hi @Burans, apologies for the late reply.

Locale-support was added to Fetch at a later stage by popular demand and hasn't been well tested/maintained if I'm honest...

Unfortunately, I won't be able to help here any time soon. Hope you find a solution/workaround for your issue!

@aryehraber aryehraber added the bug label Jul 30, 2019
@felixtosh
Copy link

@Burans I think this is normal behaviour inside Statamic and can be easily fixed with a symlink -> https://docs.statamic.com/localization#locales (search symlink)

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

No branches or pull requests

3 participants