D
Deleted member 184953
Guest
Thanks @Ivancas
You've pointed something out, for a few posts now, that helps avoid these repeated errors.
This is what I understand now: my conditional statement is not wrong, it works fine and does what it is told. However, it triggers template errors in a special case, when an user concerned by one of the selected user group is deleted (or a guest but this parameter is not taken into account here).
This is also why your error message states:
To avoid this you have to add a add a second condition element in the conditional statement
I will test this locally and I will publish a new version as soon as I have validated this fix.
You've pointed something out, for a few posts now, that helps avoid these repeated errors.
This is what I understand now: my conditional statement is not wrong, it works fine and does what it is told. However, it triggers template errors in a special case, when an user concerned by one of the selected user group is deleted (or a guest but this parameter is not taken into account here).
This is also why your error message states:
Code:
[*]Generated by: Unknown account
To avoid this you have to add a add a second condition element in the conditional statement
$post.User
. This is confirmed by this message from @Xon, which is almost 5 years old! As you wrote previously the right code should be:
HTML:
{{ $post.User AND $post.User.isMemberOf('X') ? 'class-name' : '' }}
I will test this locally and I will publish a new version as soon as I have validated this fix.
Last edited by a moderator: