Jump to content


Photo

Member blocks do not display if there's no results


Spent some time trying to get to the bottom of this, hopefully you can duplicate.

I was initially aiming to build a block that showed online friends of the current user - and show something else in the block if the user isn't logged in or has no friends.

The problem is, the block does not show at all if there's no results, even with the "Hide block if there's no content" option disabled.

Here's the block - notice the template has content that should show regardless of the user or number of results. It doesn't show unless the block generates some results (try turning off the Friends option, then logging in, to see a result and therefore the whole block).

Status: Fixed
Version: 2.3.1
Fixed In: 2.3.2


1 Comments

This was unique to the specific option to return friends

if( count($friends) )
                    {
                        $_whereMembers[]    = "m.member_id IN( " . implode( ',', $friends ) . ")";
                    }
                    else
                    {
                        return '';
                    }

Fixed