The Field Boxes module currently returns a box to render without having actual content on some pages. It would be nice to allow it to return NULL or an empty array if it decides that it doesn't actually have anything to display. See the diff for details - basically a one liner that does display a box if the rendered box is empty

Or if you want to be fancy, define up a hasDisplay() method, but personally, I would just go with the !empty() approach.

While this is a feature request, it bypasses multiple errors if an empty value is returned.

Comments

alan d.’s picture

Cross-posting to #1345568: Return nothing if there is no content in the Field Boxes queue. Please ping when fixed.

Cheers

Robin Millette’s picture

I used this smaller patch instead to achieve the same result.

muka’s picture

#2 works, thank you

Robin Millette’s picture

Status: Needs review » Reviewed & tested by the community

Marking RTBC according to muka and it works for me.

hefox’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Patch no longer applies but looks like the logic is already there so marking fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.