- πͺπΈSpain cbccharlie
Hello,
The current patch causes the title to be displayed even though the view has no results.
Wouldn't it be enough to return the cache tags when the view has no results instead of rendering it anyway?
I upload a new patch doing it this way.
Thanks!
- πΊπΈUnited States SocialNicheGuru
The following patches all conflict and work on the same issue and piece of code:
π ViewsReferenceFieldFormatter does not check for headers set to show on empty. Fixed
π ViewsReferenceFieldFormatter does not render view if it has no results Fixed
π View without empty handling could break caching Needs review - π³π±Netherlands seanB Netherlands
A fix for this has been added in π Viewsreference embeds Views without cache, breaking Dynamic page cache Fixed . Could you please check the latest dev version and let me know if this issue has been resolved?
- πΊπΈUnited States SocialNicheGuru
so should this be closed as a dupe of π Viewsreference embeds Views without cache, breaking Dynamic page cache Fixed ?
- First commit to issue fork.
- Merge request !40Respect the cache settings of the View in non-lazy builder formatter β (Open) created by scott_euser
- last update
11 months ago 1 pass - Status changed to Needs review
11 months ago 11:11am 4 January 2024 - π¬π§United Kingdom scott_euser
Since the existing of the 2 formatters now (ViewsReferenceLazyFieldFormatter and ViewsReferenceFieldFormatter) this is still an issue for the latter. I have created a Merge Request and hidden the patches. The original patch only handles cache tags, but actually the full cache settings of the View should be respected. For example, when using a Search API SOLR View, if there is an exception thrown, max-age is set to 0 so next load attempts again to contact SOLR - the formatter should respect that.
So I was able to reproduce this by
- Creating a View that uses Search API / Search API SOLR
- Causing an issue with SOLR so an exception is thrown at here
- Load the node with the Views Reference field - no results as expected
- Fix SOLR issue
- Load the node with the Views Reference field - no results still, since the earlier load has cached this
- last update
9 months ago 1 pass - πΊπΈUnited States joegraduate Arizona, USA
Applying the diff from @scott_euser's MR as a composer patch fixes this issue in my testing.
I'm attaching a static copy here so we can use this on our sites.
- π¬π§United Kingdom scott_euser
Hiding the patch to avoid confusion with merge request (side note: you can download the patch to apply locally as per recommended instructions β )
- π©πͺGermany hchonov πͺπΊπ©πͺπ§π¬
The patch here fixes the issue for me where when accessing the page with a bad / wrong query parameter for the contextual filter with cold caches the page gets cached without the view and then accessing the page again without any query parameter returns again the page without the view instead of showing the view with all available filters.
- 432c0416 committed on 8.x-2.x
Issue #3017716 by scott_euser, cbeier, RecursiveMeta, cbccharlie,...
- 432c0416 committed on 8.x-2.x
- Status changed to Fixed
6 months ago 12:51am 30 May 2024 Automatically closed - issue fixed for 2 weeks with no activity.