0

Links on tabs turned into /user/%/edit, /user/%/contact, node/%/edit, admin/structure/types/%/fields, etc. Also, the links on Administration Menu module have the same issue.

Here's what I did so far.

  1. I've cleared all cache via Admin Menu -> Flush all cache, via Development -> Performance and via emptying MySQL cache_* tables. Didn't solve.

  2. I noticed that tabs are themed by the menu_local_tasks() function. I traced the function to includes/menu.inc, where I found the following snippet, which makes me think it might be related to this function.

 

* For example, the ancestors of node/12345/edit are:
 * - node/12345/edit
 * - node/12345/%
 * - node/%/edit
 * - node/%/%
 * - node/12345
 * - node/%
 * - node

UPDATE: Where is '%', of the above URLs, being populated? I want to be able to trace it.

6
  • and what happens when you click on node/%/edit ? These are menu router items which i believe you already know.
    – AKS
    Oct 3 '12 at 20:28
  • It shows that the page could not be found. I have no clue what menu router items are. Oct 3 '12 at 20:36
  • Where does '%' get populated? Oct 3 '12 at 20:41
  • menu router is an entry to register a particular path. node module registers node/%/edit, node/%/revisions, node/%, etc paths so it can use arguments in place of "%" sign. By default, when you see a menu, you should not see the "%" sign. Instead, these paths should be actual paths with value replaced.
    – AKS
    Oct 3 '12 at 20:50
  • You should read about wildcard in menu system. api.drupal.org/api/drupal/modules!system!system.api.php/… . So in case of node/%/edit the % can be replaced by an integer and that integer can be passed as argument to the page callback or access callback. You can also have wildcard autoloaders like node/%node/edit now in this case %node will pass that value to node_load function. Read the hook_menu function for more information. Also refer to drupal.org/node/102338 for more examples.
    – junedkazi
    Oct 3 '12 at 23:10
0

Line 775 of /include/menu.inc was commented out.

4
  • 1
    good that you found the solution. Hence it is said NEVER HACK DRUPAL CORE ;-) I think that may be the reason that you also got a downvote for the question.
    – AjitS
    Oct 4 '12 at 8:21
  • nope, I never hack core. It must of been those rare accidents Oct 4 '12 at 8:26
  • 1
    ...now that I'm thinking, I should of phrase the q'n to ask what was causing the issue, not why it happened. Oh well, better answer some questions to make up for the negative reputation! Oct 4 '12 at 8:27
  • 2
    well you could try if that helps, and yes you're always welcome to share your knowledge here :-) Drupal community always appreciates it :-)
    – AjitS
    Oct 4 '12 at 8:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.