I had to make a couple of patches to user_reference.module:

user_reference_potential_references:

    if (module_exists('views') && !empty($field['settings']['view']['view_name'])) {
      if($field['settings']['view']['view_name']!='--'){ // added
        $references = _user_reference_potential_references_views($field, $options);
      } // added
    }

_user_reference_potential_references_standard:

  $filter_status = array(); // added
  if(count($filter_status)>0){ // added
    $filter_status = array_filter($field['settings']['referenceable_status']);
  } // added
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

StephenRobinson’s picture

ooops got this a bit wrong

  $filter_status = array();  // added
  if(is_array($field['settings']['referenceable_status'])){ // added
    $filter_status = array_filter($field['settings']['referenceable_status']);
  } // added
jbeall’s picture

Hi SangersDrupalDude,

I encountered what I think is the issue you're describing, but the only change that was necessary was to add the code you gave for the _user_reference_potential_references_standard function, and I added it in place of $filter_status = array_filter($field['settings']['referenceable_status']); (which was line 864 for me).

Since I did this I haven't noticed a recurrence of the issue I was encountering.

What is the code you posted for user_reference_potential_references intended to address? And where in the user_reference_potential_references function did you place your code?

-Josh

manoloka’s picture

Can you please provide a proper patch for this?

Thanks

rfay’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
Issue summary: View changes
Status: Active » Needs review
FileSize
986 bytes

Here's the patch. I don't know whether this affects only upgraded sites or not, but referenceable_status can certainly be a boolean even on a new node.

renatog’s picture

Assigned: Unassigned » renatog
Status: Needs review » Reviewed & tested by the community
Issue tags: +ciandt-contrib

Hi people.

Thank you very much for contribution.

Make sense.

  • RenatoG committed 3b89238 on 7.x-2.x authored by rfay
    Issue #1462976 by rfay, StephenRobinson, jbeall, manoloka, RenatoG:...
renatog’s picture

Status: Reviewed & tested by the community » Fixed

Fixed.

Commited in dev branch.

Regards.

Status: Fixed » Closed (fixed)

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