I believe this is similar to #1863166: Bad arguments when first optional context argument is unavailable and #1917658: Empty context value results in missing argument in views argument except that the setup is a bit different.

Steps to Reproduce

  • Create a View, use a Content pane display
  • Add a Contextual filter, change "WHEN THE FILTER VALUE IS NOT AVAILABLE" to "Display empty text" or "Display all values"
  • If you chose "Display empty text", add a "No results behavior"
  • Set "Argument input" to "Input on pane config"
  • Create a Panel Page
  • Add an optional argument in the path (ie: example/path/!optional)
  • Add your View pane to the Panel page, set the views argument using your panel argument (ie: %optional)

Expected result

When visiting the panel page without an argument (ie: example/path), the view will be displayed according to the Contextual filters default behavior.

Actual result

The view is not displayed at all.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jojonaloha created an issue. See original summary.

jojonaloha’s picture

Attached is a patch that resolves this issue for me. I'm also attaching an example of my panel page and views pane. The views pane is a Search API View.

geek-merlin’s picture

Patch looks reasonable.

Chris Matthews’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

The 3 year old patch to views_panes.inc does not apply to the latest ctools 7.x-1.x-dev.

Checking patch views_content/plugins/content_types/views_panes.inc...
error: while searching for:
        break;

      case 'user':
        $args[] = (isset($conf['arguments'][$id])  && $conf['arguments'][$id] !== '') ? ctools_context_keyword_substitute($conf['arguments'][$id], array(), $contexts) : NULL;
        break;

     case 'wildcard':

error: patch failed: views_content/plugins/content_types/views_panes.inc:176
error: views_content/plugins/content_types/views_panes.inc: patch does not apply
shubham.prakash’s picture

Status: Needs work » Needs review
FileSize
916 bytes

This patch should ix the issue.

rpayanm’s picture

Issue tags: -Needs reroll