After upgrating both Panels and ctools some arguments doesn't get send from Panels to Views. Downgrading to ctools 1.3 helps, but many features in the newer version of Panels requires ctools 1.4 - see this issue: https://drupal.org/node/2196197
I'm not really a bug-hunting expert, so I'm not sure where the actual problem is.

CommentFileSizeAuthor
#9 fix-panel-arguments-to-views-2198447-8.patch740 bytesPJnes
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

checker’s picture

This bug comes with commited http://drupalcode.org/project/ctools.git/commit/1887d8dc018bf6dfd20ec297... of the issue #1917658: Empty context value results in missing argument in views argument. If you remove this patch arguments in panels/views work fine again.

pierrozone’s picture

@ Checker, can you please elaborate on your comment? And also can you confirm that it doesn't break things in other places?

Thanks
Pierre

pierrozone’s picture

I reversed the patch as suggested by Checker and it worked for me.

Freaka’s picture

Hi,

Same issue here, several panel view blocks didn't receive the argument. I managed it with a downgrade to 1.3.

Please let us know when this would be fixed in the next version.

Thanks

checker’s picture

@pierrozone
This is just a hotfix not a solution.
The original issue for this patch is over a year old until it was fixed (2014-01-31). So i guess it could not be so critical. If you use ctools 1.3 you have the same situation without this patch.

enekoalonso’s picture

I am having this issue too, after upgrading CTools due to the security update recommendation, Panels stopped passing arguments to my views.

Here is my setup:
- Taxonomy Term page being loaded
- Variant set to activate when taxonomy term is being viewed
- Variant page has a page layout with panels
- The panel is configured to "Send Arguments"
- One panel contains a view

Expected:
- View receives the taxonomy term Id and filters results.

Actual:
- View does not receive the arguments and shows all results.

The view works fine when manually passed an argument, we are using it in other pages and filters by term id as expected. The problem appeared after the last update to CTools. We upgraded the module on Feb 18 to the latest version.

We have also updated other modules, including views, but everything leads to CTools. I haven't tried downgrading to 1.3 yet, though, so I cannot confirm if that solves the problem. Will look into that next.

enekoalonso’s picture

I can now confirm that the code change pointed by @checker is the root cause of this issue. Reverting that code change fixes the problem.

maximpodorov’s picture

Priority: Normal » Critical

Setting the priority to critical, since the problem can lead to data corruption and security problems.
The duplicate of this issue: #2196197: Send Arguments: //%1

PJnes’s picture

Attaching a patch that reverts the previous patch, for those of us using drush make.

mracidtwitch’s picture

Per post #9, I can confirm that the patch has corrected the issue.

For users not using drush (why?), the following command does the job. Make sure to run it from the root 'ctools' module folder:

patch --verbose -i 2198447-8.patch -p1 -b

japerry’s picture

Status: Active » Fixed

Fixed.. or reverted?

in any case, that issue will have to be revisited. Marking this regression as fixed.

http://drupalcode.org/project/ctools.git/commit/f82a228

Webbeh’s picture

I'm not sure if reverting this patch is the correct way to go about this. Per #6 and #7, I've had a similar issue in that working argument passing between a Panel and View broke. The views show the results of "No match found" for the arguments, where the argument shows up just fine in the view itself.

  • That being said, I opened up the view configuration in the Panel pane and noticed a new setting available.
  • All you have to do is set these appropriately (keep your argument passing checkbox or argument textbox in place), and save.
  • After applying this, the Panel & views started to work properly and carry the arguments properly.

Can anyone else try this, to see if this fixes the problem outlined in the posts above?

From my end, I'm able to continue to use Panels 7.x-3.4 and ctools 7.x-1.4 just fine with Panels with arguments to views.

Webbeh’s picture

Status: Fixed » Active

Marking this as 'Active' to see if anyone can test this, given the issue outlined in the previous options.

Volker23’s picture

The first link in #12 isn't working, so i don't know what setting you mean. I tried to look again for myself but with no luck.

Volker23’s picture

Ok, i got it working as well (the "new setting" was there already before the update so #12 got me confused).

I have a panel for a node view that has a selection rule like: "this panel will be selected if Node being viewed is type "x"". The panel pane is set to show a view where the argument of the node-id is passed to.

Before the update it was not necessary to set a context in the panel pane settings for the view. Now, after the update it is. I just selected the "content id" context in the context dropdown shown in #12 (second image) and kept the checkbox for "send argument" checked.

Now it works again fine. Next i need to dive into the context topic, that's still a book with seven seals for me...

Webbeh’s picture

Before the update it was not necessary to set a context in the panel pane settings for the view. Now, after the update it is. I just selected the "content id" context in the context dropdown shown in #12 (second image) and kept the checkbox for "send argument" checked.

Thanks for checking this, Volker23. I hadn't noticed the context selection was introduced in an earlier update.

As you mention, it looks like it's now mandatory. I appreciate the second look at this.

James A’s picture

Sorry for being really stupid but where exactly is this field?

I am currently running ctools 7.x-1.3 and panels 7.x-3.3 having downgraded after my last upgrade produced the results referred to here but you seem to imply I should be able to see them on earlier versions.

Having selected "edit panel" I can't find the setting referred to under "Selection Rules", and they're not under the Content page when selecting Settings for the particular view pane - this just has a drop down with commerce Product from Node selected.

If I go to views then I still don't have the field you're describing under the "Pane Settings", "Argument input" field which simply has "From Context" selected with the required context set to "Product ID".

I'm sure I'm just missing it somewhere so a screen shot would be greatly appreciated.

Enjoy the weekend

andersiversen’s picture

I still have this issue.
As described in #12 and #15 you have to set the contexts for it to work. But my problem is not with the arguments from contexts.
I have a mini-panel, which shows a view getting two arguments from the mini_panel. First argument is from context, and it gets send to the view correctly. Second argument is provided in the text-box for Arguments under pane-settings (where it says "Additional arguments to send to the view..."), and it is this argument doesn't get send at all - it did before upgrading.

jakobdo’s picture

I have tried to use the hotfix and the problem is still there.

Upchuk’s picture

I also confirm that the number #12 solution worked for me.

Thanks!

very_random_man’s picture

Hi. I think I may be encountering this problem. I have a content pane view that receives two arguments. One is optional and from context and the other is defined in pane settings. Even though the View object contains this argument it doesn't seem to be applied. The View works fine when previewed in Views UI.

The weird thing is that it works as expected if I use legitimate multiple values for the argument! e.g. Use "type_1,type_2" and I get view results with both types but just "type_1" and it fails. If I try to fake the conditions when it worked by using a dummy argument or a content type that doesn't have any content, it fails.

I've tried various combinations of tests (removing the context, making the context mandatory, accepting single value argument, trying dummy arguments) but it just doesn't work with a single text-based argument entered on the pane settings.

Edit: Forgot to mention some things. I tried the patch but it didn't work. I tried following the instructions in #12 but that didn't work either although to be fair I couldn't find the options for 'set these appropriately'. Where are they? ;-)

thanks!

Webbeh’s picture

very_random_man, you should be setting the context for your argument to match the data type your argument is.

i.e. if your argument is a Node ID, set the context for the argument passing to be a Node ID.

Proteo’s picture

In my case the solution posted in #12 didn't work, but the patch in #9 definitively fixed the problem. I'm wondering what's the status of this, does have that patch any chance to be commited?

bkonetzny’s picture

Patch from #9 also fixes the issue for us (Panel node + View as Pane).

lex0r’s picture

Hey,
you forgot to close this critical issue! The fix is already in 7.x-1.5. I'm not closing the task, since I'm not an active maintainer.

heddn’s picture

Status: Active » Fixed

The changes in #8 are in the code base.

Status: Fixed » Closed (fixed)

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