If module me is installed, the argument validation makes error in user.module, because there are'nt numeric argument, and the user can't be loaded.
This patch check if module me is installed, and then makes global $user if the 'me' alias is using.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | account_profile_2.patch | 4.23 KB | szantog |
| #9 | account_profile.tar_.gz | 8.26 KB | szantog |
| #5 | account_profile-929344-1.patch | 2.27 KB | berliner |
| #4 | account_profile-929344.patch | 1.02 KB | berliner |
| #2 | account_profile.patch | 2.3 KB | szantog |
Comments
Comment #1
szantog commentedSorry, wrong patch was uploaded.
Comment #2
szantog commentedAnother patch, because the disable edit tab settings doesn't work with module me too.
Comment #3
szantog commentedHmm.. I get some error, and the patch was made about wrong version, so i need more test..
Comment #4
berliner commentedI propose the attached path. It doesn't specifically test for the me module, but rather checks whether the user id is already set in the $form array. Very simple patch, but it solves the problem for me.
Comment #5
berliner commentedRevised the above patch because it erroneously put admin information into the account form when an admin edits the profile of a user account.
Comment #6
kenorb commentedRelated issues:
#981914: Missing argument 2 for user_category_load()
#803702: Missing argument 2 for user_category_load()...
Comment #7
kenorb commentedSimilar: #981914: Missing argument 2 for user_category_load()
Comment #8
kenorb commentedComment #9
szantog commentedOk, I figured it out.
The problem was two thing:
1. The module content profile set/unset the cp edit form's path in menu_router depends on it's settings. If the "profile edit tabs" settings is 'Show a tab at the user's page' the profile settings is under path user/'%/edit/%profile_name doesn't exists! This would caused this: #981914: Missing argument 2 for user_category_load()
In menu_alter is set: $items['user/%user_category/edit/' . $profile]['type'] = MENU_CALLBACK; but $items['user/%user_category/edit/' . $profile]['type'] doesn't defined previous, so we have an 'empty' menu_item without access_arguments and page_arguments, then get drupal_access_denied.
2. The module me.
This unset the 'user/%user_category/edit' menu item, this uses ['user/%me_category/edit'] instead.
Because of 1 i changed the redirect method. I think, this solves this too: #1000822: redirect loop
and the _menu_alter
Because of 2. i changed the activate method
and the menu_alter
I attach a zipped version, please review it, if you can't use diff. And again: sorry for my english. :)
Comment #10
martynpanes commentedHi There,
Just To say thanks for finding a fix to this problem - I am desperate to get a new site released for a customer using the content and account profile modules.
Comment #11
kenorb commented@martynpanes: Have you tested the patch?
Comment #12
light9 commented#9 works for me!
szantog thank you so much!
Comment #13
frosty29 commentedI was getting the Missing argument 2 for user_category_load()
which went away if I turned off "Redirect on User Edit page"
The patch worked for me - but I don't have either me or tab tamer modules .
Drupal 6.22 with latest of:
account_profile
admin_menu
advanced_help
auto_nodetitle
breadcrumbs_disabler
captcha
cck
computed_field
content_access
content_profile
date
libraries
logintoboggan
print
remember_me
rules
sharedemail
token
views
views_attach
views_customfield
views_dynamic_fields
views_export_xls
wysiwyg with tinymce
Would it make sense to release the patch anyway?
Thanks!
Comment #14
kenorb commented#9 patch looks fine. I don't know how me module works, but:
you loading user from global variable, when 'me' is installed. But what if you open someone's else account from admin account? Probably it will load admin account instead of user? I'm right?
Comment #15
kenorb commentedMarked as duplicate: #1152488: Support "me" module
Based that this issue is 'me' specified, and 'me' is doing lots of changes to user behaviour, changing as a feature.
Copied patch from: #1152488: Support "me" module
done by emerya
Comment #16
kenorb commentedszantog:
Have you done some progress or do you have some recent patches available for testing? Thanks.
Comment #17
szantog commented"But what if you open someone's else account from admin account? Probably it will load admin account instead of user? I'm right?"
The module me only changes the logged in users menu items from user/[uid] to user/me. In this way if a user is in user/me or user/me/* always get own user page. It's impossible (or module me bug..)
If an admin open something else user page, they would go to original user/[uid]/* path, and there are a numeric arg(1).
"Have you done some progress or do you have some recent patches available for testing? Thanks."
No, just these. It works some my sites without any issue. :)
Comment #18
arski commentedsub
Comment #19
technikh commenteduse http://drupal.org/project/menu_token instead
Comment #20
kenorb commentedClosing as per Drupal 6 end-of-life. Unless somebody can provide a clean, tested patch.