I am using Drupal 7 and QuickTabs to display some tabs. There is no problem without ajax. But I want to use ajax to have a clean url.

In one tab I am displaying a block which uses the current nid. The current nid is needed to display some fields which I configured in the block.

In another tab I am displaying a view which has the contextual filter 'Content: Nid' with an entity reference. I configured to get content id from url when the filter value is not available in the contextual filter options. The view displays a node with the entity reference. I need to pass the nid for this.

Without ajax the url looks like this:

test.com/category/subcategory?qt-quicktab=0 (for the block)

test.com/category/subcategory?qt-quicktab=1 (for the view)

It works just fine without ajax. With ajax: I always get two empty tabs and the url looks like this

test.com/category/subcategory (which it should be and is good).

Because of this difference, I think that the problem could be that the information form the url is needed in some kind to display the block and view in tabs. I have other tabs which just display a view/block without any special requirements and they are displayed correctly in both cases.

I already cleared the cache / tried other contextual filter options in the view / tried the same configurations in a clean install of drupal.

Edit1: I created the tabs with QuickTabs programmatically in hope that it could solve this, but still the same problem occurs. I changed the filter options (and tried almost any logical alternative) for the view, but then I get no results with/-out ajax.

Edit2: Additionally, I am displaying the block in the normal way in a region and within quicktab. The block gets the nid from the subpage to display the fields. Only quicktab has the problem to show it, although it is the same block...I am still trying to solve all this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.