Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If I'm at the visits tracker page (part of the Statistics module) of a certain user, the tab to edit that particular user has disappeard. When going to a user's contact or view page the edit tab is present again.
Comment | File | Size | Author |
---|---|---|---|
#19 | validate-category-path-18.patch | 2.41 KB | pwolanin |
#17 | validate-category-path-17.patch | 2.51 KB | pwolanin |
#16 | validate-category-path-16.patch | 2.13 KB | pwolanin |
#15 | validate-category-path-15-D6.patch | 797 bytes | pwolanin |
#14 | validate-category-path-14.patch | 1.02 KB | pwolanin |
Comments
Comment #1
Damien Tournoud CreditAttribution: Damien Tournoud commentedI can confirm the bug, which lies in
user_menu()
incorrectly using%user_category
where 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: pwolanin commented@Damien - looks right - might be a simple fix.
Comment #13
pwolanin CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: pwolanin commentedfor D6.
Comment #16
pwolanin CreditAttribution: pwolanin commentedWith test for D7.
Comment #17
pwolanin CreditAttribution: pwolanin commentedActually, the test should be with user module.
Comment #18
Dries CreditAttribution: Dries commented1) There is some spacing issue: no space before setUp.
2) normal_user does not seem to be used.
Comment #19
pwolanin CreditAttribution: pwolanin commentedwhitespace and code cleanup in the test.
Comment #20
pwolanin CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: pwolanin commentedopened follow-up issue here: http://drupal.org/node/371763
Comment #23
pwolanin CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: Bilmar commentedsubscribing
Comment #27
YK85 CreditAttribution: 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 CreditAttribution: YK85 commentedthank you for the great work
Comment #31
robby.smith CreditAttribution: robby.smith commentedsubscribing
Comment #32
smk-ka CreditAttribution: 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 CreditAttribution: 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.