Closed (fixed)
Project:
Quick Tabs
Version:
4.0.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Nov 2017 at 18:10 UTC
Updated:
6 Jul 2026 at 23:35 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
socialnicheguru commentedI get this . In addition I get the following JS errors:
In my logs I get the following quicktabs error:
Comment #3
bala.addweb commentedI do the same but it works fine for me. PFA screenshots.
Comment #4
andkar commentedI experience the same problem with views that take a argument.
For me it works to load views with ajax if the view doesn’t use arguments.
Comment #5
marassa commentedPlease try the following:
1. Install the patch from here: https://www.drupal.org/project/quicktabs/issues/2873253
2. Make sure you specify your arguments in the quicktab setup (see screenshot). Keep in mind that the first argument (like '333' in '/node/333') will be %2 (don't ask me why:).
3. Flush the cache.
Comment #6
shelaneComment #7
firnas commentedWhen the ajax request for loading a new tab is made, I can notice the following error in the db log:
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "path.alias_manager". Did you mean this: "path_alias.manager"? in Drupal\Component\DependencyInjection\Container->get() (line 151 of /opt/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php).
I noticed this is mentioned in (quicktabs/src/Plugin/TabType/ViewContent.php) line 89
Comment #8
firnas commentedFYI..I was using 8.x-3.0-alpha4 when I posted my earlier comment .. now I can see this is resolved in dev version 8.x-3.x-dev.. and it works fine for me now.
Comment #9
meerachandran commentedI am using the latest dev version, and my views have contextual filter, and turned ajax on. The seond view block is not loading when using ajax inside quicktab.
Comment #10
jukka792 commentedI have also the latest dev, and the quick tabs are only showing the first tab when ajax is enabled.
When the ajax is disabled in the quictabs settings, the tabs are showing content.
All of the tabs have views with same argument, and all views have ajax enabled.
In the html source I see only "Loading content ..."
I have content: /group/33/ so the argument is %2, but this argument is not needed when ajax is not used.
Comment #11
vasiliyrepin commentedI have at the same problem.
I have also Version:
8.x-3.x-dev, and the quick tabs are only showing the first tab when ajax is enabled.
When the ajax is disabled in the quictabs settings, the tabs are showing content.
All of the tabs have views with same argument, and all views have ajax enabled. And I made this Views as block and choosen in QT setting without arguments - There are no changes, ajax not works.
I have content: /taxonomy/term/1/ so the argument is %3, but this argument is not needed when ajax is not used.
And my View has contextual filter "Content has Taxonomy Term id from url"! Thanks to my View I have content category system,
/taxonomy/term/1/ will contain Quick Tabs and QT must displays some entities.
It's basic functionality in my opinion, but ajax not works(((
P.S. Thank you very much for this module!
Comment #12
jukka792 commentedI have still the same problem, but now I found out that it depends what kind of views argument you are using.
If the argument is for example "get User ID from the logged in user", then the quictabs is working with ajax, all the tabs are loading.
But when the argument in the views is "take raw value from URL" and putting anything to quicktabs arguments like %1 or arg1 it
does not load the second tab. So in my case the argument is the User ID from the URL, not the logged in user ID " /user/34 "
So again, if I change the views getting the ID from logged in user, the second tab is shown.
Comment #13
lubwn commentedYeah I can confirm this is still an issue. Solved it by disabling ajax for quick tabs so my views can take arguments from URL. Kind of a bummer but it works.
Comment #14
plague commentedI faced the same problem with static arguments in quicktabs. It depends on setting of Contextual Filter in Views Display. Try to change option "When the filter value is NOT available" on "Display all results for the specified field".
It appears because this line https://git.drupalcode.org/project/quicktabs/-/blob/8.x-3.x/src/Plugin/T... return empty result when you chose not a "Display all results for the specified field".
Comment #15
smustgrave commentedComment #16
smustgrave commentedWonder if this is still an issue? Not seeing it in latest version.
Comment #17
dcam commented@smustgrave I'm experiencing the issue with quicktabs version 4.0.1.
I have a set of tabs. Each tab contains a view. All views have a contextual filter on the content ID from the URL.
If I set the tabs to load all tabs on page view, then there's no problem.
If I set the tabs to only load the first tab on page view, then click on another tab, no content is loaded. I can see the "Loading content..." message pop up briefly, but it's replaced with nothing. The
tabpageDIV remains empty.Supplying the tab with an argument doesn't fix the problem. I wondered if that's because I have path aliases set for all these pages, but it doesn't sound like it fixes the problem for unaliased pages.
For a while it didn't bother me because I set the tabs to all load with the page. But we've been experiencing performance problems with this site, so I tried to set them to load with AJAX. That led me here.
Comment #18
thatguy commentedI couldn't figure out the exact issue but seemed to be something with setting the arguments. I dropped the use of views_get_view_result-function and just setArguments and ran other view functions in the ViewContent class render-function and seemed to fix the issue for me. For Quicktabs configuration I used %2 as the arguments for my "Content: ID" contextual filter with "Content ID from url" as the default value.
Comment #19
thatguy commentedComment #20
smustgrave commentedThanks but issues should be in MRs not patches
Comment #22
ramil g commentedI tested patch #18 from thatguy and it seems to work. I created an mr for it. I'm changing that status to Needs Review.
Edit: I did not test it properly so I'm going to take what I said back. I will confirm whether or not it works after I do a better job of testing.
Comment #23
ramil g commentedAfter further review, it seems that #18 doesn't in fact solve the issue.
Comment #26
joelpittetA note on the non-test changes, since the thread already covers the symptom.
The old code recovered the source page path from the referrer, but only used it for Quick Tabs' own
%1,%2replacement. That handles static args but misses Views contextual defaults like "Raw value from URL," which read from the View's request, not the Quick Tabs config. During an AJAX callback that request still points at/quicktabs/ajax/..., so they resolve against the wrong path and the tab comes back empty.The fix hands the View a request that matches the source page:
The session is copied because the render path can expect one. Same idea as core Views AJAX, which carries
view_paththrough the request and restores it before rendering.The rest is tidying:
getSourcePath()andisAjaxRequest()just pull existing logic into named helpers, and theinstanceof ViewExecutablecheck moved ahead ofaccess()so we don't callaccess()on a failedViews::getView().Comment #27
joelpittetOne thing I'd like input on before building it.
This fix leans on the referrer, because Quick Tabs AJAX links carry no explicit source path. A sturdier approach would pass that path through
drupalSettingsor AJAX link metadata, the way core Views handlesview_path. That's a bigger change, so I kept it out of this MR for now.Before I take it on: does relying on the referrer break anything in your setup, or is the metadata route worth the extra work? Given the age of this one, I'd rather hear from you all than guess.
AI disclosure: used AI to do some heavy lifting, especially around the tests. I read and understand the changes and steered it in a few different directions before landing on the MR changes described in comment #26.
Comment #28
joelpittetIf anybody is interested in the
view_pathsolution let me know. We can spin up a separate issue targetting that.Thanks everyone for the reports, debugging notes, patches, and testing over the years. The fix is merged now; it should handle AJAX-loaded Quick Tabs views that rely on URL-derived contextual filters. Special thanks to the folks who narrowed this down to Views arguments/contextual filters and helped test earlier approaches.
Comment #31
joelpittetramil g, showed me the not working state, when the arguments are not filled. I will create a follow-up #3605596: Quick Tabs AJAX does not load Views using current node contextual filter