We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36446
    • 184 Posts
    Hi!
    I have a 3rd Party Component to import Users from an Excel list to Modx Frontend users and usergroups that was developed for me by an company. Unfortunately this component isn't compatible with 2.3. and the company isn't able to help me with the problem.

    The component starts and i can see my import script but when i upload my excel file I get the following error message:

    Could not find action file at: /home/XXX/public_html/XXX/manager/controllers/default/import_users.php

    I know that i need to create this action file file but i have no clue on how to do this. I found this:
    http://rtfm.modx.com/revolution/2.x/developing-in-modx/advanced-development/custom-manager-pages/custom-manager-pages-in-2.3 but my understanding of modx isn't sufficient to fix this issue. Can anyone help me with this? I upload the component so if anyone is willing to help me that would be great!
    To get this component to work you need to create a Menu entry under extras with the action import_users and the Namespace import_users.

    Thanks a lot!


    [ed. note: flanger last edited this post 9 years, 9 months ago.]
      https://www.beautyislife-shop.de - premium make-up!
      https://www.topsterne.de - sell it here!
      ---------------------------------------------------------
      • 3749
      • 24,544 Posts
      Check the path for the import_users namespace. It should point to core/components/import_users/. The component should be looking there for its action file instead of in manager/controllers.

      It's possible that the action should be index rather than import_users, though you'd have to have an index file as described in the page link below.

      This might help: http://bobsguides.com/blog.html/2013/11/21/modx-cmps-an-anatomy-lesson/, though it's based on 2.2, not 2.3.
        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
        • 36446
        • 184 Posts
        Hi BobRay!
        Thanks for helping! I renamed my import_users.php to index.php and altered the action in the menu entry to index. The Namespaces for this component are set properly i guess (see attachment). But there is no controller file in core/components/import_users/controllers/default so Modx still looks in manager/controllers/default/index.php for the action file.
        Is this because I do not even have a controllers directory in my core/components/import_users/?

        Thanks again!



          https://www.beautyislife-shop.de - premium make-up!
          https://www.topsterne.de - sell it here!
          ---------------------------------------------------------
          • 36446
          • 184 Posts
          okay i might have found a very quick and dirty solution but it seems to work for now...
          I have copied the files import_users.php and the includes folder to to
          manager/controllers/default/ and now i can use my component...
          it might be just a problem of path declaration like BobRay said..

          Of course not an elegant solution but i can import users now. If i find a better way i will post this here.
          [ed. note: flanger last edited this post 9 years, 9 months ago.]
            https://www.beautyislife-shop.de - premium make-up!
            https://www.topsterne.de - sell it here!
            ---------------------------------------------------------
            • 3749
            • 24,544 Posts
            Sorry, I'm an idiot. I meant to send you to *this* blog article, which is for 2.2 and should be pretty similar to 2.3: http://bobsguides.com/blog.html/2014/03/28/modx-2.2-cmps-an-anatomy-lesson/.

            Notice that the core/components/import_users/ directory should contain an index.class.php file. It is the "Action" file that MODX is looking for, and its main job (near the end of the file) is to provide the name of the default controller.

            That said, your solution works. wink

              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