I'm running Drupal on a shared server (hostgator), using only core 6.0 Beta modules, PHP 5.2.2, you can view installation at: http://site2.buildering.net

Problem:

- In the default navigation menu, I have:

--Doggies <---This is a link to a "taxonomy/term/2"... all Doggie nodes
-----Poodle <--- Doggie node....URL aliased FYI
-----Great Dane <--- Doggie node....URL aliased FYI

When clicking on Doggies, the menu doesn't expand to show the sub-items listed under it. If I click on one of the term results listed on the main page, then the navigation menu is expanded to show the items.

I've searched the forums, and seen the related problem from drupal 5.x. I believe this differs because:

- I only have the problem is Doggies is a taxonomy/term/#. If Doggies is a page or story, there is no problem.
- I'm using all relative URLS.
- I don't have any URL pointing in more than one place in the menus.

Comments

ardarvin’s picture

Version: 6.0-beta1 » 6.0-beta2

Anyone? I've upgraded to 6.0 Beta 2, still same problem. Does nobody else see this problem...I'd think it would be common for people using taxonomies in their menu systems.

catch’s picture

Version: 6.0-beta2 » 6.x-dev
Status: Active » Postponed (maintainer needs more info)

What happens if you link to the aliased url?

ardarvin’s picture

I'm not sure I understand your question...if I link to the aliased URL, the link works and goes to that aliased node.

I thought perhaps aliasing was somehow getting in the way, so I got rid of all aliasing and the problem still persists.

ardarvin’s picture

Version: 6.x-dev » 6.0-beta2
Status: Postponed (maintainer needs more info) » Active

Could somebody please tell me whether they see this behavior or not?

john morahan’s picture

Title: taxonomy/term/# in menu, but when clicking on menu, doesn't expand to show sub-menu nodes. » Menu tree does not expand when active item is a taxonomy term
Version: 6.0-beta2 » 6.x-dev

Yes, I am seeing this too. Installed a fresh D6 from CVS, created a node and a taxonomy term, created a menu item pointing to the term, and created a second menu item pointing to the node, with the previous menu item as its parent. Clicked on the node link and the menu was expanded correctly; clicked on the term link and it was not.

john morahan’s picture

Also, if you have the node as the parent and the taxonomy term as the child, the menu still does not expand on the term page.

john morahan’s picture

Status: Active » Needs review
StatusFileSize
new1.39 KB

I think it's confusing the taxonomy/term/# pages with local tasks. I am not at all sure that I am understanding this correctly. But here is a patch that seems to fix the problem for me.

Anonymous’s picture

What happens if you link to the aliased url?

Same problem here with a current dev install. Additionally, I cannot use the alias instead of the taxonomy term:
The path '[alias]' is either invalid or you do not have access to it.

I cannot use any aliases at all into menus (navigation, primary links, and secondary links).

ardarvin’s picture

Version: 6.x-dev » 6.0-beta3

The bug is still there in Beta3. After reading the "6.0 will be released when all critical bugs are resolved" statement by Drupal, I'm tempted to elevate the Priority of this bug...although since I'm new here, I'm not sure what constitutes "critical".

Does it count that it is supremely annoying?

chx’s picture

Status: Needs review » Needs work

There is another issue, the menu system should not allow entering aliased links. Nor should the update allow them. I will work on this a bit, please do not commit. And yet, review, whether it solves the problem if you are notusing aliases as you should not.

chx’s picture

Status: Needs work » Needs review
pwolanin’s picture

subscribe

pwolanin’s picture

StatusFileSize
new767 bytes

ok - I can reproduce this- and there are a couple ways to approach it.

Attached patch works (be sure to delete existing links before applying the patch and visiting admin/build/modules since the router path is changing). However, this solves it only for this case for taxonomy, and not generally. I think this patch should be applied regardless of whether something like #7 is used, since taxonomy/term is itself never a valid path.

pwolanin’s picture

Version: 6.0-beta3 » 6.x-dev
StatusFileSize
new1.97 KB

I think code in #7 makes sense - though there could be a few unintended side-effects.

For example - if I append an extra (even meaningless) parameter to a node path: "node/3/x" then as things stand now, the menu will expand properly if there is a link "node/3". With the patch in #7, that is no longer true. However, the link is not highlighted as active in this former case, so there is already a mixed expectation here. The "active" class is set in l() based on the condition $path == $_GET['q']

Attached is a combined #7+#14 patch.

ardarvin’s picture

Priority: Normal » Critical

Still there in Beta4.

chx’s picture

Status: Needs review » Reviewed & tested by the community

It's RTBC on #14 not #15.

About #7/#15. With $router_item['href'] = implode('/', $path_map); added, if you have a router item without load functions, the href will point to whatever the user has entered. On the other hand, if there is a load function then the only thing that matters is the router item. While #14 is nice and OK I would like to see lot more explanation from jmorahan or pwolanin or anyone about the possible consequences here -- I will also think about it but I am not convinced we want this change so late.

Also note that meanwhile we got

  $item = &$form_state['values']['menu'];
  $normal_path = drupal_get_normal_path($item['link_path']);
  if ($item['link_path'] != $normal_path) {
    drupal_set_message(t('The menu system stores system paths only, but will use the URL alias for display. %link_path has been stored as %normal_path', array('%link_path' => $item['link_path'], '%normal_path' => $normal_path)));
    $item['link_path'] = $normal_path;
  }

so the aliasing is covered.

gábor hojtsy’s picture

Priority: Critical » Normal
Status: Reviewed & tested by the community » Needs review

#14 seems to be simple and correct for the case in hand, so committed!

Demoting to normal and for review for the other more generic modifications, leaving room to discuss them.

moshe weitzman’s picture

Status: Needs review » Active

no patch here

pwolanin’s picture

Version: 6.x-dev » 7.x-dev

any more substantial changes are not for 6.x

ardarvin’s picture

Version: 7.x-dev » 6.x-dev
Status: Active » Fixed

It's now working in 6.0, so somebody somehow must've fixed it.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

lslinnet’s picture

Version: 6.x-dev » 6.2
Priority: Normal » Critical
Status: Closed (fixed) » Active

Just experienced this on a project I am working on.

Is running the lates 6.x with the following modules installed:
CCK (+links), Conditions, Aggregator, Comment, Contact, Content translation, Database logging, Forum, Help, Locale, Menu, Path, PHP Filter, Ping, Poll, Search, Statistics, Syslog, Taxonomy, Tracker, Trigger, Update Status, Upload, Devel, Advanced Help, Pathauto, TinyMCE, Token, Token Actions, Activemenu, Collapsiblock, Javascript tools, Tabs, Views, Fivestar, Voting API

that should be all of them.

The error still happens when I try to link to the super taxonomy term and then have a "submenu" branch of it's sub terms.

catch’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

lslinnet - could you confirm whether you still get the error with all contributed modules disabled?

catch’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Marking this back to closed - looks like any remaining issues may be dealt with at: http://drupal.org/node/251868