Installed version 6.2.1 on Drupal 6.3 and cannot see or access admin page. I tried typing in the url listed on readme and got an access denied. The module worked and the users were redirected the users page but I cannot admin the functionality. I have disabled the module until I can solve this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

BluesmanEP’s picture

I am having the same problem. I upgraded from version 6.x-2.0 (which was working properly) and now can't access the admin page from the menu, or the URL.

Thanks,

Evan

ardas’s picture

Did you try to clear your cache?

ardas’s picture

After enablling the module try to click Ctrl+F5 (FF, IE).

ardas’s picture

Status: Active » Closed (won't fix)

Everything works fine, I've just checked.
Changing it to won't fix untill the detailed bug scenario is provided.

spopovits’s picture

I tried the ctl F5 and still nothing happens differently. The module is active and after log in user is taken to site/user page which I am assuming is the default.
I cannot administrate this function . The site is www.mistakehawk.com if you wish to see it. Also I have logintobogen and front_page modules installed, if that gives you more information.

spopovits’s picture

Status: Closed (won't fix) » Active

What other information do we need to evaluate/provide to demonstrate that the administration of the module does not show up.?

apollonet’s picture

Same problem here.
I just installed the module and i can't find the admin page.
I went on /admin/user/login_destination and i tolds me 'access forbidden"...

Lappie’s picture

Same problem as #7 and original author.

I've diffed the earlier version 2.0 that was mentioned to work and the latest and noticed that the following piece of code was missing in the newer version.

// Permissions
define('LOGIN_DEST_PERM_ADMIN', 'administer login destination');

/**
* Implementation of hook_perm().
*/
function login_destination_perm() {
  return array(LOGIN_DEST_PERM_ADMIN);
}

Adding this to the newer version did pop up the permission in the permissions dialog of Drupal, but then still no luck regarding the admin page of the login destination module. The admin/user/login_destination url now gives just the user mgmt page instead of 403.

So apparently there have been (unintentional) code deletions going from 2.0 to 2.1

Wutimer’s picture

Having the same issue; the admin menu item and settings page do not exist.

Running node_privacy_by_role if that has anything to do with "access denied" when trying to navigate directly to /admin/user/login_destination

dmendez’s picture

I had the same issue and it seems to be related to the issue this person had: http://drupal.org/node/274869

Apparently the Drupal menu system in later versions of Drupal 6 now requires that all menu items have access control. The main menu item for login destination did not have any access control, therefore it does not display.

Here is the fix that worked for me.
1) Add this code to login_destination.module after the variable definitions near the beginning of the file. This defines a new permission.

/**
* Implementation of hook_perm().
*/
function login_destination_perm() {
  return array('administer login destination');
}

2) Change this:

$items['admin/user/login_destination'] = array(
    'title' => 'Login destination',
    'description' => 'Configure where user will go after login.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('login_destination_admin_settings'),
  );

to this (this checks for the above permission before displaying a link to or allowing access to this admin page):

$items['admin/user/login_destination'] = array(
    'title' => 'Login destination',
    'description' => 'Configure where user will go after login.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('login_destination_admin_settings'),
    'access callback' => 'user_access',
    'access arguments' => array('administer login destination'),
  );

3) Disable, then re-enable the module.
4) Add the new permission 'administer login destination' to your role.

Now you should be able to access the administration page. I would have created a .patch file for this, but I have never done so and have no clue as to where to begin. Could this be added to the main project?

BluesmanEP’s picture

This worked perfectly!
Thanks for tracking this down.
-Evan

Lappie’s picture

copy that!

spopovits’s picture

Thank you for the code...it worked like a charm!

spopovits’s picture

My issue is resolved. I am not sure who should close this or how the patch gets created either , so I will defer to the drupal gurus to do what they will with this particular issue.
Again thank you drupal community!

ardas’s picture

Damn! I don't know why but old source code get into DRUPAL--6-2-1 tag.
I'm now creating DRUPAL--6-2-2 trying to solve this issue.

ardas’s picture

FileSize
2.07 KB

I am having strange issues with CSV.
I'm updating DRUPAL--6-2-2, than changing code and then trying to commit to this tag. and I'm receiving this error:

cvs commit: sticky tag `DRUPAL-6--2-2' for file `login_destination.info' is not a branch
cvs [commit aborted]: correct above errors first!

Does anybody know how to solve this?

I'm attaching the latest source code to this comment

Matt B’s picture

the admin page disappeared when I upgraded drupal to v6.4 - this fixes it (thanks!)

motto’s picture

a+

Francewhoa’s picture

FileSize
10.28 KB

Subscribing. Same thing here with Drupal 6.4 & module version 6.x-2.1 (2008-Aug-04)

'Access Denied' when visiting http://mywebsite.com/admin/user/login_destination

Screenshot attached.

Francewhoa’s picture

Title: Can't see admin page » Fixed module attached
Assigned: raymo » Unassigned
Priority: Critical » Normal
FileSize
33 KB

I have attached the fixed module below. This is unofficial fix of version 6.x-2.1 (2008-Aug-04). Thanks to dmendez for the code.

Works for me with Drupal 6.4:

  1. Disable current module.
  2. Download and install this fix module.
  3. Re-enable module.
  4. Go to www.yourwebsite.com/upgrade.php and follow instructions on screen.
  5. Visit Admin Page at: Administer > User management > Login destination
Francewhoa’s picture

Restoring issue title.

jefbak2’s picture

unofficial is working for me on drupal 6.4. Thanks!

Rob T’s picture

Unofficial working for me in 6.3!

joshmiller’s picture

This worked well for me too!

Josh

wallbay1’s picture

Priority: Normal » Critical

doesn't work for me at all
still having the same problem (drupal 6.4) there is no link with user_destination

raymo’s picture

Assigned: Unassigned » raymo

(Drupal 6.4) Unofficial not working for me. There is no link to login settings on admin page and when I try to go to the user/login_destiniation, access is denied. Any ideas?

mk1000’s picture

No it works for me after
doning upgrade.php.

Maybe it helps you too.
markus

marcp’s picture

Title: Fixed module attached » Can't see admin page
Assigned: Unassigned » raymo
Priority: Normal » Critical
Status: Active » Needs review

The issue is that, from Drupal 6.2 and on, every menu item must be correctly secured by access control as per http://drupal.org/node/109157

What's required is to add one line to login_destination_menu() in login_destination.module. Right after the line that says:

    'page arguments' => array('login_destination_admin_settings'),

add:

   'access arguments' => array('administer users'),

After doing this, you'll need to disable and re-enable the login_destination module in order for the menu cache to be rebuilt.

It looks, from the comments above, that there used to be a separate permission for securing this menu item. Since that permission was removed, it seems like the module author would like to allow any user who can "administer users" to also administer login destinations.

I started with the Acquia-approved Drupal 6.4 installation, so login_destination is unusable right now on new versions of Drupal 6.x.

paulnem’s picture

Applying the fix from #28 has resolved this for me. Would be good to get it updated in the release.

andrewfn’s picture

The fix from #28 worked for me. Is there any reason this is taking so long to get committed?

Michael Phipps’s picture

Since no-one has actually provided an actual patch file (there's been code submitted, but not in the format of a patch), I thought I'd throw one together based on the code from #10 which works quite well.

I hope this can get us closer to having this issue resolved!

paulnem’s picture

See #16, ARDAS is the module owner and is having issues committing the code.

the1who’s picture

I have followed what you have said in #26, but maybe I need to read further into the access permission node posted below with the changes for the latest at least, 6.6 that I am running.

I get the following errors:
* warning: Missing argument 1 for drupal_get_form() in /home/user/public_html/includes/form.inc on line 69.
* warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '' was given in /home/user/public_html/includes/form.inc on line 366.

If someone could guide me a bit further that would be greatly appreciated. This isn't the site in my profile, the site is here:
www.bsarc.us

Thanks for your time and in advance, your help.

perandre’s picture

Can't get fix to work with D6.6. Subscribing...

marcp’s picture

Regardless of whether you choose the patch in #31 or the fix in #28, you will need to clear your cache_menu table. The easiest way to do this is to disable and re-enable the login_destination module.

the1who’s picture

I have done that, even going to the /admin/build/menu directory and editing that, which according to all the other documentation, clears it as well as the option of enabling and disabling. I still get the error you know.

Matthew

marcp’s picture

@the1who - there's nothing specific in the error messages that you posted to say that it's LoginDestination that's the problem for you. Try starting over with a fresh 6.6 installation and just install LoginDestination and the patch in either #28 or #31. It should work. Then you can backtrack and see what's different between the fresh installation and your site that is having problems.

perandre’s picture

Now it works, must have forgotten this step last time! Thanks.

the1who’s picture

@perandre, can you let us know what you did? maybe it might help me.

perandre’s picture

@the1who, I uninstalled (and deleted) the module, added the line mentioned in #28 and installed again. Worked for me on D6.6.

the1who’s picture

@perandre, ok, thank you very much or that information. I will give the steps you mentioned a try tonight. Thanks.

Matthew

the1who’s picture

@perandre, One night delayed, but I have done what you have mentioned and I have fixed my error in applying the modification to the module. I had some how, taken what is mentioned in the access line to add, to overwriting the page_argument line instead. I wish I would have noticed that sooner, and that is what created the errors on my end I am sure of. Thanks for time and advice.

Matthew

edit, with latest releases tonight:

D6.6
LD 6.x-2.1 2008-Aug-04
Modifying module with #28

paulnem’s picture

Status: Needs review » Reviewed & tested by the community

I think we've all tested this enough, it works. When will it be added to dev because more and more people will find the problem as they start upgrading or using it.

marcp’s picture

I've requested co-maintainer status here: #332164: I volunteer to co-maintain LoginDestination

I don't think this project has been abandoned, but if it has, then we should wait 2 weeks before requesting that someone else be given ownership -- http://drupal.org/node/251466 -- anyone else want to take over ownership of this or request co-maintainership? I've got my plate full already.

BorisBarowski’s picture

using drupal 6.6, the fix in #28 works (as was established, but extra confirmation is always nice)
Sorry, i'm to inexperienced to be given maintainer status

marcp’s picture

Thanks for the extra confirmation -- it is definitely helpful.

I moved the request for co-maintainership over to the Webmaster queue. Hopefully we'll be able to get a release out soon. I'm going to put in the fix from #28 because I don't think we need a separate permission for this. My only real question would be -- should we use 'administer users' or 'administer site configuration' for the access check?

BorisBarowski’s picture

I vote for administer site configuration.

I think of this module as more than just user management, but adding site specific functionality

marcp’s picture

Agreed that we should go with 'administer site configuration' for this.

cgjohnson’s picture

I am using the latest version of login destination and D6.6 and I can't see the admin settings either -- I can't even see the module in the list when I run update.php (it is there, enabled, on the module page). Any updates on this problem? Seems to be the same bug. thanks.

*Update: When I add the fix in #28, it works -- but I'm confused about why that's not already integrated in this latest version. To add the fix, I removed a line that said:
'access arguments' => array(LOGIN_DEST_PERM_ADMIN),

Will what I've cause any problems? thanks in advance for your help.

marcp’s picture

I suspect the line that you removed was a line that you added at an earlier time. If you just start with the 6.x-2.1 version of the code and make that one line addition then you should be fine.

The maintainers have yet to put out a new release for this module that fixes the bug. I have requested co-maintainership so we can get a working release out the door. The issue is on the webmasters queue now: #332164: I volunteer to co-maintain LoginDestination. I don't think it would hurt for you to reply to that thread to nudge the webmasters.

geodaniel’s picture

Subscribing

It'd be good to get the latest release of the module working, and if ARDAS is having issues committing, perhaps he can let marcp in to make these minor adjustments to get the module to work?

marcp’s picture

I just noticed that there is a new release of this module.

I haven't tried it out yet, but I suspect the issue is fixed. Looking at the diff, you'll need to assign users 'administer login destination' rights in order for them to be able to administer login destination.

prodosh’s picture

I had the unofficial patch working until I recently upgraded to the latest version of the module. Now it doesn't redirect as defined in the login_destination admin screen. No matter what one specifies one always ends up on the http://example.com/user page.

the1who’s picture

Yeah, I haven't gone into the code much further, but I am getting the same issue. The admin pages are showing to show that i have the settings in there for the redirection, but it only goes to user page. You're not alone pban02. I'll try looking at my own side of the code a bit more when I can possibly tomorrow.

Matt

webengr’s picture

jan 12, 2009,

using either the stable 5.x-1.1 or the dev, 2008-Dec-012008-Dec-01
I also am not able to see admin page with Drupal 5.12

I updated to 5.14, no change. This may be a new thread under drupal 5 for project...

Alright this is weird,,,,

I uninstalled, used the earlier version, 5.x-1.0 that seems to work, then updated to 5.x-1.1, now I see it in the menu.... I don't know maybe I goofed and just thought I saw the error... I'll leave this post here in case someone else sees it.

Francewhoa’s picture

@ardas (Module maintainer): Following up on your comment: http://drupal.org/comment/reply/292006/970509#comment-970509

The "Login Destination" module version 6.x-2.x needs critical update. Have you figure out how to commit your patch with CSV? Did someone get back to you?

Another patch here. Might work: http://drupal.org/node/341683#comment-1501838

@all: I sent an email to ardas (Module maintainer) on June 17, 2009 asking him to reply in this issue.

mhartman2009’s picture

Assigned: raymo » mhartman2009
Category: bug » support
Status: Reviewed & tested by the community » Active
mhartman2009’s picture

Status: Active » Closed (fixed)
Anusha Isaacraj’s picture

Thanks a million dmendez for the code... !
Works Perfectly :-)