Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
user.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 May 2008 at 19:25 UTC
Updated:
16 Jun 2010 at 12:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
damien tournoud commentedI can confirm the bug, which lies in
user_menu()incorrectly using%user_categorywhere it should use%user.Bugs get fixed in the development version, then backported. Here is a patch for D7 that solves the issue. It also applies (with some benign fuzz) to D6.
Comment #2
obsidiandesign commentedLooks good - applies to 7.x-dev with no problem (18 line offset), menu link to user/[uid]/edit shows up once update.php is run.
Comment #3
kscheirerworks for me. patch applies cleanly with the above mentioned 18 line offset.
just out of curiosity, why does update.php need to be run in order to see the effect?
Comment #4
swentel commentedWorks for me. A quick visit to admin/build/modules rebuilds the menu cache also apparently to see the fix working.
Comment #5
damien tournoud commentedThis one has really waited too long :)
Rerolled for D7, but applies to D6 too.
Comment #6
webchickCan confirm presence of the bug, and that the patch fixes it. I was concerned that changing %user_category to %user might make Profile module not work, but I didn't see any issues in a quick test.
Committed to HEAD, marking back to 6.x.
Comment #7
gábor hojtsyWell, this was changed in http://drupal.org/node/111481#comment-639820 from %user to %user_current. I assume parent/child relationships work because the placeholders are treated equal for the matching (in ref to http://drupal.org/node/109134). It would still be good to double check this with chx/pwolanin, so we can make sure that inheritance, parent menu items, breadcrumbs, etc would still work.
Comment #8
pwolanin commentedI need to investigate more - is this the same bug as #298722: _menu_translate returns FALSE before to_arg is available ?
Comment #9
damien tournoud commented@pwolanin: those two bugs seem unrelated.
Today we have:
On a tracker page, for example
user/3/track/navigation, user_category_load is called with the map (user, 3, track, navigation). It fails to identify 'navigation' as a category and returns FALSE. That's why the Edit tab is not displayed.Comment #10
damien tournoud commentedPeter, could you confirm the analysis in #9?
Comment #11
catchI came across the same bug as Damien's #9 in #347250: Multiple load users (in my case it was passing the full map as the second argument to user_load().)
Comment #12
pwolanin commented@Damien - looks right - might be a simple fix.
Comment #13
pwolanin commentedin D7, putting in an invalid category gives me a new fatal error:
[09-Feb-2009 11:36:00] PHP Fatal error: Unsupported operand types in /www/drupal-7/modules/field/field.attach.inc on line 172
Comment #14
pwolanin commentedThis avoids the fatal error at ?q=user/1/edit/foo for D7, and also permits the 'Edit' tab to appear while on a tracker sub-tab.
Comment #15
pwolanin commentedfor D6.
Comment #16
pwolanin commentedWith test for D7.
Comment #17
pwolanin commentedActually, the test should be with user module.
Comment #18
dries commented1) There is some spacing issue: no space before setUp.
2) normal_user does not seem to be used.
Comment #19
pwolanin commentedwhitespace and code cleanup in the test.
Comment #20
pwolanin commentedDries and Damien suggest removing user_category_load. However, that will obliterate this optimization:
in D7, user_load is still not cached
and also we use user_category_load to special-case category names that may contain a slash. TO move off this we will somehow have to update old ones that contain a slash via an update function. In short - we should not try to do this today in a rush.
Comment #21
dries commentedPeter, we can worry about the right fix later, if you insist. When we do, we could worry about the user_load() caching even later -- #281596: Performance: static caching of user objects in user_load(), respecting conditions and #91786: user_load() static caching might at some point take care of that. That might take some stress out of a proper solution. ;-)
Comment #22
pwolanin commentedopened follow-up issue here: http://drupal.org/node/371763
Comment #23
pwolanin commentedThe D6 patch is running on d.o now. Clearly not perfect in the long run for D7, but fixes a critical bug now, adn any more complete fix will require significant refactoring of user module.
Comment #25
mlncn commentedSubscribing out of interest in seeing the related problem for Content Profile module fixed: http://drupal.org/node/419662
benjamin, Agaric Design Collective
Comment #26
Bilmar commentedsubscribing
Comment #27
YK85 commentedsubscribing
Comment #28
jody lynnI can't reproduce this bug anymore in HEAD. It's still an issue for D6 though. We need to review the patch in #15.
Comment #29
jody lynnPeter's patch in #15 works for D6, and as noted in #23 is already running on d.o.
Comment #30
YK85 commentedthank you for the great work
Comment #31
robby.smith commentedsubscribing
Comment #32
smk-ka commentedConfirming #15 also fixes Invite module local tasks for D6. Hence, marked #587632: Edit Profile-Track Invitations-for some links > Pending,Expired, new Invitation does not shows Edit Account tab as a duplicate of this issue.
Comment #33
rburgundy commentedtested it - thanks for the great work
any chance of commit into drupal 6?
Comment #34
gábor hojtsyThanks for the testing, committed #15.