Notice: Undefined property: panels_views_plugin_row_fields::$field_alias in panels_views_plugin_row_fields->render() (line 172 of /Users/clark/Documents/sites/latc-project.eu/sites/all/modules/panels-HEAD/plugins/views/panels_views_plugin_row_fields.inc).

I get that notice when I use Panel Fields in Views. I am using the latest HEAD of both modules.

The code in question is:

foreach ($this->region_fields as $region_id => $fields) {
      $this->view->field = $fields;
      $content[$region_id] = theme($this->theme_functions(), array('view' => $this->view, 'options' => $this->options, 'row' => $row, 'field_alias' => $this->field_alias));
    }

$this->field_alias is not set on the panels_views_plugin_rows_fields object. Since this is styling multiple fields, using views_view_fields.tpl.php, is $this->field_alias even applicable?

When I remove the 'field_alias' element in the array, it works and no notices are displayed.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

Status: Active » Needs review
FileSize
1.04 KB

Patch just in case I'm correct.

merlinofchaos’s picture

I think that patch is probably right. field_alias isn't used unless the row style adds a field, which this one does not.

merlinofchaos’s picture

Status: Needs review » Fixed

Committed!

boabjohn’s picture

Status: Fixed » Active
FileSize
8.92 KB

Sorry, not sure if my troubles are related, but same error. Both Panels and Views are in 7.x-3 alpha1

Attached is problem View.

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

Please note that it is absolutely impossible to get the exact same error while this patch is applied, because it changes the characteristics of the line in question. So clearly #4 is not exactly correct. My guess is that it's using a -dev from prior to this commit and this was not verified by #4.

Letharion’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

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

WorldFallz’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
Status: Closed (fixed) » Active
FileSize
748 bytes

This still exists in views 3 d6-- patch attached.

WorldFallz’s picture

Status: Active » Needs review
mgifford’s picture

Version: 6.x-3.x-dev » 7.x-3.3

Note, I just got this issue with 7.x-3.3 & Views7.x-3.7.

Notice: Undefined property: panels_views_plugin_row_fields::$field_alias in panels_views_plugin_row_fields->render() (line 92 of /var/www/psac/sites/all/modules/contrib/panels/plugins/views/panels_views_plugin_row_fields.inc).

alamp’s picture

Issue summary: View changes
FileSize
959 bytes

Me too, I just got this issue with 7.x-3.4 & Views7.x-3.7.

I'm attaching the patch for Panel 7.x-3.4

Status: Needs review » Needs work

The last submitted patch, 11: 978768_#10_notice_panels_7.x_3.4.patch, failed testing.

mgifford’s picture

Status: Needs work » Needs review
FileSize
861 bytes

  • Commit 41fcbb6 on 7.x-3.x, master, pipelines, 7.x-3.x-i18n, 8.x-3.x by merlinofchaos:
    #978768 by linclark: Fix notice with panel fields.
    
    

mgifford’s picture

Did this get committed or was that a bug? Not sure what's up in #14. I shouldn't be able to re-apply the patch (and I can) so I'm guessing it didn't get in (or perhaps was reverted).

MustangGB’s picture

The commit was at line 169, the patch is at line 89, looks there there are/were two occurrences.

DamienMcKenna’s picture

Version: 7.x-3.3 » 7.x-3.x-dev
Parent issue: » #2819117: Plan for Panels 7.x-3.9 release

@ashwinsh created a fix for this in #2543478: A typo in the code? too.

DamienMcKenna’s picture

Status: Needs review » Reviewed & tested by the community
DamienMcKenna’s picture

@maximpodorov uploaded a patch to fix the exact same bug in #2117451: Undefined constant view too.

  • japerry committed 541590d on 7.x-3.x authored by mgifford
    Issue #978768 by mgifford, linclark, WorldFallz, alamp, boabjohn: PHP...
japerry’s picture

Status: Reviewed & tested by the community » Fixed

Fixed!

Status: Fixed » Closed (fixed)

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