Taxonomy menu and Drupal 6.2 or 6.3dev FIX !!!
| Project: | Taxonomy Menu |
| Version: | 6.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
my old config:
Drupal 6.1
Taxonomy menu 6.x-1.0
after upgrading to D6.2 i have some trouble with my SubMenus (terms) !!!
iam edit taxonomy_menu.inc after:
---------------------------------------------
// Calculate the numbers of children nodes
$num = taxonomy_term_count_nodes($term->tid);
// If the number of children nodes of this term is
// zero and the Hide Empty Terms option is enabled,
// dont create the menu item
if (variable_get('taxonomy_menu_hide_empty', FALSE) == FALSE or $num != 0) {
$name = t($term->name);
if (variable_get('taxonomy_menu_display_num', FALSE) == TRUE) {
$name .= ' ('. $num .')';
}
$items[$path] = array(
------------------------------------------------- add line:
'access arguments' => array('access content'),
----------------------------------------------------
and all works fine, but if u create new term it not shown in your menu...
try to press "Save" in taxonomy menu settings to refresh menu
or simple add node to new term...

#1
my current configuration:
Drupal 6.3dev
Taxonomy menu 6.x-1,x-dev
but iam think it works and for D6.2 and TM6.x-1.0 too.
#2
holy wow, that actually worked. Running Drupal 6.2 and Taxononomy Menu 6.x-1.x, whichever is the new version.
Still can't get the taxonomy menu URLs to be affected by pathauto, and still getting the "array > array" breadcrumb in the view mode for an article. :/
#3
I tried this patch with Drupal 6.2 but am still not seeing the child terms in my menu
I edited taxonomy_menu.inc to be:
if (variable_get('taxonomy_menu_display_num', FALSE) == TRUE) {
$num = taxonomy_term_count_nodes($term->tid);
$name .= ' ('. $num .')';
}
$items[$path] = array(
// added access arguments according to: http://drupal.org/node/245199
'access arguments' => array('access content'),
'description' => t($term->description),
'title' => $name,
'weight' => $term->weight
);
#4
OK, it IS in fact working. I just had to uncheck the box "Hide Empty Terms" in the Site Configuration settings
Thanks. Good work.
#5
After patch still doesn't work with Drupal 6.2.
Tested with taxonomy_menu 1.0 and 1.x-dev and menu tree isn't created at all. Only one item.
#6
Yes, adding
'access arguments' => array('access content'),solved the problem for me.Before I did that, I could only see the vocabulary title in the menu and no categories or subcategories.
However, until I found this Issue-page I spent many hours wondering what is going on. I am new to Drupal and my initial conclusion was that the taxonomy_menu module is basically rubbish. I only kept trying because several forum posts were saying good things about it. Now, since the issue is solved for me, I have changed my view and like the module, but I think that the maintainers should urgently release a new version incorporating the fix for this issue to save people like me many hours of frustration.
Btw, here is another really useful feature that could be added:
It would be great if one could insert not the root of a vocabulary into a menu, but any taxonomy term which would then expand to its child terms. This way it would be possible to create a menu on a sub-branch of a taxonomy. If there is already a way to achieve this somehow, I would be really grateful for an advice.
Cheers guys!
#7
Has this fix been checked into source?
#8
This almost worked for me. I could access paths of the form:
category/1
category/2
but was denied access to subpaths of the form
category/1/2
category/1/2/1
etc
This patch, against the dev version from april 15 should fix that.
#9
Thanks!
Only tried with simple paths (no subs) but the patch seems to work perfect!
Just had to edit a term to reset the cache.
Thanks!
Mark
#10
it works as described.
#11
Gah! I wish I'd had a look at this thread before I tried to go in there and figure out a solution myself.
I've managed to do something 'wrong' and now all I get is "Page Not Found" on every single page - even with attempts to access by direct URL. I've tried clearing all the cache tables, and I've also moved the module out of the drupal directory so it can't run, but still no joy.
I've obviously stuffed something up in the database. Can anyone give me a pointer as to what I can change that might give me access again?
Otherwise I'm going to have to ditch my database and start again.
Thanks
Andy
#12
Hah! Don't worry, I fixed it.
I just forced a complete menu rebuild by going into the menu_execute_active_handler() function inside /includes/menu.inc and forcing it to call menu_rebuild(). That seemed to do the trick.
Andy
#13
It works. Can someone please apply it.
#14
With the patch listed in #13:
Menus works correctly so that terms are now listed under appropriate vocabulary menus.
Breadcrumbs still show Array > Array instead of the vocabulary terms.
The following check-boxes respond as follows:
Display number of nodes per term: This works correctly
Hide Empty terms: hides all terms
Display descendants: does nothing?
-thanks
#15
Great, just got on to this module and stoked it does (mostly) what I want.
Note the patch listed in #8 (not #13) is more complete, as it displays any sub terms.
In addition to the above comments for breadcrumb and check box....
... adding a new term does not seem to appear in the menu. A subsequent add will then show the previous term added in the menu but not the latest! Can work around by doing an edit/save on an existing item to bring up the most recent term added.
btw what is the "Module page" text box for?
#16
Got this working after a fair bit of fiddling. Just to reiterate that the patch in #8 solved my problem of not displaying sub-terms, the patch in #13 did not.
#17
with patch #8 on 6x.1.0, D6.2 and several levels in my vocabularies :
- sub-menus aren't displayed if "Hide Empty Terms" is checked (I haven't any nodes tagged with terms at first level)
- nb of nodes displayed is the total nb of nodes concerned, not just the ones I've access (this pb seems to be in taxonomy_term_count_nodes($tid), in taxonomy module). It's probably because I'm using the module "Node Privacy By Role" to limit access on some nodetype, depending on role.
With 6x.1.0-dev (2008, april 15th), first pb is solved.
#18
Hi all,
I downloaded the lasted drupal 6.2 version and th lasted taxonomy menu, and it don't work. I'm new in drupal and i made the test with D5 without problem in 5 minutes.... I lost a lot of time with this problem. So i don't understand why we can download this module without advertising...
i still can't see :" Display descendants " and Display descendants,
Florent
#19
Just a quick note about the above comments:
This module will allow you to see submenus IF you supply a valid node URL in the "Module Page" and then click the visible "Vocabulary" name from the Navigation menu. Otherwise you'll need to use DHTML Menu to expand sub-items. This takes you to the "Module Page" and expands all sub items.
#20
Hi, I tried 6x.1.0-dev (2008, april 15th) + Patch from #8 on a Drupal 6.3 installation and the system is hanging when trying to enable the module. Anyone is having this same situation?
I get the error below after enabling the module and also when trying to access the administer page after that just a blank screen.
I am running this Drupal 6.3 on a default windows WAMP installation, if that helps any. I'm fairly new to Drupal so please excuse me if this is already fixed somewhere else.
---------------
diff -urp taxonomy_menu/taxonomy_menu.inc taxonomy_menu.new/taxonomy_menu.inc --- taxonomy_menu/taxonomy_menu.inc 2008-01-31 08:51:55.000000000 -0800 +++ taxonomy_menu.new/taxonomy_menu.inc 2008-05-16 17:29:21.000000000 -0700 @@ -187,6 +187,9 @@ function _taxonomy_menu_menu() { $name .= ' ('. $num .')'; } $items[$path] = array( + 'access arguments' => array('access content'), + 'file' => 'taxonomy_menu.inc', + 'page callback' => '_taxonomy_menu_page', 'description' => t($term->description), 'title' => $name, 'weight' => $term->weight
Fatal error: Call to undefined function _taxonomy_menu_menu() in C:\wamp\www\pgs\modules\taxonomy_menu\taxonomy_menu.module on line 23
#21
Hi EugeneX15
works fine, many thX
TSE
#22
I am also using 6.3. I got the menus to cascade all right (thanks to tips above), but when I click on a link it can never find content. It appears that the problem is rooted in the fact that it seems to want to add an extra step in the URL.
For example, I have my Module URL set to taxonomy/term . When I click on Term Entertainment (which should be url http://127.0.0.1/drupel/?q=taxonomy/term/6), the Taxonomy menu piece seems to want to insert a /1/ before the /6 (ie, http://127.0.0.1/drupel/?q=taxonomy/term/1/6).
Any ideas would be helpful!
#23
Never mind -- my Module URL should have been sent simply to "taxonomy" -- it is working now.
#24
The patch in #13 is OK.
#25
Committed. Thank you professorbikeybike.
#26
Automatically closed -- issue fixed for two weeks with no activity.