When using the `pane_entity_reference` plugin and creating a pane using the "Display mode" output mode instead of "View", the following notice is displayed when viewing the page:

Notice: Undefined index: view in pane_entity_reference->render() (line 259 of /path/to/site/sites/all/modules/contrib/pane/contrib/pane_entity_reference/plugins/panes/pane_entity_reference.inc).

Initial debugging seems to suggest that rendering the more link is assumes use of "View" display mode to determine a value for accessible text and throws this notice when it can't find the view.

See the following in `contrib/pane_entity_reference/plugins/panes/pane_entityreference.inc` around line 257:

      $markup['more_link'] = array(
        '#link_text' => $more_link_text,
        '#accessible_text' => $this->configuration['view']['args'],
        '#path' => $url['path'],
        '#query' => $query,
        '#fragment' => (!empty($url['fragment']) ? $url['fragment'] : ''),
        '#theme' => 'pane_entity_reference_more_link',
      );
CommentFileSizeAuthor
#1 pane-view_more_error-2472553-1.patch905 bytesslucero

Comments

slucero’s picture

Status: Active » Needs review
StatusFileSize
new905 bytes

Adding a patch to apply a default value for accessibility text if the view is not available.

  • wwhurley committed 9a87958 on 7.x-2.x authored by slucero
    Issue #2472553 by slucero: Entity Reference Pane Gives Index Error for...
wwhurley’s picture

Status: Needs review » Closed (fixed)

Looks good. Applied the patch to 7.x-2.x. Verify at http://cgit.drupalcode.org/pane/commit/?id=9a87958.