We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28589
    • 56 Posts
    Hi,

    I’ve got a problem with alias autogeneration: accentuated letters are left out.
    For example, if the page title is "Tést", le generated alias will be "tst" rather than "test".
    This bug is supposed to be fixed in 0.9.6.2, from what I read, but it isn’t for me.

    Note that in the French forum, I’m the only one who gets this problem. It works fine for others.
    My modx configuration seems to be right, so does my PHP config.

    If that helps, I’m willing to set up an empty modx installation (as well as a restricted FTP access if needed), so that developers can really check out the problem.

    Thanks.
    • Can you download the latest SVN version and test? To checkout the latest SVN trunk of the soon-to-be-released 0963, please point your subversion client to the following repository location:

      http://svn.modxcms.com/svn/tattoo/tattoo/branches/0.9.6

      Also it may be beneficial to know a bit more about the various versions you’re running of the server software (Apache, PHP and MySQL in particular).
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 28589
        • 56 Posts
        You’ll find the info about my server configuration here: http://modxcms.com/forums/index.php?action=dlattach;topic=29118.0;attach=8090
        But note that I could also reproduce the bug locally, using EasyPHP and the latest version of PHP5.

        I retrieved the SVN and started a new installation with it (not a single warning during it, all OK), and didn’t touch the configuration apart from enabling friendly URLs and alias autogeneration.
        And... it worked. "tést" generated "test". Not sure what’s wrong with my current installation.
        I’ll try again with a new 0.9.6.2 installation when I get the time. Maybe I still have some old 0.9.6.1p2 PHP files somewhere?
          • 10449
          • 956 Posts
          See if this quick fix helps: http://modxcms.com/forums/index.php/topic,25128.msg175607.html#msg175607

          manager/includes/extenders/dbapi.mysql.class.inc.php" at approx. line 80:
          Add before line "global $modx;"
          Code: "global $database_connection_method;"

          I’m not sure if this affects aliases too, but it’s worth a try.
            • 28589
            • 56 Posts
            ganeshXL: that didn’t work. But I’ll still leave that line in, I guess it can’t hurt.
              • 10449
              • 956 Posts
              Well, you could analyse the function which is responsible for the character replacements:

              manager/processors/save_content.processor.php
              line 673
              function stripAlias($alias) {

              Maybe some characters got corrupted?

              I just did a couple of tests here with 0.9.6.2 on Windows/Wamp and everything was replaced properly..., e.g. Genève -> Geneve, téléphone -> telephone etc.
                • 28589
                • 56 Posts
                Hmm, the stripAlias function is exactly the same between 0.9.6.2 and the SVN.
                Just in case I missed anything, I still copied/pasted it from the SVN version... No difference, the bug is still there.
                The truth is out there...

                Edit: I think it has something to do with the encoding/language configuration (which is different between my old install and my SVN install), I’ll have to mess around with this.

                Edit 2: Okay, changing the encoding from "Western European (ISO) - iso-8859-1" to "Unicode (UTF-8) - utf-8" fixes the alias autogeneration, but messes up all of my accents... Both in the manager and on the site. That’s actually why I originally changed the encoding in the first place, because no accents worked in the manager, in the menu and all.
                  • 28589
                  • 56 Posts
                  Quote from: Stifu at Oct 03, 2008, 04:07 PM

                  Edit 2: Okay, changing the encoding from "Western European (ISO) - iso-8859-1" to "Unicode (UTF-8) - utf-8" fixes the alias autogeneration, but messes up all of my accents... Both in the manager and on the site. That’s actually why I originally changed the encoding in the first place, because no accents worked in the manager, in the menu and all.
                  About that, is alias autogeneration with accent handling planned for the ISO-8859-1 encoding in a future version of modx?
                  If not, is there a convenient way to convert all my pages from ISO-8859-1 to UTF-8, without having to manually fix all accents?
                  • There are plans to change the alias generation for future releases to better handle automatic transliteration. Unfortunately, probably won’t see it until Evo.
                      Ryan Thrash, MODX Co-Founder
                      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                      • 15001
                      • 697 Posts
                      Interesting thread.

                      Also have this problem of accent generation with MODx 9.6.2.
                      I use iso-8859-1 (i.e. latin1) charset and a latin 1general case insensitive collation.

                      I don’t plan to move to utf-8 as I experienced problems with the way that some search engines display page descriptions written with this charset.

                      All works fine, excepted aliases for which accented characters are removed. If they could at least be replaced by their unaccented equivalent, it would be nice.