Rename menu path 'logout' to 'user/logout' for consistency

Dave Reid - November 22, 2008 - 18:54
Project:Drupal
Version:7.x-dev
Component:user.module
Category:task
Priority:normal
Assigned:Dave Reid
Status:closed
Description

Is there a reason we don't use "user/logout" for the logout path? I couldn't find any other issues and it seems to make sense for consistency to use "user/logout" since we already have user/login, user/register, user/password.

#1

Dave Reid - November 22, 2008 - 19:01
Status:active» needs review

Patch ready for review.

AttachmentSizeStatusTest resultOperations
337820-user-logout-D7.patch4.16 KBIdlePassed: 7050 passes, 0 fails, 0 exceptionsView details

#2

Damien Tournoud - November 22, 2008 - 19:56

Makes total sense, and thanks for cleaning up tests while you were at it. Waiting for results from the test bot to RTBC.

#3

catch - November 22, 2008 - 19:59

+1 from me too.

#4

lilou - November 23, 2008 - 01:22
Category:feature request» task
Status:needs review» reviewed & tested by the community

Look good and all tests passes.

#5

chx - November 23, 2008 - 02:13

Yeah this makes sense.

#6

webchick - November 23, 2008 - 02:24
Status:reviewed & tested by the community» needs work

We'll need an update function for any manually built menus that are pointing to this URL, no?

#7

Dave Reid - November 23, 2008 - 05:18
Status:needs work» needs review

Zer we go. Tested the upgrade and it worked.

AttachmentSizeStatusTest resultOperations
337820-user-logout-D7.patch4.98 KBIdleFailed: Invalid PHP syntax.View details

#8

Dries - November 23, 2008 - 16:53

There should also be an update path for the logout change, not?

#9

Dave Reid - November 23, 2008 - 17:10

Oh man...I completely blanked and put 'login' instead of 'logout'

AttachmentSizeStatusTest resultOperations
337820-user-logout-D7_0.patch4.98 KBIdleFailed: Invalid PHP syntax.View details

#10

Damien Tournoud - November 23, 2008 - 17:12
Status:needs review» reviewed & tested by the community

Looks great.

#11

Dave Reid - November 23, 2008 - 17:21

#12

System Message - November 23, 2008 - 17:25
Status:reviewed & tested by the community» needs work

The last submitted patch failed testing.

#13

Dave Reid - November 23, 2008 - 17:29

Yes...it failed because part of it was accidentally committed. :/

#14

webchick - November 23, 2008 - 20:30
Status:needs work» needs review

Ok, I did:

cvs update -j 1.283 -j 1.282 modules/system/system.install

(hat tip, dww!)

And then committed so the conflicts should be gone now. Thanks for the heads-up. Marked the patch back for re-testing.

#15

webchick - November 23, 2008 - 21:18
Status:needs review» fixed

Testbot came back okay, and manual testing of both the patch and upgrade path confirms this is ready to go.

Committed to HEAD. Thanks!

#17

webchick - November 24, 2008 - 00:44

My fault. :( Reverted the hunks from the other issue. :(

#18

webchick - November 24, 2008 - 04:21
Status:fixed» needs work

Hm. Well this is interesting.

Justin Randell noticed tonight that the Menu item creation/deletion tests had a failure in them this evening. So I spent a few minutes rolling back patches until it stopped failing. It turns out, this patch causes it (no idea why).

The failure is:

"Menu item was reset" in menu.test line 317 (MenuTestCase->resetMenuItem())

What sucks though is as you can plainly see in #14 and #15, I marked the patch back for testing and it came through all greens http://drupal.org/node/337820#comment-1122283. :( I marked it for retesting at :30, it passed at :57, and it was committed at :18...

So... I guess something is causing the testbot to not catch this error. :(

At any rate, we need to figure out why that test fails with this patch applied, so I've reverted it for now to get tests passing again...

#19

webchick - November 24, 2008 - 06:45

Incidentally, I made a bug about this against PIFR over at #338292: Correct regex for singular assertions.

#20

Dave Reid - November 24, 2008 - 07:13

Wow...that result is weird. I'll look into this shortly.

#21

Damien Tournoud - November 24, 2008 - 16:44
Status:needs work» needs review

Trying to resubmit the same patch.

#22

Dave Reid - November 24, 2008 - 17:22

I cannot duplicate that error at all... So I'll post a new patch that includes a necessary change to robots.txt and the update function since there is now an existing system_update_7014.

AttachmentSizeStatusTest resultOperations
337820-user-logout-D7.patch5.69 KBIgnoredNoneNone

#23

Dave Reid - November 24, 2008 - 17:25

Removed unnecessary line removal.

AttachmentSizeStatusTest resultOperations
337820-user-logout-D7.patch5.57 KBIdlePassed: 7050 passes, 0 fails, 0 exceptionsView details

#24

Dave Reid - November 24, 2008 - 18:26

Not sure how that last test passed...I forgot to change the 'user/login' to 'user/logout' again...

AttachmentSizeStatusTest resultOperations
337820-user-logout-D7.patch5.57 KBIdlePassed: 7050 passes, 0 fails, 0 exceptionsView details

#25

Dries - November 25, 2008 - 13:17
Status:needs review» fixed

Committed to CVS HEAD. Thanks.

#26

Damien Tournoud - November 25, 2008 - 13:50
Status:fixed» active

Please revert. The actual failure that made webchick revert that in the first place is still not fixed. The test bot is "near-sighted" on some tests, and fails to report back failures in some cases (investigation in progress in #338292: Correct regex for singular assertions).

#27

Dave Reid - November 26, 2008 - 16:23

I still have no idea why this patch would cause the menu item/creation test to fail. I need to do some debugging into the test to figure out what's going on.

#28

Damien Tournoud - November 26, 2008 - 16:33

Hum. I *made* the debugging, but somehow failed to post the results back here.

The issue is that getStandardMenuItem() picks a menu item that is not displayed on the front page (Help in my case). That happens consistently on all my tests (upgrading an existing 7.x installation, or starting from scratch). You will have to fix that function, for example by making it pick Logout explicitly.

#29

webchick - November 27, 2008 - 07:08

Ok, reverted this once more, and started the testing bot again. WHEW.

Let's leave this 'active' until we fix whatever the problem is with the test/bot/whatever, so we don't accidentally commit it prematurely any more. ;)

#30

Dave Reid - November 27, 2008 - 20:39
Status:active» needs review

Ok I fixed the error in the getStandardMenuItem(). As Damien said in #28, before this patch, the function uses SELECT MIN(mlid) FROM {menu_links} WHERE module = 'system' AND hidden = 0 AND has_children = 0 to get the mlid of a front page menu item, assumed the logout item since before the patch, it has an mlid of 4. With the patch, the logout path is no longer has the minimum mlid (17) that meets those conditions, it's the admin/help menu item (mlid = 16), which does NOT display on the front page. So when the test performs $this->drupalGet('') it cannot find that menu item on the front page.

Revised patch changes the SQL logic to explicitly find the mlid of only the logout path:
SELECT mlid FROM {menu_links} WHERE module = 'system' AND router_path = 'user/logout'

The menu item/creation test passes on my install and is ready for review.

AttachmentSizeStatusTest resultOperations
337820-user-logout-D7.patch6.67 KBIgnoredNoneNone

#31

Dave Reid - November 29, 2008 - 01:22

Reposting to get picked up by testing bot.

AttachmentSizeStatusTest resultOperations
337820-user-logout-D7.patch6.67 KBIdlePassed: 7423 passes, 0 fails, 0 exceptionsView details

#32

Damien Tournoud - November 29, 2008 - 03:10
Status:needs review» reviewed & tested by the community

Confirmed that tests pass with this new version. The patch itself looks good. RTBC, one last time.

#33

Dries - November 29, 2008 - 09:33
Status:reviewed & tested by the community» fixed

Committed to CVS HEAD. Thanks!

--project followup subject--

System Message - December 13, 2008 - 09:35

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

#34

System Message - December 13, 2008 - 09:41
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.