Latest Revo/Latest Personalize
Fatal error: Call to a member function get() on a non-object in /home/deniro03/public_html/clients/test4/core/cache/includes/elements/modsnippet/92.include.cache.php on line 88
I just noticed this error, as it only happens when I am not logged into the manager (I'm almost always logged in). I followed the file to the following code:
/* Prepare params and variables */
$output = '';
$yesChunk = (isset($yesChunk))? $yesChunk : '';
$noChunk = (isset($noChunk))? $noChunk : '';
/* Do the work */
if ($modx->user->hasSessionContext($modx->context->get('key')) ) {
$output = $modx->getChunk($yesChunk);
if (isset($ph)) {
if ($fullName) {
$profile = $modx->user->getOne('Profile');
$modx->setPlaceholder($ph, $profile->get('fullname'));
} else {
$modx->setPlaceholder($ph, $modx->user->get('username'));
}
}
} else {
$output = $modx->getChunk($noChunk);
}
return $output;
}
Here is line 88 from the above:
$modx->setPlaceholder($ph, $profile->get('fullname'));
So I tested the the Personalize call with &fullName=`0` and it seems to work. However, that won't work for my client's site. We need to be able to use the fullname. Anytime I have it set to `1`, we get that error on any page containing a personalize call.
I hope that all made sense.