When hide_empty_terms is FALSE and display_nums is TRUE, terms will still be hidden if empty.
Attached is a trivial fix that tests for $hide_term before $is_hidden
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 1902192-11-hide_empty_terms_fix.patch | 658 bytes | hles |
| #6 | taxonomy_menu-count-nodes-test-1902192-hide-term-fix.patch | 570 bytes | Anonymous (not verified) |
| #4 | taxonomy-menu-hide-term-fix-1902192.patch | 714 bytes | Anonymous (not verified) |
| hide-term-fix.patch | 526 bytes | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) commentedComment #2
hles commentedComment #3
hles commentedArgh, good catch ! ... Looks good, I'll commit it as soon as I can.
Comment #4
Anonymous (not verified) commentedThe patch is wrong and am sorry for that. It has been diffed against 7.x-2.x-dev but only tested on 7.x-2.0-alpha2. There is a one-line that tests for nodes_count being greater than 0 while it was only testing for isset() in 7.x-2.0-alpha2.
Attached patch should be more correct but still intested... looks good though.
Comment #6
Anonymous (not verified) commentedAdd the zero count for the empty terms in testTaxonomyMenuCountNodes()
Comment #8
hles commentedPlease, do not change the tests. At the moment, when the number of nodes for a taxonomy term is 0, taxonomy menu does not display the count in the title link, this is by design. If you think it should be otherwise, please open another issue so it does not conflict with this one.
Comment #9
Anonymous (not verified) commentedI somehow felt this was not the proper way to submit a fix -- sending a patch and changing the tests to make it works! I am new here so I appreciate your guidance and your comments.
Thanks!
Comment #10
hles commentedDon't worry, basically if the tests are broken and the patch can't be green because of that, you can do it. But if changing the tests implies that the behavior of the module should change too, then this needs to be discussed.
Comment #11
hles commentedDoes this one solve this issue ?
Comment #12
Anonymous (not verified) commentedPatch at #11 works as expected. Thank you !
Comment #13
hles commentedThank you, commited !