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

Post Reply
Didou12
Posts: 487
Joined: 14 Jan 2023, 14:53
Name: Louis
Location: Montreal, Canada

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

Post 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.
Attachments
tempsnip.png
erreur.PNG
Last edited by Didou12 on 14 Mar 2023, 08:09, edited 4 times in total.
Using Rukovoditel since 2022 --- v3.4 (with extension) in French on PHP 8.2
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

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

Post 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.
Didou12
Posts: 487
Joined: 14 Jan 2023, 14:53
Name: Louis
Location: Montreal, Canada

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

Post 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)
Attachments
erreur2.png
Last edited by Didou12 on 22 Jan 2023, 09:31, edited 1 time in total.
Using Rukovoditel since 2022 --- v3.4 (with extension) in French on PHP 8.2
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
Didou12
Posts: 487
Joined: 14 Jan 2023, 14:53
Name: Louis
Location: Montreal, Canada

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

Post 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.
Attachments
erreur5.png
erreur5.png (9.53 KiB) Viewed 3890 times
Using Rukovoditel since 2022 --- v3.4 (with extension) in French on PHP 8.2
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

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

Post by support »

Ok, I see the issue. I will update code for 3.4 to sort out with it.
Didou12
Posts: 487
Joined: 14 Jan 2023, 14:53
Name: Louis
Location: Montreal, Canada

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

Post by Didou12 »

Really thank you Sergey
Using Rukovoditel since 2022 --- v3.4 (with extension) in French on PHP 8.2
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
Didou12
Posts: 487
Joined: 14 Jan 2023, 14:53
Name: Louis
Location: Montreal, Canada

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

Post by Didou12 »

Hi

Just for information, all is good but the character is displayed in html.
Attachments
error4.PNG
Using Rukovoditel since 2022 --- v3.4 (with extension) in French on PHP 8.2
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
Post Reply