hi there,
after installitation and done with everything, when i testing to visiting the user profile page.. i got this error message

    * warning: Parameter 2 to content_profile_user() expected to be a reference, value given in /home/xxx/public_html/includes/module.inc on line 483.
    * warning: Parameter 3 to block_user() expected to be a reference, value given in /home/xxx/public_html/includes/module.inc on line 483.
    * warning: Parameter 2 to blog_user() expected to be a reference, value given in /home/xxx/public_html/includes/module.inc on line 483.
    * warning: Parameter 3 to comment_user() expected to be a reference, value given in /home/xxx/public_html/includes/module.inc on line 483.
    * warning: Parameter 2 to dblog_user() expected to be a reference, value given in /home/xxx/public_html/includes/module.inc on line 483.
    * warning: Parameter 3 to locale_user() expected to be a reference, value given in /home/xxx/public_html/includes/module.inc on line 483.
    * warning: Parameter 2 to node_user() expected to be a reference, value given in /home/xxx/public_html/includes/module.inc on line 483.
    * warning: Parameter 2 to profile_user() expected to be a reference, value given in /home/xxx/public_html/includes/module.inc on line 483.
    * warning: Parameter 2 to statistics_user() expected to be a reference, value given in /home/xxx/public_html/includes/module.inc on line 483.
    * warning: Parameter 3 to system_user() expected to be a reference, value given in /home/xxx/public_html/includes/module.inc on line 483.
    * warning: Parameter 2 to user_user() expected to be a reference, value given in /home/xxx/public_html/includes/module.inc on line 483.
    * warning: Parameter 2 to date_timezone_user() expected to be a reference, value given in /home/xxx/public_html/includes/module.inc on line 483.
    * warning: Parameter 2 to imagecache_user() expected to be a reference, value given in /home/xxx/public_html/includes/module.inc on line 483.
    * warning: Parameter 2 to imagecache_profiles_user() expected to be a reference, value given in /home/xxx/public_html/includes/module.inc on line 483.
    * warning: Parameter 2 to views_attach_user() expected to be a reference, value given in /home/xxx/public_html/includes/module.inc on line 483.
    * warning: Parameter 2 to pathauto_user() expected to be a reference, value given in /home/xxx/public_html/includes/module.inc on line 483.

is it pointing to php 5.3 compability ?? how can i fix it ?? thanks....

CommentFileSizeAuthor
#25 ctools-728486.patch717 byteselliotttf

Comments

michelle’s picture

It looks like the error is occurring in module_invoke_all() which tons of modules use. Unless I run into the error myself so I can put in some debugging code, I can't even tell if this is coming from APK. I'll leave it active and maybe someone else can chime in but this isn't something I can try to debug right now.

Michelle

kakajoe’s picture

do u want to access my ftp ?? so u can see my files.. what is ur email ?? i'll add u to my ftp account

michelle’s picture

No, I really don't have time to try and debug it right now.

Michelle

mybinaryromance’s picture

i just found that APK produces the following error on PHP 5.2.12 when editing the user profile template (admin/build/pages/edit/user_view):

warning: preg_match() expects parameter 2 to be string, array given in /is/htdocs/xxx/www/drupal/includes/bootstrap.inc on line 777. this error is displayed as a drupal_set_message - error, the panel is still loaded.

when hitting the edit content button (to reach admin/build/pages/nojs/operation/user_view/handlers/user_view_panel_context_2/content), the wsod appears, telling me:

Fatal error: Call to a member function set_display() on a non-object in /is/htdocs/xxx/www/drupal/sites/all/modules/ctools/views_content/plugins/content_types/views_panes.inc on line 430

any ideas?

thanks for your help!
peace, bonzo

michelle’s picture

@bonzo meier: That error has nothing to do with APK: #612850: Fatal Error views_panes.inc on line 430

Michelle

mybinaryromance’s picture

hm.

i actually think it has, because after posting this comment i went reading the readme (again) where it says there are some required modules (views, panels, user-relations, statistics etc.) and WOW! - after enabling all of these, the error ist almost gone (keeping just a warning: preg_match() expects parameter 2 to be string, array given in /is/htdocs/xxx/www/drupal/includes/bootstrap.inc on line 777. on admin/build/pages/nojs/operation/user_view/handlers/user_view_panel_context_2/content).

how do you feel about actually marking required modules as required on the build/modules page? that would make life a lot easier... check http://drupal.org/node/231036 if you don't know what i mean...

peace, bonzo

michelle’s picture

There aren't any required dependencies; this is a kit module. However, it is still in development and it's possible there are some bugs that cause problems if you don't have the normal set of modules I test with. That will be cleaned up before RC.

Michelle

kakajoe’s picture

so my user still seeing this error?? :(

berdir’s picture

Status: Active » Postponed (maintainer needs more info)

I can't reproduce this, I assume this is not APK but instead in another module that is called by APK.

You need to figure out which module causes this and report there. You can do this either by disabling all modules and enable one for another unless the messages comes up or if you know some php, I've described how you can figure it out at #360605-198: PHP 5.3 Compatibility, you just need to replace $form_state with the argument that is set to NULL, according to the error message (2nd/3rd) in on of the functions that are reported.

michelle’s picture

Status: Postponed (maintainer needs more info) » Active

I checked and my host isn't using 5.3. From the discussion on IRC there were evidentially changes that is breaking a lot of contrib but I don't have 5.3 to test with. Berdir is probably right but I'll leave this active for a while. If anyone can come back with code in APK itself that is breaking on 5.3, let me know and I'll do my best to fix it.

Michelle

berdir’s picture

Title: php 5.3 compability » PHP 5.3 Compatibility
Project: Advanced Profile Kit » Chaos Tool Suite (ctools)
Issue tags: +PHP 5.3

Just stumbled on a site where I had the same errors.

After some debugging, I've found out that ctools is causing this (when used with Panels).

It uses the following, which is wrong:

    module_invoke_all('user', 'view', array(), $account);

It needs to like like:

user_module_invoke('view', $array = array(), $user);

This is on line 85 in ctools/page_manager/plugins/tasks/user_view.inc.

Note:

If you are *not* using Panels/ctools but see a similiar error, search for "module_invoke_all('user'" in your contrib modules that should give you the caller.

kakajoe’s picture

thank before for the fixed..it works and make short my error, but after im following your suggestion..i got a new error message, this is the error message



    * warning: array_fill() [function.array-fill]: Number of elements must be positive in /home/xxx/public_html/includes/database.inc on line 253.
    * warning: implode() [function.implode]: Invalid arguments passed in /home/xxx/public_html/includes/database.inc on line 253.
    * warning: array_keys() expects parameter 1 to be array, null given in /home/xxx/public_html/modules/user/user.module on line 502.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT p.perm FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /home/xxx/public_html/modules/user/user.module on line 502.

hope your not stop to helping he.... hehehe

kakajoe’s picture

anyone can help ?? sorry for the bump

TmaX-2’s picture

Hi Berdir #12 dosent work for me....
I get this error when i replace line 85 with

user_module_invoke('view', $array = array(), $user);

Fatal error: Cannot redeclare page_manager_user_view_page_manager_tasks() (previously declared in C:\xampp\htdocs\gallery\sites\all\modules\ctools\page_manager\plugins\tasks\user_view.inc:11) in C:\xampp\htdocs\gallery\sites\all\modules\ctools\page_manager\plugins\tasks\Copy of user_view.inc on line 33

how come its not working for me?

berdir’s picture

C:\xampp\htdocs\gallery\sites\all\modules\ctools\page_manager\plugins\tasks\Copy of user_view.inc

Well, you made a copy of that file (or the tool you've used to edit it). You need to either delete that file or move it outside of that folder.

TmaX-2’s picture

(#16)Wow Berdir removed the copy of the original to another folder and it works now! great!

A newbie out here in the Drupal world out here and a newbie coder it just amazes me how generous people like you are there to help and contribute to the drupal projects and the community as a hole. I am inspired.

Thank you for the swift reply!

kakajoe’s picture

and how about my error ?? i still confused with my error :( help me please

TmaX-2’s picture

@kakajoe try #12 and make sure you read #15 and do #16

we got the same issue how come u haven't tried #12? mine worked smoothly...

kakajoe’s picture

have u read all my post ?? read all before you reply

dividi’s picture

Have the same issue and suggest in #12 also does not work for me. I've got error as in #13.

Still anyone can help?

herb_miller’s picture

Re: #12 #13.
@kakajoe & @dividi
I had the same initial problems.
After applying the fix in #12, I got the new messages in #13.
These messages are explained in http://drupal.org/node/777116
I changed the last parameter back from $user to $account and the problem went away.

BTW. I'm on Drupal 6.16

sdboyer’s picture

Status: Active » Fixed

Berdir is partially correct in #12. The original error message is quite clear about the problem:

  module_invoke_all('user', 'view', array(), $account);

should be:

  module_invoke_all('user', 'view', $array = array(), $account);

I've committed a change to that effect.

Status: Fixed » Closed (fixed)

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

elliotttf’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new717 bytes

Actually, the commit is still a problem in PHP 5.3. The problem is that call_user_func_array does not properly handle pass by reference (as pointed out on the API: http://api.drupal.org/api/function/user_module_invoke/6). Berdir's solution is the correct one. I have attached a patch to fix this issue in php 5.3

merlinofchaos’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Patch (to be ported)

Committed. Marking for port to 7.x. Thanks!

telea’s picture

Hi,

I am really glad, that someone is still trying to help the people out here...
I hope someone can help me out. "I´m getting the
warning: preg_match() expects parameter 2 to be string, array given in xxx/includes/bootstrap.inc on line 777."
and the my account page doesn´t show the "wall"/comment-stuff or "add as friend" anymore..

In the file you said, was already the change....

module_invoke_all('user', 'view', $array = array(), $account);

And I tryed also the change from Berdir but nothing worked...

user_module_invoke('view', $array = array(), $user);

the failure seems the same...Can anyone helpme? And furthermore, cann anyone tell me if the not existenz of the wall and the add friend thing has to do anything with this failure? ;) Just want to be sure...

thanks for help
Telea

kenorb’s picture

sun_34133’s picture

* warning: array_fill() [function.array-fill]: Number of elements must be positive in D:\Projects\drupal\development\drupal\includes\database.inc on line 253.
* warning: implode() [function.implode]: Bad arguments. in D:\Projects\drupal\development\drupal\includes\database.inc on line 253.
* warning: array_keys() [function.array-keys]: The first argument should be an array in D:\Projects\drupal\development\drupal\modules\user\user.module on line 513.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT p.perm FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in D:\Projects\drupal\development\drupal\modules\user\user.module on line 513.
* warning: array_keys() [function.array-keys]: The first argument should be an array in D:\Projects\drupal\development\drupal\modules\block\block.module on line 432.
* warning: array_fill() [function.array-fill]: Number of elements must be positive in D:\Projects\drupal\development\drupal\includes\database.inc on line 253.
* warning: implode() [function.implode]: Bad arguments. in D:\Projects\drupal\development\drupal\includes\database.inc on line 253.
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in D:\Projects\drupal\development\drupal\modules\block\block.module on line 433.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') OR r.rid IS NULL) ORDER BY b.region, b.weight, b.module' at line 1 query: SELECT DISTINCT b.* FROM blocks b LEFT JOIN blocks_roles r ON b.module = r.module AND b.delta = r.delta WHERE b.theme = '' AND b.status = 1 AND (r.rid IN () OR r.rid IS NULL) ORDER BY b.region, b.weight, b.module in D:\Projects\drupal\development\drupal\modules\block\block.module on line 433.

while installing drupal on windows i got above problem please get me solution for this

sdboyer’s picture

@sun_34133 that's totally irrelevant to this issue, please don't hijack.

verta’s picture

Can the patch in #25 be applied to the 6.x dev branch too?

merlinofchaos’s picture

Status: Patch (to be ported) » Closed (duplicate)

It was committed. Also this got into the 7.x branch during the code sprint, so we can close this now.