Posted by theunraveler on August 29, 2012 at 7:41pm
2 followers
| Project: | Hierarchical Select |
| Version: | 7.x-3.0-alpha5 |
| Component: | Code - Taxonomy |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
When using the hs_taxonomy field formatters, the field label is printed even when the field is empty. This is because of the #attached property being added to the render array. Even though the render array has no children, that property must be enough for the field label to still print.
Here's a patch that just returns early in the field formatter process if the field is empty. An upside of this is that it also saves on a couple taxonomy term/vocabulary loads if the field is empty as well.
| Attachment | Size |
|---|---|
| hs_taxonomy-empty_field_label.patch | 670 bytes |
Comments
#1
And the patch for alpha-5. Thanks theunraveler for the code.