Path is already used by a menu link.
sifaan - October 16, 2008 - 11:15
| Project: | Vocabulary Index |
| Version: | 6.x-2.1 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | won't fix |
Jump to:
Description
I was using VI 6.x-1.2 and had set up a few pages (e.g. sitename/internal, sitename/models) and menu links to them from the navigation menu.
I disabled, uninstalled, and then deleted 6.x-1.2 and installed VI 6.x-2.0-rc1
I tried to set up the same pages again, but get the error "Path is already used by a menu link."
Unfortunately the menu itself doesn't show this link anymore for me to delete it.
Currently I've worked around this by setting up pages like sitename/internal-2, which allows me to access the page that I want, but with a ugly '-2' in the URL.
How can I clean up the menu entries??
Thanks
/Sifaan

#1
PS forgot to mention that I read about a similar issue (http://drupal.org/node/283948) and since then upgraded to 2.x-dev hoping that it would solve the problem, but no luck yet
#2
hmm... used phpmyadmin and found the relevant lines in menu_links table and deleted them. this allowed vocabindex to use the links that I wanted.
So I guess the problem is solved (unless I find that I've screwed my entire site from this modification!)
#3
I am experiencing the same issue: after an update to 6.x-2.0 several menu items were gone in some custom blocks. This has happened also in previous VI versions and in the past could be easily restored by adding the menu items again (I mean menu items that link to an index page for a certain vocabulary).
However, when I try to add a menu item now and enter the correct path for a certain vocabulary I get a message saying that "The path is either invalid or you do not have access to it". Well, the path is certainly valid and when I enter it in the VI settings I also get a "Path is already used by a menu link" notice.
Any solution to get back access to the paths from within Drupal? Or can it only be restored with the previous solution?
Gerben
#4
Due to a bug in the Drupal menu system menu items aren't automatically removed when they're not needed anymore. They are still in the database and therefore prevent other menu items from using the same path, but they simply don't work anymore. This is the third time this issue pops up and I was sure I had this fixed long ago. Turns out I was wrong.
The only working solution so far is manually removing the old links from the {menu_links} table.
#5
Ok so I check the table.
To be clear I see two issues here:
1) updating Vocabindex causes menu items linked to vocabularies to disappear in custom blocks instead of keeping them
2) after this happens the paths to these disappeared items remain in the db table
1) happened to me before, 2) is however new. Could you specify which issue you thought you had fixed and include some info on the whole thing in the VI documentation? Just so people know what might happen when they update VI and prevent unexpected surprises.
Thanks,
Gerben
#6
This surprise shouldn't be there at all. As soon as I have some time this weekend (hopefully saturday, probably sunday), I will look into this.
2 isn't new, at least not for me. As mentioned before it's a bug in the menu system and vocabindex probably doesn't clean up Drupal's mess as well as I thought.
#7
Hi, thanks again.
The only weird thing that I wonder about: previously I did not have the problem with the paths.. Menu items disappeared but I could add them again. Could it be that you fixed this but the latest Drupal update messed it up again? Just guessing here of course..
#8
That's possible of course. I'm afraid I can only tell you something went wrong, but not what exactly went wrong.
#9
I tried reproducing the problem by installing the latest dev version, creating a VI, disabling the module and enabling it again, but it worked fine. Upgrading from 6.x-1.x-dev to 6.x-2.x-dev went without problems too.
Please provide step by step instructions on how to reproduce the problem using a clean Drupal installation and the latest dev version if you are still experiencing the problem.
#10
At the moment the problem is fixed and I don't have time to see if I can reproduce on a clean installation.
Next time I update I will make sure I note the steps in case I run into problems.
Best,
Gerben
#11
#12
Just to provide this information (hope it belongs here):
rc3 solved the issue where I had to recreate the custom menus I use on my site each time after updating VI.
Gerben
#13
RC3 doesn't have any changes in the menu system. This bug has been fixed a long time ago already, but when traces of this bug still exist (which is possible) you will have to delete the links from your database manually. I believe running update.php will do this for you automatically if you upgrade from Vocabulary Index 1.
#14
I see. In that case it was deleting the links from the db some time ago (to solve the used paths issue) that alread solved it.
#15
Similar trouble with Drupal 6.10 and Vocabulary Index 6.x-2.1.
1) Installed and tested VI, that was OK.
2) Created indexes for several vocabularies.
3) Edited "primary links", five menu items linked to the vocabulary pages. So far, everything worked fine.
4) Tried to edit one vocabulary index page in VI. Got "Path is already used by a menu link."
5) Tried to clear and type again the next few index pages in VI. Got the same error message.
6) Discovered that primary links all gone.
Disabled/enabled VI. No changes.
7) Removed primary links menu items in phpMyAdmin.
8) Created an index for one vocabulary.
9) Created the corresponding menu item in primary links. Everything works fine.
10) Edited 9)
11) Primary link disappeared.
12) Tried to enter the correct link to the VI index - "Path is already used by a menu link."
So, it seems to me that the module works fine with Drupal menus if I create indexes in VI and then create menus. If I try to edit a VI index the corresponding menu disappears from the GUI but data is being kept in database so I have to use phpMyadmin and start from the beginning :(
#16
Vocabulary Index should not mess with any menu items at all, except for its own (a menu item is automatically created for every index page). Also, if an index has a path and you created a menu item to that path, no error should appear when submitting the index page form. Please confirm if this happens or not.
Also, clear your menu cache before doing ANY testing with menu items (visit Administer > Site building > Modules).
#17
Kick. Please provide more information.
#18
Hi Xano. I have the same problem i.e "Path is already used by a menu link" notice
when trying to create a page from vocabulary index .when I checked in the menu links table there is a node/%(link_path,router_path)for navigation with no link title. I am new to drupal and wonder what will happen if I deleted this from the database. Shall I delete this or is that dangerous?please respond.
#19
Please do not change issue settings without reason.
Do not delete anything if you don't know what will happen.
If the error message appears it is likely that a page using that particular path already exists. If it does, you should choose another path. If it doesn't please report back and provide more detailed information, without repeating what has been said earlier.
#20
Hi Xano
Sorry. I though you attach an issue by editing the issue settings. Now I know.thank you for the fast reply.
I tried to give it new page which never existed but keep on saying that Path is already used by a menu link. I can create blocks but pages refused what ever node number I gave it. It says Currently located at /node\165 on the path field. I tried putting the nodes like so i.e node/165 in the path field.
#21
That is correct, because all /node paths are forbidden. Node.module creates /node/%, which matches /node/165. This is logical, because what if you create a VI at /node/165 and later create the 165th node?
I am marking this won't fix, because the original topic starter never replied and your case is no bug.
#22
Thanks for the tip.