In the juicebox.module file, line 108

  // The view arguments are what remains after the 1st and 2nd entries are
  // removed from $args
  $view_args = $args;
  array_shift($view_args);
  array_shift($view_args);
  // load the view 
  [...]

But

  $arg[0] = "view"
  $arg[1] = view name
  $arg[2] = view display

Unless I'm mistaken, the view arguments are what remains after removed the first three entries from $args.

  // The view arguments are what remains after the 1st and 2nd entries are
  // removed from $args
  $view_args = $args;
  array_shift($view_args);
  array_shift($view_args);
  array_shift($view_args);
  // load the view 
  [...]

(Sorry for my english)

Comments

rjacobs’s picture

Title: Juicebox views arguments » Juicebox views arguments are not properly colected from XML path
Version: 7.x-1.0-beta1 » 7.x-1.x-dev
Assigned: Unassigned » rjacobs
Status: Active » Needs review
StatusFileSize
new660 bytes

Yep, you are exactly right, the display name is being incorrectly passed as the first views argument because it's the 3rd argument on the XML path (not the second). This only seems to cause a problem when a contextual filter is active on the view, otherwise it looks like views just ignores that incorrect argument value.

It seems like most people are just using the field formatter part of this module, so the views plugin has not received much testing yet, otherwise I would have expected this issue to come up earlier.

Sylvain, can you test the attached patch and let me know if it resolves things in your case? This should be a pretty easy fix, but I'd love to confirm.

Joenet-dupe’s picture

The patch has fixed the issue for me.

YEAH!!! :)

Thanks.

rjacobs’s picture

Title: Juicebox views arguments are not properly colected from XML path » Juicebox views arguments are not properly collected from XML path
Status: Needs review » Fixed

Thanks Joenet. I also double-checked things here and the fix looks good, so it's committed: http://drupalcode.org/project/juicebox.git/commit/9f6555d

Thanks slayne40 for reporting the issue and it's cause.

This will be part of 7.x-1.0-beta2, which will be released momentarily.

Status: Fixed » Closed (fixed)

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