Child items not selected if path is alias
baalwww - December 3, 2008 - 16:02
| Project: | Imagemenu |
| Version: | 6.x-1.0 |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I have a menu with a menu item Management Consulting. The path for this item is Management-Consulting. The item has children, but does not expand when clicked.
If I change the path to ManagementConsulting (no hypen), it does expand when clicked.
I put a print in the code, and see that in one case $_GET['q'] contains the path, and in the other it contains the node (eg node/24). I don't know why.

#1
Additional info: this problem only seems to happen in conjunction with Paths being used.
#2
What I had thought was the problem originally was not. I was getting retrieval on the children of some items but not others. It turns out, for example, that I had a page with an alias of 'Consulting' with two children. The children would not appear. I did some displaying inside the module to find the problem.
The module retrieves the children based on the url query string = the path in the parent entry. The problem was that the query string was coming back "node/111" even though the node has an alias, so the db select was coming back empty.
I've fixed it in my copy temporarily by doing the drupal call to retrieve the path's alias. If there is an alias, I have the select statement retrieve based on path = '%s' OR path = '%s' ($path,$alias) and it works fine. This needs to be incorporated into the code.
#3