Using ajax only the first tab is loaded. Clicking on the other tabs there is a text saying content is loading, but then replaced by nothing. Enabling "Use Ajax" within each view does not change it unlike same issue for D7.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Waen created an issue. See original summary.

SocialNicheGuru’s picture

I get this . In addition I get the following JS errors:

VM39609:9 Uncaught ReferenceError: TL is not defined
    at <anonymous>:9:29
    at Array.forEach (<anonymous>)
    at <anonymous>:7:29
    at <anonymous>:13:3
    at p (jquery.min.js?v=3.2.1:2)
    at Function.globalEval (jquery.min.js?v=3.2.1:2)
    at text script (jquery.min.js?v=3.2.1:4)
    at Qb (jquery.min.js?v=3.2.1:4)
    at A (jquery.min.js?v=3.2.1:4)
    at XMLHttpRequest.<anonymous> (jquery.min.js?v=3.2.1:4)
(anonymous) @ VM39609:9
(anonymous) @ VM39609:7
(anonymous) @ VM39609:13
p @ jquery.min.js?v=3.2.1:2
globalEval @ jquery.min.js?v=3.2.1:2
text script @ jquery.min.js?v=3.2.1:4
Qb @ jquery.min.js?v=3.2.1:4
A @ jquery.min.js?v=3.2.1:4
(anonymous) @ jquery.min.js?v=3.2.1:4
(anonymous) @ VM39435:1
send @ jquery.min.js?v=3.2.1:4
ajax @ jquery.min.js?v=3.2.1:4
r._evalUrl @ jquery.min.js?v=3.2.1:4
Ja @ jquery.min.js?v=3.2.1:3
append @ jquery.min.js?v=3.2.1:3
insert @ ajax.js?v=8.4.4:498
Drupal.Ajax.success @ ajax.js?p2tosc:155
bigPipeProcessPlaceholderReplacement @ big_pipe.js?v=8.4.4:26
each @ jquery.min.js?v=3.2.1:2
each @ jquery.min.js?v=3.2.1:2
bigPipeProcessDocument @ big_pipe.js?v=8.4.4:36
(anonymous) @ big_pipe.js?v=8.4.4:50
setTimeout (async)
bigPipeProcess @ big_pipe.js?v=8.4.4:49
(anonymous) @ big_pipe.js?v=8.4.4:60
(anonymous) @ big_pipe.js?v=8.4.4:68

VM39435:1 POST https://mysite.com/quicktabs/ajax/sng_event_group/1?_wrapper_format=drupal_ajax 500 (500 Service unavailable (with message))
(anonymous) @ VM39435:1
send @ jquery.min.js?v=3.2.1:4
ajax @ jquery.min.js?v=3.2.1:4
Drupal.Ajax.eventResponse @ VM39604:111
(anonymous) @ ajax.js?v=8.4.4:255
dispatch @ jquery.min.js?v=3.2.1:3
q.handle @ jquery.min.js?v=3.2.1:3
ajax.js?v=8.4.4:472 Uncaught Drupal.AjaxError {message: "↵An AJAX HTTP error occurred.↵HTTP Result Code: 50…ered an unexpected error. Please try again later.", name: "AjaxError"}

In my logs I get the following quicktabs error:

Uncaught PHP Exception LogicException: "The render array has not yet been rendered, hence not all attachments have been collected yet." at drupal-8.4.4/html/core/lib/Drupal/Core/Asset/AttachedAssets.php line 36
Bala.addweb’s picture

FileSize
28.37 KB
35.24 KB

I do the same but it works fine for me. PFA screenshots.

AndKar’s picture

I 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.

marassa’s picture

FileSize
12.48 KB

Please 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.

shelane’s picture

Firnas’s picture

When 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

Firnas’s picture

FYI..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.

Meerachandran’s picture

I 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.

jukka792’s picture

I 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.

VasiliyRepin’s picture

I 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!

jukka792’s picture

I 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.

lubwn’s picture

Yeah 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.

plague’s picture

FileSize
43.1 KB

I 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".

views settings