We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28626
    • 87 Posts
    Each time I send my register page containing this

    [[!Register?
    &submitVar=`registerbtn`
    &activationResourceId=`470`
    &activationEmailTpl=`ActivateEmailTpl`
    &activationEmailSubject=`Bedankt voor uw registratie`
    &submittedResourceId=`471`
    &usergroups=`webusers`
    ]]
    <div class="register">
    <div class="registerMessage">[[+error.message]]</div>
    <form class="form" action="[[~[[*id]]]]" method="post">

    ...etc

    An error will appear in the log file. No email is sent either. What does this error mean?

    [2010-10-19 07:31:09] (ERROR @ /index.php) Could not get table name for class: modAccess
    [2010-10-19 07:31:09] (ERROR @ /index.php) Error 42000 executing statement:
    Array
    (
    [0] => 42000
    [1] => 1064
    [2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’AS `modAccess` WHERE `modAccess`.`principal` = 9’ at line 1
    )
      • 22303 MODX Staff
      • 10,725 Posts
      I’m not sure, can you file this as a bug at http://github.com/splittingred/Login/issues so it does get looked at?
        • 28626
        • 87 Posts
        I found out that if I leave out

        &usergroups=`webusers`

        the error doesn’t appear, but still no mail is sent.
          • 31724
          • 24 Posts
          I am using extended modUser class and I got this error message when deleting my user. At the end of troubleshooting I had a look at modx.mysql.schema.xml AND it looks like this:
          <object class="modAccess" extends="xPDOSimpleObject">

          Isn’t there missing table="access_actiondom"??????????

          I have amended modaccess.map.inc.php including table definition:
          $xpdo_meta_map['modAccess']= array (
            'package' => 'modx',
            'table' => 'access_actiondom',
            'fields' => 
            array (
          

          and error disappeared.

          Is it a bug?
            • 22303 MODX Staff
            • 10,725 Posts
            No, this is an "abstract" object definition in the schema, which the other modAccess* classes define "concrete" implementations of. What is "this error message"? I don’t think you posted the error...
              • 31724
              • 24 Posts
              What does it mean abstract class - there is a real table (access_actiondom) in database for this class. Code is trying to getTableName for this class and cannot get it.

              I use "$delUser->remove()" to delete a user, it is deleted but with error on screen:
              ERROR is:

              (ERROR @ /index.php) Could not get table name for class: modAccess
              [2010-11-23 17:29:14] (ERROR @ /index.php) Error 42000 executing statement:
              Array
              (
              [0] => 42000
              [1] => 1064
              [2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’AS `modAccess` WHERE `modAccess`.`principal` = 86’ at line 1
              )

              And this is because there is "$accessTable = $this->xpdo->getTableName($target);" in moduser.class.php code which probably gives error as this class does not have table.


                • 22303 MODX Staff
                • 10,725 Posts
                access_actiondom is not related to modAccess class, it has it’s own class, modAccessActionDom; modAccess again is "abstract" and should never be instantiated by itself. This is causing your error and it needs to be resolved in the core. There should never be an attempt to instantiate modAccess. You would instantiate modAccessActionDom or one of the other "concrete" implementations of the modAccess "abstract" class. This is a basic inheritance model in OO programming.

                IOW, this is a bug and needs to be fixed, so please enter a ticket for it. smiley
                  • 31724
                  • 24 Posts
                  Hi OpenGeek, thanks for reply. How come it is not causing troubles when deleting normal modUser? My extended user class simply inherits function remove from modUser. I am not instantiating modAccess in any of my functions. So why am I getting this error and there is no error when you remove user through standard back-end.
                  Thanks,
                  Vlad
                    • 22303 MODX Staff
                    • 10,725 Posts
                    I have no idea why yet, thus I asked for the ticket so I (or another core contributor) don’t forget to look into it.
                      • 31724
                      • 24 Posts
                      Hi OpenGeek, has this issue been reported as a bug? This error appears even in Error Logs in CMS after deleting a user.