Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I can't limit category depth, this variable (site_map_categories_depth) seems to be totally unused, neither to decide what is displayed on the site map, nor to build the taxonomy links (like http://drupal.org/node/483402 could make me fear).
This option could be very useful in a deep taxonomy.
Comment | File | Size | Author |
---|---|---|---|
#11 | categorydepth-1593556-11.patch | 1.76 KB | darrell_ulm |
#10 | categorydepth-1593556-10.patch | 1.71 KB | daffodilsoftware |
#8 | categorydepth-1593556-8.patch | 647 bytes | daffodilsoftware |
#6 | categorydepth-1593556-6.patch | 670 bytes | daffodilsoftware |
Comments
Comment #1
darrell_ulm CreditAttribution: darrell_ulm commentedThis looks like a duplicate to this other issue which has a patch.
See: http://drupal.org/node/1593570
Comment #2
Avorathol CreditAttribution: Avorathol commentedYou can see that this other issue was mine too, and it's absolutely not the same bug.
The other one is on the false displayed main category count (and I'll repost a fixed patch soon). It's just the number in parenthesis which is false.
This one is on selecting until how many hierarchical levels (or depth) will be displayed in Site Map. 1: Just the first level, 2: its children too, 3: its grand children too,.... 0: all of them ?
In short, this variable (site_map_categories_depth) should do that, but isn't used anywhere in the code.
Comment #3
darrell_ulm CreditAttribution: darrell_ulm commentedAvorathol,
OK, I see what you mean, and if you have a patch, then that is certainly accepted in Drupal!
Thank you,
Comment #4
NiR-1 CreditAttribution: NiR-1 commentedHello,
I have a really simple patch :
Modify line 353 :
by
Comment #5
darrell_ulm CreditAttribution: darrell_ulm commentedNiR:
Hey, that looks like it just may work., assuming you are meaning the .module file, where else could that line be, well anywhere really, but makes sense if it is in the .module or an .include.
I'll check it out.
Comment #6
daffodilsoftware CreditAttribution: daffodilsoftware commented@NiR
The variable site_map_categories_depth is meant for Taxonomy depth but the changes that you recommended are meant for menu depth but that helped me to address this issue. I changed line 516 in .module from
to
I tested it and it worked.Please test it and provide reviews.
Comment #7
frjo CreditAttribution: frjo commentedThis looks like a good patch but two spaces is missing:
Comment #8
daffodilsoftware CreditAttribution: daffodilsoftware commentedModified
Comment #9
frjo CreditAttribution: frjo commentedTested this now and the configuration option for depth need to be updated as well. The description is outdated and the default value should change from "all" to NULL.
Comment #10
daffodilsoftware CreditAttribution: daffodilsoftware commentedHi frjo
I modified the default value and also changed the description to
Specify how many subcategories should be included on the categorie page. Leave empty to return all levels.
Note that I added
variable_get('site_map_categories_depth') ? variable_get('site_map_categories_depth') : NULL;
as
variable_get('site_map_categories_depth',NULL) was not working as expected and I think it was taking default value '' rather than NULL
Please test the patch and provide feedback.
Comment #11
darrell_ulm CreditAttribution: darrell_ulm commentedHi daffodil,
Re-rolled this to apply after your prior patch :) -- thanks for that patch also.
Anyone want to test this on the -current - dev release or do you trust me to apply it? :)
Thanks
Comment #12
darrell_ulm CreditAttribution: darrell_ulm commentedHello,
Any other takers on quick testing the patch? @daffodil , could you give it a quick test to make sure it's OK. I'll give you attribution on it of course :) before I apply.
Thanks!
Comment #13
john.oltman CreditAttribution: john.oltman commentedIn the new 7.x-1.1 release
Comment #15
tomyinhauser CreditAttribution: tomyinhauser commentedHi guys, it seems that this issue has not been shipped in 7.x-1.1, as stated in previous comment.
The issue summary shows it is in 7.x-1.x-dev, and in fact I was working with 7.x-1.3 and had to switch to dev version to get the bug fixed.
More than that, filtering fixed issues in versions 7.x-1.1, 7.x-1.2 and 7.x-1.3 brings no results. Are the releases being done properly?