dotCMS / core

Headless/Hybrid Content Management System for Enterprises
http://dotcms.com
Other
852 stars 467 forks source link

Scripting (VTL) API/TinyMCE Configuration: language agnostic files #19623

Closed x0rsw1tch closed 2 months ago

x0rsw1tch commented 3 years ago

Is your feature request related to a problem? Please describe. I am working on a multilingual site that leverages the VTL API to do content pulls and such for a JavaScript application. I have found that when a non-default language is selected, the VTL API fails to locate the endpoint, returning a HTTP 400 error with the following message:

This also happens when using a custom TinyMCE configuration when the language doesn't exist for the configuration file.

{"message":"Can't find contentlet: 71bad17d-54c2-42ff-895a-3c639248c913 lang:1595366360082 live:true"}

Describe the solution you'd like I think it would make sense that if we are returning a JSON response in the script code, would be language agnostic. The actual content may differ, but keys and property names would remain the same.

Describe alternatives you've considered Fallback to default language if the target language variant doesn't exist, instead of returning errors.

Additional context Having to maintain multiple identical versions of a file is not fun.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

swicken-dotcms commented 1 year ago

Note: This same behaviour also impacts working with TinyMCE configuration files. Bumping priority.

Related ticket: https://dotcms.zendesk.com/agent/tickets/111580

john-thomas-dotcms commented 12 months ago

What this means is that we need to respect language fallbacks when people hit API VTLs