[2013-05-05 13:41:53] (ERROR @ /index.php) [FormIt] Could not find hook "InputEmptyCheck".
[2013-05-05 13:43:12] (ERROR @ /index.php) Could not get table class for class: modAccess
[2013-05-05 13:43:12] (ERROR @ /index.php) Could not get table name for class: modAccess
[2013-05-05 13:43:12] (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` = 20' at line 1
)[[!Register? &submitVar=`registerbtn` &activationResourceId=`37` &activationEmailTpl=`ActivationEmailTpl` &activationEmailSubject=`Please activate your account` &submittedResourceId=`36` &usergroups=`Registered Vendors` &postHooks=`VendorRegistrationAlert` ]]
$message = 'Hi, a new Vendor signed up: '.$hook->getValue('username')
. ' with email '.$hook->getValue('email').'.';
$modx->getService('mail', 'mail.modPHPMailer');
$modx->mail->set(modMail::MAIL_BODY,$message);
$modx->mail->set(modMail::MAIL_FROM,'[email protected]');
$modx->mail->set(modMail::MAIL_FROM_NAME,'CPG Site');
$modx->mail->set(modMail::MAIL_SENDER,'CPG Webmaster');
$modx->mail->set(modMail::MAIL_SUBJECT,'New User Signed Up');
$modx->mail->address('to','[email protected]');
$modx->mail->setHTML(true);
if (!$modx->mail->send()) {
$modx->log(modX::LOG_LEVEL_ERROR,'An error occurred while trying to send the email: '.$err);
}
$modx->mail->reset();
/* tell our snippet we're good and can continue */
return true;
[2013-07-31 00:47:20] (ERROR @ /links/security/user.php) Could not get table class for class: modAccess
[2013-07-31 00:47:20] (ERROR @ /links/security/user.php) Could not get table name for class: modAccess
[2013-07-31 00:47:20] (ERROR @ /links/security/user.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` = 5' at line 1
)
[2013-07-31 00:56:04] (ERROR @ /links/security/user.php) Could not get table class for class: modAccess
[2013-07-31 00:56:04] (ERROR @ /links/security/user.php) Could not get table name for class: modAccess
[2013-07-31 00:56:04] (ERROR @ /links/security/user.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` = 7' at line 1
)
[2013-07-31 00:57:32] (ERROR @ /links/security/user.php) Could not get table class for class: modAccess
[2013-07-31 00:57:32] (ERROR @ /links/security/user.php) Could not get table name for class: modAccess
[2013-07-31 00:57:32] (ERROR @ /links/security/user.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` = 6' at line 1
)
[2013-07-31 00:57:42] (ERROR @ /links/security/user.php) Could not get table class for class: modAccess
[2013-07-31 00:57:42] (ERROR @ /links/security/user.php) Could not get table name for class: modAccess
[2013-07-31 00:57:42] (ERROR @ /links/security/user.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` = 4' at line 1
)
[2013-07-31 01:06:43] (ERROR @ /links/security/user.php) Could not get table class for class: modAccess
[2013-07-31 01:06:43] (ERROR @ /links/security/user.php) Could not get table name for class: modAccess
[2013-07-31 01:06:43] (ERROR @ /links/security/user.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` = 8' at line 1
)
[2013-07-31 01:06:51] (ERROR @ /links/security/user.php) Could not get table class for class: modAccess
[2013-07-31 01:06:51] (ERROR @ /links/security/user.php) Could not get table name for class: modAccess
[2013-07-31 01:06:51] (ERROR @ /links/security/user.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` = 3' at line 1
)While testing you're hitting the "back" button on the Thanks for Registering page, and going back to the Register page.on this post https://forums.modx.com/thread/?thread=77630&page=1 a possible solution.
$message = 'Hi, a new user signed up: '.$hook->getValue('username')
. ' with email '.$hook->getValue('email').'.';
$modx->getService('mail', 'mail.modPHPMailer');
$modx->mail->set(modMail::MAIL_BODY,$message);
$modx->mail->set(modMail::MAIL_FROM,'[email protected]');
$modx->mail->set(modMail::MAIL_FROM_NAME,'My Site');
$modx->mail->set(modMail::MAIL_SENDER,'My Site');
$modx->mail->set(modMail::MAIL_SUBJECT,'New User Signed Up');
$modx->mail->address('to','[email protected]');
$modx->mail->setHTML(true);
if (!$modx->mail->send()) {
$modx->log(modX::LOG_LEVEL_ERROR,'An error occurred while trying to send the email: '.$err);
}
$modx->mail->reset();
/* tell our snippet we're good and can continue */
return true;I can answer myself: the activationResource was wrongly call. I had [[ConfirmRegister]] when it should be [[!ConfirmRegister]].