Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#9 | fix-panel-arguments-to-views-2198447-8.patch | 740 bytes | PJnes |
Comments
Comment #1
checker CreditAttribution: checker commentedThis 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.
Comment #2
pierrozone CreditAttribution: pierrozone commented@ Checker, can you please elaborate on your comment? And also can you confirm that it doesn't break things in other places?
Thanks
Pierre
Comment #3
pierrozone CreditAttribution: pierrozone commentedI reversed the patch as suggested by Checker and it worked for me.
Comment #4
Freaka CreditAttribution: Freaka commentedHi,
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
Comment #5
checker CreditAttribution: checker commented@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.
Comment #6
enekoalonso CreditAttribution: enekoalonso commentedI 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.
Comment #7
enekoalonso CreditAttribution: enekoalonso commentedI can now confirm that the code change pointed by @checker is the root cause of this issue. Reverting that code change fixes the problem.
Comment #8
maximpodorov CreditAttribution: maximpodorov commentedSetting the priority to critical, since the problem can lead to data corruption and security problems.
The duplicate of this issue: #2196197: Send Arguments: //%1
Comment #9
PJnes CreditAttribution: PJnes commentedAttaching a patch that reverts the previous patch, for those of us using drush make.
Comment #10
mracidtwitch CreditAttribution: mracidtwitch commentedPer 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
Comment #11
japerryFixed.. 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
Comment #12
WebbehI'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.
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.
Comment #13
WebbehMarking this as 'Active' to see if anyone can test this, given the issue outlined in the previous options.
Comment #14
Volker23 CreditAttribution: Volker23 commentedThe 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.
Comment #15
Volker23 CreditAttribution: Volker23 commentedOk, 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...
Comment #16
WebbehThanks 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.
Comment #17
James A CreditAttribution: James A commentedSorry 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
Comment #18
andersiversen CreditAttribution: andersiversen commentedI 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.
Comment #19
jakobdo CreditAttribution: jakobdo commentedI have tried to use the hotfix and the problem is still there.
Comment #20
Upchuk CreditAttribution: Upchuk commentedI also confirm that the number #12 solution worked for me.
Thanks!
Comment #21
very_random_man CreditAttribution: very_random_man commentedHi. 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!
Comment #22
Webbehvery_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.
Comment #23
Proteo CreditAttribution: Proteo commentedIn 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?
Comment #24
bkonetzny CreditAttribution: bkonetzny commentedPatch from #9 also fixes the issue for us (Panel node + View as Pane).
Comment #25
lex0r CreditAttribution: lex0r commentedHey,
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.
Comment #26
heddnThe changes in #8 are in the code base.