Suitecrm: Errors in User profile with French translation (quote)

Created on 24 Sep 2019  路  4Comments  路  Source: salesagility/SuiteCRM


browser console shows:

  • SyntaxError: Unexpected identifier 'utilisateur'
  • ReferenceError: Can't find variable: tinyConfig
    Then, you can't edit Emails parameters

Issue

Expected Behavior

Actual Behavior


Possible Fix


See modules/Emails/EmailUI.php
change the way quotes are escaped:
$v = str_replace("'", "\'",$v);
=>
$v = str_replace("'", "\'",str_replace("\'", "'", $v));

Steps to Reproduce


  1. Install french translation
  2. log in french
  3. go to user profile
  4. look at the browser console
    5 click on Emails parameters

Context


Your Environment

  • SuiteCRM Version used: 7.10.20
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): any
  • Environment name and version (e.g. MySQL, PHP 7): any
  • Operating System and version (e.g Ubuntu 16.04): any
AreaConfig Important Fix Proposed Bug

Most helpful comment

The PHP possible fix was not saved correctly by Github.
We will submit a PR

All 4 comments

The PHP possible fix was not saved correctly by Github.
We will submit a PR

Hi @QuickCRM, thanks for the PR! just to note for the future, if you want to post code in a GitHub issue you can encapsulate it with three backticks ``` like this:

<?php
echo 'Hello World!';

and it should keep it intact.

It's gets even better if you add a language name, like this:
```php
or
```bash

<?php
function helloWorld() {
   echo 'Hello World!';
}

you get syntax highlighting.

As a french dev & user so much error like this, for example in /index.php?module=Configurator&action=EditView

In the console "Uncaught SyntaxError: missing ) after argument list"

image

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sasha2002 picture sasha2002  路  3Comments

Mausino picture Mausino  路  3Comments

ArturoBurela picture ArturoBurela  路  3Comments

ajprouty87 picture ajprouty87  路  3Comments

Vhex picture Vhex  路  3Comments