Hi, I spent a hour trying to figure out why going to the Permission Page breaks control of menu navigation. Starting from a fresh install from a backup this only happens when I enable this mod. I did is several times and was always able to produce the problem.

Using Admen Menu or Default Menu (Using Rubik Theme):
1) Enable Mod
A: 1) Naviage to People, 2) Permissions, results: nothing, after this I can't navigate to any other page.
B: 2) Navigate to People|Permissions, results: same as above.

Note: if I refresh the page on Permission, I lose the overlay and I just have the dark fade with the site webpage. If I go to another page menu nothing happens, but when I refresh that page, the overlay appears as normal.

You can do this in any combination after going to the Permission page and after that the navigation is broken. I can attache a zip database and site/all folder if you want?

Comments

Vc Developer’s picture

P.S. It was working before last month when I first installed it, so your changes may have effected it or maybe another mod I installed. So let me know if you want the zip files. I disabled it and everything is working normal.

cyu’s picture

I'll try an install from scratch with the modules/theme you mentioned and see if I can replicate behavior. If I cannot, I'll need something more to go on.

Very strange behavior, though, not sure how this module would cause that.

jurgenhaas’s picture

I do have the very same behaviour on a basic installation. When I look into the firebug console I can see that the call to http://www.example.com/admin/people/permissions?render=overlay doesn't return anything and hence the following JavaScript fails in line 267 of overlay-parent.js which is just because the resulting iframe is being empty.

Is it possible that this module has a problem if ?render=overlay is provided as part of the URL?

jurgenhaas’s picture

Actually, I dived a bit deeper and it is in fact the reason that the URL comes with an extra component after the URL. Beginning at line 162 of filter_perms.module you're doing this:

  if ($url_last != 'permissions') {
    drupal_goto('admin/people/permissions');
  }

which sends the request into an infinite loop as the $url_last is 'permissions?render=overlay' and that comes back to this function over and over again until the web server denies the recall.

I suggest to rewrite line 162 in the following way:

if ($url_last != 'permissions' && (strpos($url_last, 'permissions?') === FALSE)) {

I've testetd it and that works fine here.

cyu’s picture

Status: Active » Fixed

Thanks jurgenhaas. I've committed your suggestion. http://drupalcode.org/project/filter_perms.git/blobdiff/6f9058a7a4b2c0df...

Vc Developer’s picture

@jurgenhaas Thanks! working now....

Status: Fixed » Closed (fixed)

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