We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39587
    • 59 Posts
    I am creating a website that will be used in the Seychelles. But Seychelles is not included in the list countries from the dropdown in user management. Is the a way to add it to the list

    This question has been answered by BobRay. See the first response.

      • 3749
      • 24,544 Posts
      I'm not sure about this, but I believe MODX uses the list in this directory that matches the manager language:

      core/lexicon/country/

      For example, if the Manager language is english, the file used would be:

      core/lexicon/country/en.inc.php

      I could be wrong, because I see Seychelles is already there in that file, though it could be missing for the language you're using.

      $_country_lang["sc"] = 'Seychelles'; // Seychelles
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 39587
        • 59 Posts
        Hi Bob,

        The site will be in English I just need the ability to allow users to select Seychelles when entering their address. I have checked core/lexicon/country/en.inc.php in the version of MODX Revolution 2.6.1-pl which I installed a few days ago and Seychelles is included. In lexicon management language is set to en for every namespace.

        But still Seychelles is not available for selection in the user manager form. To verify go to user manager and scroll through the dropdown list for the country field.
        • discuss.answer
          • 3749
          • 24,544 Posts
          Mystery solved.:)

          I watched the network tab in Chrome dev. tools to see what's happening when you drop-down that list.

          It definitely calls the system/country/getlist processor and in the code of that processor is this line that gets the countries:

          include $this->modx->getOption('core_path').'lexicon/country/en.inc.php';


          In that file, though, there's a later line:

          $_country_lang["sc"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)


          That's overwriting the value for Seychelles.

          It should be:

          $_country_lang["sx"] = 'Sint Maarten (Dutch part)'; // Sint Maarten (Dutch part)


          Make that change, clear the cache, and you should be good to go.

          That mistake is in all the country files. Could you please report that here: https://github.com/modxcms/revolution/issues
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 39587
            • 59 Posts
            Thanks Bob, this fixed the issue. I will report the error to github.

            Cheers