I’ve looked at the code and I can’t see any way Notify could interfere with Personalize.
I’ll try to find time to test the two together. I assume that you’re now running MODX 2.8.4. Let me know if that’s not the case.
Something else you might try in the meantime is to uninstall and remove All versions of Personalize in Package Manager, then download and install it again.
It’s basically this line ($modx->user->hasSessionContext($modx->context->get('key'))) to test if the current user is authenticated.
If you create a snippet with this code, does that work?
if ($modx->user->hasSessionContext($modx->context->get('key'))){
return 'User is logged in.';
} else {
return 'User is NOT logged in!';
}
Instead of installing and uninstalling the Notify extra.
Can you reproduce the same behavior when you just activate/deactivate the plugin with the name “Notify” (There is a checkbox “ Inactive plugin”)?
and the problem is exactly the same.
The fact that you cannot reproduce the issue, from the moment that i reproduced id immediately by the new-fresh modx installation means that something is wrong with my code. (Did you tried to reproduced the issue using exactly my code?)
If you create a new snippet (name it for example “myPersonalize”), copy the code from the snippet “Personalize” and then use this new snippet [[!MyPersonalize? ... ]] instead, does that work?
Oh yes this is a solution. Thank you very much.
Of course it could be good to find out what causes the previous behavior.
Any way at least the job is done.
Thank you all
I agree, but as I can’t reproduce the issue, I can not debug it.
It’s really weird, that the custom snippet works as it does more or less the same as “Personalize”. I also don’t see how “Notify” could influence this code.
I could not reproduce it either, and I do have Notify installed.
In the default properties of the Personalize snippet, are any of them set other than &firstName and &fullName?
Do you have a Notify snippet tag on the page or in the page template?
The only other thing I can think of is that both extras have an &allowedGroups property.
It shouldn’t interfere, since the Notify snippet should only execute when you click on “Launch Notify” unless there’s a snippet tag for Notify somehow being parsed on the page where you’re using Personalize.