Can't see admin page
spopovits - August 6, 2008 - 16:50
| Project: | Login Destination |
| Version: | 6.x-2.1 |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | critical |
| Assigned: | raymo |
| Status: | patch (reviewed & tested by the community) |
Description
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.

#1
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
#2
Did you try to clear your cache?
#3
After enablling the module try to click Ctrl+F5 (FF, IE).
#4
Everything works fine, I've just checked.
Changing it to won't fix untill the detailed bug scenario is provided.
#5
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.
#6
What other information do we need to evaluate/provide to demonstrate that the administration of the module does not show up.?
#7
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"...
#8
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.
<?php
// 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_destinationurl 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
#9
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
#10
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?
#11
This worked perfectly!
Thanks for tracking this down.
-Evan
#12
copy that!
#13
Thank you for the code...it worked like a charm!
#14
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!
#15
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.
#16
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
#17
the admin page disappeared when I upgraded drupal to v6.4 - this fixes it (thanks!)
#18
a+
#19
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.
#20
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:
#21
Restoring issue title.
#22
unofficial is working for me on drupal 6.4. Thanks!
#23
Unofficial working for me in 6.3!
#24
This worked well for me too!
Josh
#25
doesn't work for me at all
still having the same problem (drupal 6.4) there is no link with user_destination
#26
(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?
#27
No it works for me after
doning upgrade.php.
Maybe it helps you too.
markus
#28
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.
#29
Applying the fix from #28 has resolved this for me. Would be good to get it updated in the release.
#30
The fix from #28 worked for me. Is there any reason this is taking so long to get committed?
#31
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!
#32
See #16, ARDAS is the module owner and is having issues committing the code.
#33
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.
#34
Can't get fix to work with D6.6. Subscribing...
#35
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.
#36
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
#37
@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.
#38
Now it works, must have forgotten this step last time! Thanks.
#39
@perandre, can you let us know what you did? maybe it might help me.
#40
@the1who, I uninstalled (and deleted) the module, added the line mentioned in #28 and installed again. Worked for me on D6.6.
#41
@perandre, ok, thank you very much or that information. I will give the steps you mentioned a try tonight. Thanks.
Matthew
#42
@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
#43
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.
#44
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.