[DEFECT] Language Variable Selector Incorrectly Shown in JSON Field Editor
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem Statement
The JSON field editor in the new content editor displays a language variable selector button that allows users to insert Velocity syntax (e.g., $text.get('label.yes')), but the backend does not support Velocity evaluation in JSON fields. This creates a confusing user experience where:
- Users see the feature: The UI displays a language variable selector button in JSON field editor
- Save fails without quotes: When users insert unquoted Velocity syntax, they get validation error: "Invalid JSON field provided"
- Saves but doesn't evaluate: When wrapped in quotes, JSON saves successfully but Velocity syntax is stored as literal string and NOT evaluated when retrieved via Content API
Steps to Reproduce
Detailed steps:
- Navigate to Content Types → Edit a content type with a JSON field
- Create or edit content using this content type
- In the JSON field editor, observe the language variable selector button (globe icon) in the top-right corner
- Click the language variable selector button
- Select a language variable (e.g.,
$text.get('label.yes')) - The Velocity syntax is inserted into the JSON field
- Attempt to save the content
- Result:
- If unquoted: Error "Invalid JSON field provided"
- If quoted: Saves successfully, but when retrieved via Content API, the Velocity syntax is returned as literal string (not evaluated)
Acceptance Criteria
- Language variable selector button should NOT be displayed for JSON fields, OR
- If displayed, Velocity syntax should be evaluated when content is retrieved via Content API
dotCMS Version
Latest evergreen
Severity
Low - Minor issue or cosmetic
Links
https://dotcms.freshdesk.com/a/tickets/35089
https://dotcms.slack.com/archives/C08F8NZRK9S/p1768933183860019
https://dotcms.slack.com/archives/C08F8NZRK9S/p1768933616813999
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the new content editor's JSON field editor and trace the language variable selector entry point, then reproduce the unquoted and quoted cases described in the issue. Done means the selector is absent for JSON fields, or the inserted Velocity syntax is evaluated when the content is retrieved through the Content API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, json
- Domain
- backend-api-design, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100