patch for drupal 6.x

hutch - December 29, 2007 - 19:46
Project:Login Menu
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:rwohleb
Status:closed
Description

I have attached a patch to be applied to 5.x-1.x-dev to upgrade to 6.x.
It is working on my test rig, although it does not appear in
admin/build/menu-customize/navigation ;-(

loginmenu.info will need the line

core = 6.x

added to it and the version line removed.

AttachmentSize
loginmenu.module.6.x.patch1.8 KB

#1

pictogram - February 8, 2008 - 21:37

Thanks for the patch, but I'm wondering how I could move this log in link to my secondary links. Can't see it anywhere except on the nav block!

pictogram

#2

hutch - February 8, 2008 - 23:36

Just go into admin -> menu and click on edit for login and logout and put them wherever you like, I've just tested this and it works fine.

#3

pictogram - February 9, 2008 - 01:44

oh ! I see, thanks.

Actually you have to create the log in link and then place it where you want it to be. Works great after that.

I don't know if this module is still maintained ??? but it would be nice to have this patched version (6.x) added to the download area !!! Since it won't be included in core 6, it should be available until core 7.

pictogram

#4

rwohleb - February 27, 2008 - 11:55
Version:5.x-1.x-dev» 6.x-1.x-dev
Assigned to:Anonymous» rwohleb
Status:active» patch (code needs work)

The patch has been applied and a release created. Sorry for the delay, but school is keeping me busy.

Due to the new menu system in D6, the 'Log In' menu item will not appear. This is a flaw in D6 caused by how/when it does menu item access checking. Any menu item only viewable by an anonymous user will not be displayed in the menu admin screen. A workaround is being investigated.

#5

drdrup - February 27, 2008 - 19:46

Indeed, I could not find a "login" menu item in D6; I tried to add a menu "Login", but got:

The path 'login' is either invalid or you do not have access to it.

I could do a target of "user", but then it is always visible, even when I am already logged in.

The "Logout" in the "Navigate" menu does change to "Login" when I log out. so this works fine. But I want to have this behavior in the Primary Links.

So I'll wait for your work-around.

Thanks!!

#6

drdrup - February 27, 2008 - 19:56

ahhh!

A temporary solution:

1) Add temporary permission for Anonymous user to "Administer Menu"
2) Logout
3) go to: http://site.tld/admin/build/menu
4) Add menu to Primary Links, with target to "login"
4a) Disable "Log In" in "Navigation" menu if you want.
5) Login back as admin and remove temporary permission of step 1

...and it is working great !!!

#7

hutch - March 2, 2008 - 19:18

Having spent some time messing around trying to figure out how to get loginmenu module to work, I removed it altogether and created a Login menu item pointing to path 'user/login', works fine, both in Navigation and Primary Links. When you are logged in only logout shows, when logged out only login shows.

So I have concluded that loginmenu is not required in D6

#8

rwohleb - March 2, 2008 - 23:16

Does the login menu item, that you created manually, show up in the menu editor? This is the issue that the loginmenu module is currently trying to address, unsuccessfully. If it doesn't, then loginmenu is still needed once I figure out a work around.

#9

hutch - March 3, 2008 - 00:37

The login menu item that I created manually appears in the menu editor in the normal way

The path is user/login
menu title 'Log in'
Parent Navigation
weight 10

This is Drupal 6.1

It appears directly above Logout in the menu editor, but does not appear if you are logged in.
Works in Primary Links too.

Strangely, I tried adding a URL Alias pointing to user/login to login but it refused to give me access even though I'm logged in as admin

I had a look in menu_links and menu_router tables and the entries look fine, no trace of the loginmenu_redirect that had been in there when loginmenu was enabled.

I also looked through includes/menu.inc and user.module in the hope of finding a hint as to how it makes it invisible but could not find anything. menu.inc for D6 is very different from D5 so I'm not as familiar with it but hey, it works!

HTH

#10

salvis - March 3, 2008 - 01:58

Yes, I can confirm that it works as described in #7 and #9 on a D61 site that never had loginmenu installed.

loginmenu is an absolute must-have for D5, but there's no more need for it with D6.

#11

rwohleb - March 3, 2008 - 04:28
Status:patch (code needs work)» closed

Confirmed. I'll remove the D6 build and include instructions in the module description.

#12

fonant - June 20, 2008 - 14:28

Just for anyone else hitting the problem of the "Log in" menu item not disappearing when you log in, use the path "user/login" rather than just "user" for the menu item.

 
 

Drupal is a registered trademark of Dries Buytaert.