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.
This might not really be Quicktabs's fault, but it fails to pass on context when loading a View that gets a default value from the page context in a Panel. The first tab loaded works fine; the rest do not. They all work if ajax is turned off. Has anybody else run into this?
Note: it works fine if I specify %1 as the argument. The problem is that I'd like to load up these views in mini panels, and have the argument provided by the page context - not specifically have to be passed as an argument.
Comment | File | Size | Author |
---|---|---|---|
#12 | QuickMiniPanelsContent.inc_.txt | 4.75 KB | SocialNicheGuru |
#12 | 2008598-quicktabs-mini-panels-optional-contexts.patch | 496 bytes | SocialNicheGuru |
|
Comments
Comment #0.0
Renee S CreditAttribution: Renee S commentedclarification
Comment #1
Renee S CreditAttribution: Renee S commentedSo, I can accomplish what I want to do with panel arguments, and forcing the View context to use them instead of falling back on the default page context. This probably is a pretty esoteric use-case anyway, but might leave it open until somebody weighs in and says it's totally not worth bothering with looking into further. ;)
Comment #2
Renee S CreditAttribution: Renee S commentedComment #2.0
Renee S CreditAttribution: Renee S commentededit
Comment #3
Renee S CreditAttribution: Renee S commentedSo, this problem exists in other tabbing modules, along with a hint at a solution that should work for Quicktabs also: #1944510: Views not receiving arguments from ajax tab
Comment #4
Renee S CreditAttribution: Renee S commentedMaking title clearer.
Comment #5
Renee S CreditAttribution: Renee S commentedeta
Comment #6
suhel.rangnekar CreditAttribution: suhel.rangnekar as a volunteer and at Faichi Solutions Pvt Ltd commentedComment #7
joelpittetComment #8
joelpittetI ended up making a mini panels
QuickContent
It seems all the ajax stuff is passed through as get arguments, so I stole the page_manager's context bits that I needed and serialized them across. (only the plugin and argument are needed to rebuild them on the other side)
then in the
render()
functionNot totally sure if that is the right way to go about fixing this problem of passing context around but it does work.
Here is the full plugin.
Comment #9
joelpittetNo patch, still active.
Comment #10
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedthe code almost works. but I have optional contexts for my mini-panels which means that this code throws WSOD
Comment #11
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedUploading a patch with #8
made changes to include optional required contexts for mini-panels
can't set the contexts from the ui
Comment #12
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedI used git diff but it did not pick up the added file.
I added the file, QuickMiniPanelsContent.inc.txt. Change to QuickMiniPanelsContent.inc and place in sites/all/quicktabs/plugins.
if you can share how to do a recursive git diff to pick up an added file I would appreciate it.
Comment #13
bfuzze9898 CreditAttribution: bfuzze9898 commentedI'm experiencing similar issue, but the above patch seems very specific to panels, whereas the issue is in general context id is not reconciled. To be clear, I have a view-block with a context filter set to get context id from url. By itself, the block renders on a node view page ok. Inside quicktabs with ajax loading enabled ti does not render. I have played around with removing various block dynamics (pager, filters, php, sorts, etc.), but it seems ajax-loading is the issue.
D 7.41 (!yikes)
Comment #14
jasonaaronwood CreditAttribution: jasonaaronwood commentedI also need this to work beyond just a Panels fix.
I'm using it in a block that appears on a node's main content region.
Each Quicktab instance shows a Views Block containing a different list of node titles with Flag links (via the Flag module). One of those blocks is set to ONLY show flagged content. But it only appears after refreshing the page, which defeats the point of Ajax. I need the items to appear via Ajax in the flagged-only block when they're flagged in the other referenced blocks in the other Quicktabs.