Page 1 of 1

[SOLVED in next version] Chat (can't delete new discussion) and JavaScript popup - character backslash errors

Posted: 21 Jan 2023, 05:28
by Didou12
Hi,

It's ok when I click on "search" but nothing happened when I click on "edit" or "delete"

Also I have an error in the console when I click on the discussion.

Re: Chat, can't delete or edit new discussion

Posted: 21 Jan 2023, 07:48
by support
Can't reproduce this issue. Please reproduce this issue on personal demo https://www.rukovoditel.net/demo.php
and give me the link to the demo.

Re: Chat, can't delete or edit new discussion

Posted: 22 Jan 2023, 00:21
by Didou12
Ok so I can't reproduce in the demo BUT I clicked on the console and I saw the problem. I think an \ is missing before an ' in the french translation (in the javascript), but in the translation (php), I saw the backslash to avoid messing the php code.
if(confirm('Êtes-vous sûr de vouloir supprimer cette conversation ? Il est impossible d'annuler cette action.'))
See the attachment.

EDIT : When I remove the backslash and the apostrophe in the translation, it works. But it's a French error ahaha. I think translation is not sanitized before included in the javascript to avoid apostrophe problems and it can be a real problem in French (and even in English)

Re: Chat, can't delete or edit new discussion

Posted: 22 Jan 2023, 09:27
by Didou12
There also is a problem with pop-up (my title have a backslash which isn't here in my field), see the attachment, don't know if the two are the same error.

The field is Entity, and error is in the title.

Re: Chat (can't delete or edit new discussion) and JavaScript popup - character escape and backslash errors

Posted: 25 Jan 2023, 09:14
by support
Ok, I see the issue. I will update code for 3.4 to sort out with it.

Re: Chat (can't delete or edit new discussion) and JavaScript popup - character escape and backslash errors

Posted: 25 Jan 2023, 16:21
by Didou12
Really thank you Sergey

Re: [SOLVED in next version] Chat (can't delete new discussion) and JavaScript popup - character backslash errors

Posted: 04 Dec 2023, 22:11
by Didou12
Hi

Just for information, all is good but the character is displayed in html.