I installed current dev version of D7 with Content translation 7.x-2.x-dev and CCK 7.x-2.x-dev modules.The page /#overlay=admin/structure/types/manage/article is giving the following warning:

Warning: Parameter 1 to user_reference_user_load() expected to be a reference, value given in DrupalDefaultEntityController->attachLoad() (line 255 of C:\project7\d7\includes\entity.inc).

CommentFileSizeAuthor
#8 690394-userref.patch723 bytesandypost

Comments

mcload’s picture

Disabling CCK 7.x-2.x-dev module solves the problem

catch’s picture

Project: Drupal core » Content Construction Kit (CCK)
Version: 7.x-dev » 7.x-2.x-dev
Component: other » userreference.module

Moving issue to the correct project.

karens’s picture

Project: Content Construction Kit (CCK) » References
Version: 7.x-2.x-dev » 7.x-1.x-dev
Component: userreference.module » Code

Move to new References module.

fgm’s picture

Component: Code » Code: user_reference

Categorizing.

fgm’s picture

Status: Active » Postponed (maintainer needs more info)

Cannot reproduce on PHP 5.3.3, Drupal 7 RC1 and the current version of user_reference. Can you provide a scenario to cause this problem ?

danielb’s picture

In the current code, the user_reference_user_load() function is commented out.

However in the commented out code, there is no reason why the $accounts parameter should be prefixed with &. I believe the $accounts array is an array of references, so this isn't needed?

<?php
function user_reference_user_load(&$accounts) {
?>

See profile_user_load() as an example. The parameter does not use references, but it still manages to alter the objects with no problems:
http://api.drupal.org/api/drupal/modules--profile--profile.module/functi...

This is likely also true of the hook_user_view() implementation directly beneath it.

andypost’s picture

Status: Postponed (maintainer needs more info) » Reviewed & tested by the community

$accounts should not be prefixed with '&'

andypost’s picture

StatusFileSize
new723 bytes

Patch for commented function

fgm’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Reviewed & tested by the community » Needs work

These functions, as they currently are, no longer make sense. Removing the useless ampersand does not make hook_user_view() compliant with the D7 API, and they are commented out anyway. I committed just the signature changes for that API compliance, but these functions need to be reworked or removed anyway.