-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Custom Translation allows invalid json and break UI #27846
Comments
Hi! That field should be filled only with a json. no I think the bug here is the help text for that field and also the fact that it doesn't validate the Json before saving. |
Hi @dudanogueira can you assign me this issue? |
Hi, I can fix this issue kindly assign me |
Nice PR, @Pradumn27 !! Congratulations!!! |
hey, |
Hey I can fix this issue |
Hey!! I want to work on this issue. I'm new here so I'm really excited to start contributing. Please assign it to me. |
Hey , I want to work on this issue . Please assign it to me. |
Hey,is this issue still open? I would like to work on it. |
Hey, is this isssue still open? Please assign it to me I would like to work on it. |
This happened to me today as well. Would be super nice if the PR could be merged soon! cc @dougfabris |
Description:
We wanted to make some changes using custom translation, we forgot to include the
<br/>
tag at the beginning, so the front end had brokenSteps to reproduce:
<code>{ "en": { "Channels": "Rooms" }, "pt": { "Channels": "Salas" } }</code>
ignoring the<br/>
the next output is how is setted in the setting document in mongo:
notice the lack of the
<br/>
tag in the value fieldExpected behavior:
The front end still alive
Actual behavior:
The front end breaks
Server Setup Information:
Implementación
Versión 5.4.1
ID de implementación BY5JmCq5iXeezaP5e
Versión de motor de aplicaciones 1.36.0
Versión de nodo v14.19.3
Migración de base de datos
281 (25 de enero de 2023 10:28)
MongoDB 5.0.8 / wiredTiger (oplog Habilitada)
Detalles de confirmación HEAD: (f7908e8)
Rama: HEAD
PID 751170
Client Setup Information
Happens only in web and desktop app
Workarround
Change the setting by mongosh
Open your OS terminal
open monsgo console
> mongo
Run this query to show the values in the DB
rs01:PRIMARY> db.rocketchat_settings.find({_id : \"Custom_Translations\"}).pretty()
run this query to clean the custom field
rs01:PRIMARY> db.rocketchat_settings.update({"_id":"Custom_Translations"},{$set:{"value":""}})
Relevant logs:
The text was updated successfully, but these errors were encountered: