Hi,

I'm having an issue with a glossary style view displayed in a panels page via a content pane. Whenever you click on one of the letters from the summary attachment, that letter gets appended to the current URL (without removing the current argument). So if you click on 'C' three times, the current URL will end in /c/c/c. Obviously only the first argument actually filters anything.

I can get around the problem by overriding the path from the pane configuration, but that's a recipe for the paths getting out of sync with one another! Alternatively (this is what I'm doing on my current project) I can set the override path from within a hook_views_pre_build() and that works fine as well.

Repro

  1. Enable default glossary view.
  2. Add a content pane, and ensure that the summary attachment is attached to it. Configure it to inherit the Panels path.
  3. Create a panels page and add the content pane.
  4. Visit the page and click on the glossary links a few times.

The code in question seems to be

  else if ($path = $view->display_handler->get_option('inherit_panels_path')) {
    $view->override_path = $_GET['q'];
  }

from views_panes.inc.

Thanks

Comments

nowidid’s picture

There is a related issue under
https://drupal.org/node/1117116

nowidid’s picture

It is possible to avoid the repeatedly appended argument from the views attachment in the views glossary example added to panels.

  1. clone/enable default glossary view
  2. Add a content pane, and ensure that the summary attachment is attached to it
  3. Configure the content pane to inherit the Panels path
  4. "Argument input:Edit" - For the "Contextual Filter" field choose "From Panel" and "first" "Panel Argument".
  5. "Allow: settings" - "path override"
  6. Create a panels page and add the content pane.
  7. Override the path for this piece of content.

This worked or me.

AndyF’s picture

Thanks for your time nowidid. As I mentioned in the description, I'm aware I can fix it by overriding the path. The problem with that is it duplicates the panel page's path. If I want to change the URL I have to change it in two places. At some point the two paths will get out of sync and cause problems.

joelpittet’s picture

Status: Active » Fixed

We ran into this and the solution was un-intuitive but "default_argument_skip_url" or in the Views UI on Contextual Filters a checkbox under the defaults settings "Skip default argument for view URL", will stop the argument from being appended to the URL provided by the panel page.

joelpittet’s picture

Category: Bug report » Support request

Status: Fixed » Closed (fixed)

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