After installing 6.x-2.7 on D6.14, I began getting the following error on every page load:

# warning: Missing argument 2 for user_category_load() in /var/www/drupal/modules/user/user.module on line 1139.
# warning: Missing argument 3 for user_category_load() in /var/www/drupal/modules/user/user.module on line 1139.

I fixed it by adding the following line to $items in me_menu() in me.module:

'load arguments' => array('%map', '%index'),

Thanks,
-Roman

Comments

haikubear’s picture

After updating a view, the problem returned. Here is the warning again:

# warning: Missing argument 2 for user_category_load() in /var/www/drupal/modules/user/user.module on line 1139.
# warning: Missing argument 3 for user_category_load() in /var/www/drupal/modules/user/user.module on line 1139.
# warning: array_slice() [function.array-slice]: The first argument should be an array in /var/www/drupal/modules/user/user.module on line 1152.
# warning: implode() [function.implode]: Bad arguments. in /var/www/drupal/modules/user/user.module on line 1152.

The full warning is a repeat of the above four lines 4 or 5 times, depending on the page.

Disabling "me" removes the warning, so I am fairly confident it comes from this module... Any ideas?

Thank you.

g.k’s picture

same error here

filpet’s picture

same error here too!

Toxid’s picture

Same problem, but on line 1160 in D6.19. Adding 'load arguments' => array('%map', '%index'), doesn't solve it for me.

stevef’s picture

Great module, except, we're also getting this error. Is both argument 2 and 3, and is occurring on D6.19. Adding 'load arguments' => array('%map', '%index'), doesn't solve it.

This means the module is unusable. We'd be happy to commission someone to do a fix as this is quite important functionality for us.

szantog’s picture

The problem is there are any other module, what need more module weight, than 'me' alias. I got this message after enabled http://drupal.org/project/account_profile . Setting the account_profile's weight 1000 solved the problem.

asciikewl’s picture

I had to get around this urgently. I haven't looked into it very deeply, but this seems to fix the problem:

--- me.module.orig      2010-10-03 10:57:44.000000000 +0200
+++ me.module   2010-10-03 11:01:20.000000000 +0200
@@ -383,6 +383,10 @@
  * Menu load callback in place of user_category_load().
  */
 function me_category_load($uid, &$map = NULL, $index = NULL, $map_index = FALSE) {
+  // if map or index are null, user_category_load will fail, so return FALSE
+  if ($map == NULL || $index == NULL) {
+    return FALSE;
+  }
   $args = func_get_args();
   return _me_load_arguments($uid, $map, $index, $map_index, $args, 'user_category_load');
 }
hefox’s picture

I just had this issue in some custom code due to not checking a menu item that used user_category existed before altering it; very possible what is happening here is that one module is editing something that doesn't exist/exist yet/had existed but doesn't anymore.

baff’s picture

Same problem. It comes when I delete a profile field in /admin/user/profile

dddave’s picture

Missing argument 3 for user_category_load() in /is/htdocs/wp1141249_Q7UT4FKE6D/www/drupal6/modules/user/user.module in Zeile 1160.
Same for argument 2. This happens every time somebody hits an adit page.

Currently this error is anoying but does it harm anything?

re#7
Could you provide a patch. I would love to test it out. Did you have any other findings after using your modifications?

hefox’s picture

(From what I found out in #8, I'd guess is while #7 might get rid of errors, it's a bandaid. There's likely still incompletely defined menu items that should be fixed).

baff’s picture

I have tested it many times, when disabling the module everything is fine, enabling it I get the errors.

gregoiresan’s picture

Priority: Normal » Major

I have menus, views and pages that refered to deleted fields. Where should I start to solve this issue ?

The Big red message in the top of my site doesn't look pretty :-°

gregoiresan’s picture

I tried to go back to version 2.5 and 2.6. The error persists.
I've tried to unsinstall all profile related modules and I finally lost the profile's data.
Reinstalling everything didn't get rid of the error message.
I am not coder, so it doesn't give [me] any clue on where it comes from.

As haikubear doesn't seem to be concerned by this issue, could someone try to provide a patch to fix it ?

gregoiresan’s picture

#7 apparently hide the message.

I have reset the hole user/profile environment but I keep having small bugs. I am wondering if this is not related to the core profile module itself. It was another excuse for me to migrate to Content Profile finally.

haikubear’s picture

As haikubear doesn't seem to be concerned by this issue...

I am not the maintainer of the module... not sure how my concern would help.

baff’s picture

gregoiresan’s picture

lol, sorry mate, since Drupal has a new style, I'm confusing titles and names sometimes ;)

baff’s picture

It also happens when using content profile module and changing tab settings within conten type (content profile)

gregoiresan’s picture

Does this mean that is a user.module issue or still because of me 'aliases' ?

kenorb’s picture

If you're using Account Profile module, please test the patch: #929344: Integration with 'me' module #9

arski’s picture

sub.. any progress on this anyone?

chinita7’s picture

Probably similar to #21 it looks like one page profile module also conflicts with "Me" When I disable either "Me" or "One Page Profile" the error is gone.
I also created a bug report for one page profile here

arski’s picture

wasn't using that

kehogo’s picture

I uninstalled my version, downloaded the newest version (6.x-2.9) and the error went away. FYI

kenorb’s picture

Issue summary: View changes
Status: Active » Fixed

Version 6.x is no longer supported due to Drupal 6 End of Life.

Status: Fixed » Closed (fixed)

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