When using this small piece of code, the block only renders for vendors, but never does for users.
The ‘user_view_block’ does not render despite being a valid User Object.
if I try printing “$follower_user->get_id()” or any other user attribute, it correctly prints the user attribute,
I also use a similar piece of code somewhere else on the page and it displays flawlessly there.
Do you have any idea of what the issue could be?
Thank you
Hi, here’s the code. “$followers_ids” contains an array of user_ids. (I modified the foo-follower extension to work with user_ids)
I then check if the ID is linked to either a vendor or a user object and output the corresponding block.
It doesn’t show any error and simply prints nothing when trying to output a user_view_block. If I try simply printing $follower_user->get_id() it works, which means there’s a user object.
We have not reproduced this issue. It works correctly. Please send more details that may help to detect or reproduce this issue (e.g., where you try to put this code snippet, please send the full code snippet with a hook if you use such one).