(1) Error upon adding user to node and clicking the add another button, or saving node
Warning: array_filter() [function.array-filter]: The first argument should be an array in _user_reference_potential_references_standard() (line 585 of /www/www-staging/drupal.sandbox.sanger.ac.uk/htdocs/sites/all/modules/contrib/references/user_reference/user_reference.module).
(2) Error when saving grants in node manage fields
Notice: Undefined index: args in _user_reference_view_settings_validate() (line 169 of /www/www-staging/drupal.sandbox.sanger.ac.uk/htdocs/sites/all/modules/contrib/references/user_reference/user_reference.module).
I have fixed these bugs on my server, I will attach the patch (unfortunately my proxy/firewall doesn't allow me to use the git method).
Comments
Comment #1
yched commentedThis should be fixed in latest 7.x-2.x-dev.
You should try to update the code, then clear the site caches, and re-submit the "field settings" form.
Comment #2
stephenrobinson commentedHi,
Get new errors now (7.x-2.x-dev - 2011-Dec-21 ):
Comment #3
stephenrobinson commented7.x-2.x-dev - 2011-Dec-21 completely trashed my database....
Comment #4
yched commentedI don't think I see what code change in References might cause this.
- Do you know what was the previous code version you had ? beta3 ? some other state of -dev ? (any idea of the date ?)
- Did you upgrade other modules (or drupal core) at the same time ?
Comment #5
stephenrobinson commentedjust -beta3 to -dev, made the effected field unviewable
Comment #6
yched commentedTrying to understand what is happening on your setup.
- The changes from beta-3 to current -dev have no reason to cause the messages you mentioned in #2. Those are caused by the fact that the $field definition that lies in your 'field_config' db table has no 'indexes' entry (it should be in the serialized 'data' column).
I'm not sure why that is, and that would deserve investigation, but that is something that is controlled by core, and upgrading the References code did not provoke that. I'd think that submitting the "field settings" form would have caused this error even before you upgraded References.
Please enable devel.module if you haven't, go to devel/php, execute the code below (I guessed the field name from the errors you posted), and post the result here (preferably uploaded in a .txt file)
- Those errors you mention in #2 do not relate to "make the effected field unviewable", so I'd need you to be more specific on that part. What goes wrong when you do what and where ? Are there any error messages ?
Comment #7
stephenrobinson commentedHi,
I cannot see the field when I view or edit. I have re-migrated again and left the old module version on and get the same error, but have the field back (phew), included one good, and one bad field in dump.
Comment #8
stephenrobinson commentedstrong suspicion field_config table has become corrupted, perhaps by node access user reference...
Comment #9
stephenrobinson commentedHi,
Think the issue is the ID field [id] which appeared to be wrong?
Redid it and got a different ID?
Comment #10
yched commentedI'm not familiar with node_access_user_reference.module, but from a quick look at the code I don't see where it would interfere.
I don't see what's wrong with the ids in the dumps you posted above.
"Redid it and got a different ID?" - I don't understand what you mean. As you can see I'm trying to help you debug your site, but if you don't make the effort to be clearer I can't do much to help.
My only suggestion right now is to run the following code in devel/php to fix the missing 'indexes' entries in the field_config table.
Please backup your database beforehands.
Comment #11
stephenrobinson commentedHi,
Went back to an earlier dump, and the problem didnt re-occurr, so can't reproduce, and did the upgrade to 7.x-2.x-dev - 2011-Dec-22 and it didnt cause any issues, and also the realname module has started working which replaces the un with a field of your choice, usually fullname, yipeee, thanks for the patience,
Stephen :)
Comment #12
yched commentedOK, cool :-)
I'll push a new release with the recent changes ASAP.
Comment #13
stephenrobinson commentedyou should be able to close issue
"Real Name not working for user references":
http://drupal.org/node/1194086
repeat in realname module:
http://drupal.org/node/1220564
Comment #14.0
silverwing commentedtypo