Problem/Motivation

Currently I am using the quicktab module with two view tabs. Each one is calling a block view showing a list of a certain content type. When a new content is created, the view itself is updated (using the preview) but the webpage with the quicktabs and the views does not.

Cause

The quicktab render array with the 2 tabs does not use a cache so when a new content is created the view is updated but the quicktab render array does not.

Proposed resolution

I created a patch invalidating the cache of the quicktabs render array. I think there is gotta be another way to improve this solution.

Suggestions welcome ;)

Issue fork quicktabs-2979578

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

amarincolas created an issue. See original summary.

amarincolas’s picture

StatusFileSize
new486 bytes
amarincolas’s picture

amarincolas’s picture

StatusFileSize
new386 bytes
awasson’s picture

Has there been any movement on this issue?

I think this may be related to an issue I am having with 3 tabs in View based Block.

The Tabs are rendered in a view that depends on a Contextual Filter (Paragraph: Parent ID) to render and is placed on the page content in a block.

Right out of the gate it works well and has for the last year but we noticed a problem. If we update the tab content, the changes do not show up in the rendered view. They do show up during editing but not when rendered.

shelane’s picture

I would like to get this into ViewContent and NodeContent somehow. First, the proposed page is a renderer style. So any other style would also have to add this, which includes modules outside of this one. I think if it can be done in the TabTypes, that would make most sense. I will continue to look into this.

smustgrave’s picture

Version: 8.x-3.x-dev » 4.0.x-dev
Priority: Major » Normal

mradcliffe made their first commit to this issue’s fork.

joelpittet’s picture

Status: Active » Needs review

Reviewed this after the recent #3408869: drupal_flush_all_caches is problematic cache work.

I do not think #3408869: drupal_flush_all_caches is problematic fully fixes this issue, since it covers QuickTabs instance config changes and derived block discovery.

For this report, #3390465: Cache metadata of individual blocks are not taken into account when rendering blocks in quicktabs seems more directly related. It fixed cache metadata bubbling from blocks rendered inside QuickTabs, which should cover Views blocks in tabs so new matching content invalidates the rendered output through normal cache tags.

I'll see if I can get some tests to show if it's fixing this or not before closing as a duplicate however.

joelpittet’s picture

Status: Needs review » Fixed

Thanks everyone who helped move this along.

I reviewed this against the current 4.x code and added regression coverage for the reported case: a QuickTabs block with a Views block tab that starts empty, then shows new matching content after it is created.

This appears to be covered by the cache metadata work from #3390465: Cache metadata of individual blocks are not taken into account when rendering blocks in quicktabs, which preserves cacheability from blocks rendered inside QuickTabs. Since Views blocks provide the relevant cache tags, the cached QuickTabs output now invalidates correctly.

Closing this as fixed by that, with test coverage added here to confirm the original scenario.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.