I'm getting a notice:

Undefined property: entityreference_plugin_display::$id_field_alias in entityreference_plugin_style->render() (line 50 of [...]/views/entityreference_plugin_style.inc).

When the view I attach to an invalid argument (which causes the query to not exectute and therefore entityreference_plugin_display::query() to not complete). Simple fix is to add

class entityreference_plugin_display extends views_plugin_display {

  public $id_field_alias;

To the top of the class.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JamesAn’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
423 bytes

I can confirm this bug as well as that one-liner fix against version 7.x-1.1. Here's that the proposed fix rolled into a patch against the 7.x-1.x branch.

loopduplicate’s picture

I got this error when my view used a contextual filter for "Content: Language" and set the "WHEN THE FILTER VALUE IS NOT AVAILABLE" field to "Display contents of 'No results found"'". I switched this to "Hide view" and the php notice went away.

Regards,
loopduplicate

TwoD’s picture

I don't know if it's always safe to use an empty value for the property when there are no results, but this patch does seem to work.

sano’s picture

The patch worked for me. Thanks.
Entity reference 7.x-1.5

FireHawkX’s picture

Status: Needs review » Reviewed & tested by the community

This also fixed the notice error for me on latest dev version! :)

Thanks!

MustangGB’s picture

Yup, still working here too.

minorOffense’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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

joseph.olstad’s picture

joseph.olstad’s picture

joseph.olstad’s picture