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
- Enable default glossary view.
- Add a content pane, and ensure that the summary attachment is attached to it. Configure it to inherit the Panels path.
- Create a panels page and add the content pane.
- 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
Comment #1
nowidid CreditAttribution: nowidid commentedThere is a related issue under
https://drupal.org/node/1117116
Comment #2
nowidid CreditAttribution: nowidid commentedIt is possible to avoid the repeatedly appended argument from the views attachment in the views glossary example added to panels.
This worked or me.
Comment #3
AndyF CreditAttribution: AndyF commentedThanks 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.
Comment #4
joelpittetWe 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.
Comment #5
joelpittet