Reviewed & tested by the community
Project:
Taxonomy Formatter
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
24 Nov 2011 at 23:04 UTC
Updated:
18 May 2023 at 08:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedComment #2
danlinn commentedHave you hidden the label in the content type? I did that and it doesn't show. If you have done that, then the issue would be better off in the panels issue queue as it would mean that panels is not respecting the label choices of the content type.
Let me know if you have any questions, but I'll be closing for now.
Thanks,
Dan
Comment #3
azinck commentedI'm seeing this problem, too. And not just with panels, but anywhere I use the "delimited" formatter for a taxonomy term reference field.
@danlinn: The label is displaying even when there's no data in the field. We don't want to set the label to "hidden", because we DO want the label to display when there is data in the field.
I've attached a patch against 7.x-1.x that fixes the problem.
Comment #4
azinck commentedComment #5
danlinn commentedOk, I get it now. Thanks for the patch. I'll get it rolled in to a new release as soon as I can.
Comment #6
BarisW commentedSame here with Display Suite.
It can be even simpler, the patch above checks in the end of the function if there is content to return, but this can be done in the beginning of the function.
Change:
to:
Comment #7
cwithout commentedAgree with #6. Here's updated patch.
Comment #8
xaa commented#7 works. thanks for this small & quick patch
Comment #9
sepgil commentedThe patch from 7 gave me a warning, when applying so here is a slightly corrected version. All credits to cristinawithout.
Btw: I renamed the issue, since it isn't caused only when displaying with panels, as mentioned above.
Comment #10
sepgil commentedforgot to attach the new patch.
Comment #11
xaa commented(I didn't used panels but I also had the issue)
Comment #12
xaa commentedtime to commit, no?
Comment #13
danlinn commentedYep, just a tad busy. I'll hopefully get a new release out soon.
Comment #14
roderikFYI: does not seem to be necessary anymore when you aply #1362976: Optimizing formatter hooks.
Comment #15
roderik...and I was wrong. Still necessary.
We're doing enormous bikeshedding here (patch in #3 was correct already), but since it's not being applied: here's one that adheres to Drupal coding standards :)
Credit to original poster, or everyone, or noone, or w/e.
Comment #16
Philou88 commented#15 works as a charm, many thanks.
Comment #17
johnpitcairn commentedConfirming #15 works for me. How about a commit @dannlinn?
Comment #18
mittalpatel commented#15 works perfectly. Should be added in the module.
Comment #19
shaundychko#15 had a "hunk offset" against 7.x-1.4, so re-rolled.
Comment #20
jenlamptonPatch in #19 does the trick for me as well. +1 on RTBC.
Comment #21
chris matthews commentedThe 3 year old patch in #19 still applies cleanly to 7.x-1.x-dev and fixes this issue, but I but I'm not sure if anyone is maintaining the 7.x branch to commit and push to a new release.