Can't see admin page

spopovits - August 6, 2008 - 16:50
Project:Login Destination
Version:6.x-2.1
Component:Miscellaneous
Category:support request
Priority:critical
Assigned:mhartman2009
Status:closed
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

BluesmanEP - August 9, 2008 - 14:14

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

ardas - August 11, 2008 - 05:47

Did you try to clear your cache?

#3

ardas - August 11, 2008 - 05:51

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

#4

ardas - August 11, 2008 - 05:52
Status:active» won't fix

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

#5

spopovits - August 11, 2008 - 13:21

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

spopovits - August 11, 2008 - 19:10
Status: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.?

#7

ashmex - August 12, 2008 - 12:21

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

Lappie - August 12, 2008 - 19:26

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_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

#9

Wutime - August 13, 2008 - 11:27

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

dmendez - August 13, 2008 - 20:47

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

BluesmanEP - August 13, 2008 - 21:11

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

#12

Lappie - August 14, 2008 - 12:14

copy that!

#13

spopovits - August 15, 2008 - 22:10

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

#14

spopovits - August 15, 2008 - 22:13

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

ardas - August 19, 2008 - 13:57

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

ardas - August 19, 2008 - 14:13

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

AttachmentSize
login_destination.zip 2.07 KB

#17

Matt B - August 24, 2008 - 06:27

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

#18

motto - August 27, 2008 - 20:16

a+

#19

Onopoc - August 28, 2008 - 04:35

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.

AttachmentSize
Access_Denied_Drupal_6_4.jpg 10.28 KB

#20

Onopoc - October 9, 2008 - 22:03
Title:Can't see admin page» Fixed module attached

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
AttachmentSize
login_destination[unofficial].tar_.gz 33 KB

#21

Onopoc - August 29, 2008 - 15:30
Title:Fixed module attached» Can't see admin page

Restoring issue title.

#22

jefbak2 - August 29, 2008 - 19:32

unofficial is working for me on drupal 6.4. Thanks!

#23

Rob T - September 2, 2008 - 03:30

Unofficial working for me in 6.3!

#24

joshmiller - September 5, 2008 - 20:47

This worked well for me too!

Josh

#25

wallbay1 - October 4, 2008 - 04:29
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

#26

raymo - October 8, 2008 - 08:01
Assigned to:Anonymous» 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?

#27

mk1000 - October 8, 2008 - 11:49

No it works for me after
doning upgrade.php.

Maybe it helps you too.
markus

#28

marcp - October 17, 2008 - 22:57
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.

#29

paulnem - October 19, 2008 - 23:59

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

#30

andrewfn - October 23, 2008 - 18:25

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

#31

InternetPro - October 26, 2008 - 15:17

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!

AttachmentSize
login_destination.module.patch 1.3 KB

#32

paulnem - October 26, 2008 - 16:42

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

#33

the1who - November 1, 2008 - 22:14

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

perandre - November 3, 2008 - 16:23

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

#35

marcp - November 3, 2008 - 19:49

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

the1who - November 4, 2008 - 04:35

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

marcp - November 4, 2008 - 18:06

@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

perandre - November 5, 2008 - 13:17

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

#39

the1who - November 6, 2008 - 00:26

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

#40

perandre - November 6, 2008 - 21:42

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

#41

the1who - November 7, 2008 - 21:49

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

Matthew

#42

the1who - November 9, 2008 - 07:48

@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

paulnem - November 10, 2008 - 20:20
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.

#44

marcp - November 10, 2008 - 21:39

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.

#45

BorisBarowski - November 23, 2008 - 18:27

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

#46

marcp - November 23, 2008 - 21:24

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?

#47

BorisBarowski - November 23, 2008 - 23:27

I vote for administer site configuration.

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

#48

marcp - November 24, 2008 - 04:44

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

#49

cgjohnson - December 4, 2008 - 19:19

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.

#50

marcp - December 4, 2008 - 19:52

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.

#51

geodaniel - December 9, 2008 - 16:30

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?

#52

marcp - December 9, 2008 - 21:43

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.

#53

pban02 - December 25, 2008 - 15:09

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.

#54

the1who - January 3, 2009 - 05:31

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

#55

webengr - January 12, 2009 - 21:52

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.

#56

Onopoc - June 17, 2009 - 19:45

@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.

#57

mhartman2009 - August 1, 2009 - 08:45
Category:bug report» support request
Assigned to:raymo» mhartman2009
Status:reviewed & tested by the community» active

#58

mhartman2009 - August 1, 2009 - 08:46
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.