Paths in 'Per Role Pages' are not released upon deletion.

==== Original issue text below ====

Sorry if this is duplicate. I had not found this bug by search.

The bug is in checking availability of menu path. Look for my patch.

Index: autoassignrole-admin.inc
===================================================================
--- autoassignrole-admin.inc	(revision 14428)
+++ autoassignrole-admin.inc	(working copy)
@@ -295,7 +295,7 @@
             // something other than autoassign_role_path registered
             // otherwise throw an error
             $menu_item = menu_get_item($path);
-            if (!isset($menu_item['page_callback']) && $menu_item['page_callback'] != 'autoassign_role_path') {
+            if (isset($menu_item['page_callback']) && $menu_item['page_callback'] != 'autoassignrole_path') {
               form_set_error("path_$rid", '\''. check_plain($path) .'\' '. t('is already in use as a path'));
             }
           } 

P.S. Attachment is not working here.

Comments

doublejosh’s picture

I've had a tough time with the "MY-X-URL is already in use as a path" with this module. But I did just have some success by clearing my cache. Not sure if this will solve the problem entirely.

For a while I was unable to use a path I have previously used even though it was no longer used.

cyberswat’s picture

Status: Needs review » Postponed (maintainer needs more info)

I need someone else to validate this

_toch’s picture

bzzz's modification works for me.
other workarround: drop the corresponding row in menu_links

Step to reproduce bug:
1/ add a path on tab and submit
2/ change the path to be a menu and submit
3/ try to reset the path on tab and submit

chinita7’s picture

I had exactly the same problem and #buzz's could fix it. Thanks.

Michael-IDA’s picture

Version: 6.x-1.1 » 7.x-1.0
Issue summary: View changes

Same issue in 7.x

- Create Per Role Pages with path xyz
- Delete Per Role Pages with path xyz
- Try to create Per Role Pages with path xyz

Error message:

- 'xyz' is already in use as a path

Attempted fixes that did not work:

- drush cc all && drush cc all
- Changing the Menu selected.

Michael-IDA’s picture

Title: 'example-path' is already in use as a path » 'my-xyz-path' is already in use as a path
Issue summary: View changes
Michael-IDA’s picture

Status: Postponed (maintainer needs more info) » Active