had issues with recaptcha & had to generate a new key for it. now the register form does not work at all, I just get the error:
Fatal error: Call to a member function getOne() on a non-object in /var/www/vhosts/oncologyeducation.com/httpdocs/core/cache/includes/elements/modplugin/10.include.cache.php on line 9
Line 9 is this:
$profile = $user->getOne('Profile');
I get this in the modx error log:
[2011-08-24 13:21:32] (ERROR @ /index.php) modUserProfile: Attempt to set NOT NULL field internalKey to NULL
- I've disabled recaptcha
- I've manually cleared the cache folders
- if I check the admin, the user has been added
login/register is fully updated...
- any thoughts?
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
-
MODX Staff
- 10,725 Posts
What version of MODX? What plugin is that throwing the error?
Hi;
It's the latest REVO 2.1.3 the plugin was customized from some code that someone else provided in the forums [Bob maybe? - sorry I don't remember]
It fires on the onusersave event & was working perfectly ~probably~ until the 2.1.3 update was performed a couple of weeks ago - just didn't catch the error.
here is the code:
<?php
$uid = $_POST['id'];
$user = $modx->getObject('modUser',$uid);
$profile = $user->getOne('profile');
$isBlocked = $profile->get('blocked');
$message = '';
$mailChunk = '';
$email = $profile->get('email');
$fullname = $profile->get('fullname');
$mailFrom = $modx->getObject('modSystemSetting', 'registration_reply_email');
$replyTo = $modx->getObject('modSystemSetting', 'emailNoReply');
$mailFromName = 'domain.com Registration';
// unblock message
if (($isBlocked == 1) && ($_POST['blocked'] == 0)){
$mailChunk = 'userUnBlocked';
$subject = 'You have been unblocked';
}
// block message
if ($isBlocked == 0 && ($_POST['blocked'] == 1)){
$mailChunk = 'UserBlocked';
$subject = 'You have been blocked';
}
if ($mailChunk != ''){
$modx->setPlaceholder('fullname',$profile->get('email'));
$modx->setPlaceholder('email',$profile->get('fullname'));
$placeHolders = array('fullname' => $fullname, 'email' => $email);
$message .= $modx->parseChunk($mailChunk, $placeHolders, '[[+', '+]]');
$modx->getService('mail', 'mail.modPHPMailer');
$modx->mail->set(modMail::MAIL_BODY,$message);
$modx->mail->set(modMail::MAIL_FROM,$mailFrom);
$modx->mail->set(modMail::MAIL_FROM_NAME,$mailFromName);
$modx->mail->set(modMail::MAIL_SENDER,$mailFrom);
$modx->mail->set(modMail::MAIL_SUBJECT,$subject);
$modx->mail->address('to',$email);
$modx->mail->address('reply-to',$replyTo);
$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();
}
As you can see this is supposed to fire when a user gets blocked or unblocked,.
It's disabled for now.
-thoughts?
-sean
[ed. note: sean69 last edited this post 15 years, 2 months ago.]
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525