We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19033
    • 892 Posts
    Dear all,
    I am Japanese user. I have a trouble with MODx 096.
    I do not know whether contributing here is appropriate.
    But I contribute here because I do not know the section which should contribute it.

    I tried the following:
    First:
    1. log in manager.
    2. choose > user > user management(I do not know expression in English) > create user.
    3. enter user name, for example "username". and enter fullname, for example "user’sname".
    4. save

    Next:
    1. choose and open "username" in the list.
    2. Look at "fullname". It is correct.
    3. Save.
    4. Again look at "fullname". It is like this "user\’name".

    5. Again save, and look at "fullname". It is like this "user\\\’name".

    Same problem is caused when I create a category.
    Resource > Resource manager > chunk (or template, etc..).
    When I create a new category same trouble is caused.

    Can I solve this trouble ?
    Sincerely yours,
      • 28073
      • 164 Posts
      Dear all,
      I am Japanese user too, and I’m not good at English :’(
      An additional information on this problem.

      This problem is caused by using ’mysql_escape_string’ 2 time.

      [example]create and edit user
      source:modx-0.9.6.1/manager/processors/save_user.processor.php

      1st mysql_escape_string.
      39:$fullname = mysql_escape_string($_POST['fullname']);
      


      2nd mysql_escape_string.
      316:$sql = "UPDATE $dbase.`" . $table_prefix . "user_attributes` SET
      317:			fullname='" . mysql_escape_string($fullname) . "',
      318:			role='$roleid',
      


      If either 1nd or 2nd ’mysql_escape_string’ is removed, it solves.
      Which should be removed?, I am not sure.

      In ’Category name’ case, executed ’mysql_escape_string’ in ’/manager/processors/save_(htmlsnippet|module|etc..).processor.php’ and ’/manager/includes/categories.inc.php’.

      This problem causes another problem.
      Unintelligible sequence of characters might be caused under multi byte environment.

      sincerely yours,
        • 10487 MODX Staff
        • 1,535 Posts
        Hi both, could you please post a bug report over at http://modxcms.com/bugs and we’ll look at getting these issues fixed for the next release.

        Thanks,
        Garry
          Garry Nutting
          Senior Developer
          MODX, LLC

          Email: [email protected]
          Twitter: @garryn
          Web: modx.com
          • 19033
          • 892 Posts
          > Dear garryn
          Hi both, could you please post a bug report over at http://modxcms.com/bugs and we’ll look at getting these issues fixed for the next release.
          Thank you for advising to me!
          I contributed this problem into that.