Hi
In the CMS, we have configured multiple locales to fall back to en, for example:
en-CN → en
en-LU → en
When calling getPath with the en locale:
client.getPath({
key: context.key,
locale: "en",
});
the returned ancestor pages contain _metadata.url.default values that use the internally resolved fallback locale rather than the requested locale.
Current behavior
The ancestor URLs are returned as:
/en-CN/
/en-LU/content-page
Expected behavior
The ancestor URLs should be relative to the requested locale (en):
/en/
/en/content-page
_metadata.url.default for each ancestor should always reflect the URL for the requested locale, regardless of which locale was used internally as a fallback to resolve the content.
Expected behaviour: _metadata.url.default on each ancestor should reflect a URL for the requested locale, not the locale it fell back to internally.
Also if we call:
client.getPath({
key: context.key,
locale: "en-BE",
});
The query fails with the following:
HTTP 400: Variable "$locale" got invalid value "en-BE" at "locale[0]"; Value "en-BE" does not exist in "Locales" enum. Did you mean the enum value "en_BE", "en_DE", "en", "en_CH", or "en_CN"?
Hi
In the CMS, we have configured multiple locales to fall back to en, for example:
en-CN → en
en-LU → en
When calling getPath with the en locale:
the returned ancestor pages contain _metadata.url.default values that use the internally resolved fallback locale rather than the requested locale.
Current behavior
The ancestor URLs are returned as:
/en-CN/
/en-LU/content-page
Expected behavior
The ancestor URLs should be relative to the requested locale (en):
/en/
/en/content-page
_metadata.url.default for each ancestor should always reflect the URL for the requested locale, regardless of which locale was used internally as a fallback to resolve the content.
Expected behaviour: _metadata.url.default on each ancestor should reflect a URL for the requested locale, not the locale it fell back to internally.
Also if we call:
client.getPath({
key: context.key,
locale: "en-BE",
});
The query fails with the following:
HTTP 400: Variable "$locale" got invalid value "en-BE" at "locale[0]"; Value "en-BE" does not exist in "Locales" enum. Did you mean the enum value "en_BE", "en_DE", "en", "en_CH", or "en_CN"?