Announcement

Collapse
No announcement yet.

Error message when trying to post arabic characters : Please enter a message with at least 1 character

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error message when trying to post arabic characters : Please enter a message with at least 1 character

    Hello,

    Our forum is in french but we often post arabic characters. Our database tables always used latin1_swedish and we never had this problem till the last time we restored the database (with GoDaddy restore tool, which we already used in the past).

    When one or more arabic characters are entered in a post (containing a french text or not), that error message is displayed and the message can't be posted. (Opening the code mode of the editor yields also an error and erases the message.)

    Here are some messages which are printed in Firefox' console when it happens :

    vBulletin.loadingIndicator.hide Counter: 1 Source: ajaxStop footer-rollup-524.js:337:14833
    ajaxForm complete (vBulletin.contentEntryBox.initAjaxFormSubmit) ckeditor-rollup-524.js:61:20555
    vBulletin.loadingIndicator.hide Counter: 0 Source: Unspecified footer-rollup-524.js:337:14833


    How can we fix that ?

    We have :
    vb 5.2.4 patch 2
    php 5.4
    MySQL 5.5
    Last edited by Abdarrahmaan; Wed 23rd Nov '16, 11:51pm.

  • #2
    We tried several things, to no avail :

    - the forum's HTLM charset is ISO-8859-1, like in the database
    - creating a new style did not resolve the issue
    - nor restoring the parameters, styles and languages with tools.php
    - nor scanning, optimizing & repairing the tables
    - nor emptying the cache
    ...

    Any clue ?

    Comment


    • #3
      We find that the error is caused by the 5.2.4 upgrade.

      And that changing the charset to utf8 may solve the problem, but I don't know how to do that without breaking the forum or it resulting in bad displaying of characters.

      Can someone tell me how to do it (go to utf8) ? Do I just need to convert some database content to unicode and change the charset in the admin panel and that's all ?

      (I tried to change the collations in the database using the change_collations script, and to change the charset in the forum config file, but that broke the forum. Just changing the charset in the forum admin panel does not display the characters rightly)
      Last edited by Abdarrahmaan; Mon 12th Dec '16, 5:38pm.

      Comment


      • #4
        If you google "convert mysql to UTF-8" there is a lot of information on it. Its fairly easy to do, just depending on your size of your DB could take a while.
        Once that is done you should be able to go to the language settings and change it from ISO-8859-1 to UTF-8 and everything should display correctly.
        Really recommend backing up your data first, and doing this on a dev/test site first to make sure.

        Comment


        • #5
          Thanks

          I did it, and it works for the new posts I create, but the french characters in old posts, old forums' and topics' names and in other places like the menu of the admin panel do not display correctly : I see "�" instead of the characters , , ...

          And the french characters (I mean even "a, b, c") don't display at all in old posts, only the arabic characters display now !

          I changed the connection charset of the database in the config file to the one displayed in phpMyAdmin... same result.
          Last edited by Abdarrahmaan; Wed 14th Dec '16, 9:28am.

          Comment


          • #6
            traidnt they convert the database

            360 saudi riyal

            https://www.traidnt.com/service/pricelist.html#
            https://www.vbulletin.com/forum/foru...re-waiting-for

            Comment


            • #7
              Thank you but I can't do that though.

              Comment


              • #8
                I checked that the content of the tables is in utf8, using this query :

                Code:
                SELECT CONVERT(CONVERT(username USING BINARY) USING latin1) AS latin1,
                CONVERT(CONVERT(username USING BINARY) USING utf8) AS utf8
                FROM user WHERE userid=24
                The result in utf8 was good, but this same user name is still displayed incorrectly on the forum...
                Last edited by Abdarrahmaan; Thu 15th Dec '16, 9:16am.

                Comment


                • #9
                  I followed this when I converted mine. I had no issues. Full link here: http://stackoverflow.com/questions/6...ation-to-utf-8
                  Of course make a back up before doing this.
                  ----
                  Use HeidiSQL. Its free and a very good db tool.
                  From tools menu, enter Bulk table editor
                  Select the complete database or pick tables to convert,
                  • tick Change default collation: utf8mb4_general_ci
                  • tick Convert to charset: utf8
                  Execute
                  This converts complete database from latin to utf8 in just a few seconds.
                  ----
                  The above fixed my issues with weird chars.

                  Comment


                  • #10
                    Thanks
                    It still didn't work so I chose to restore an older version and not to upgrade.

                    It's like vb 5.2.4 is converting the data in latin1 at some step even when we tell it to use utf8 (in the language charset, in the config file, after having converted the database in utf8). Uncommenting the "utf8" line in the config file even gives an error. I verified the data in the database' content is in utf8 and the forum page too.

                    Comment


                    • #11
                      Just out of curiosity was it working with English, just not Arabic correct? Or is it saying that for all. I found when I upgraded to 5.2.5 there was a setting, I cannot remember what its called but if you search for "Maximum Characters" in all settings I found it was set to 1. This was my issue. Maybe not for you. But worth a check.

                      Comment


                      • #12
                        Thanks

                        was it working with English, just not Arabic correct
                        Only when arabic characters were typed in a post (even when there were many other french/latin characters)... and sometimes (when I changed the encodings) quite the opposite : only arabic characters in the posts were showed (the french characters were showed too only if they were quoted or between other BBCode tags if I remember well).

                        Comment

                        Related Topics

                        Collapse

                        Working...
                        X