Block view of content with a date field with filter Date > now never updates block for anon users. Thought it was an issue with site so went back to basics > fresh D813 site > added date field to article content > created 3 dated nodes todays date (mo
20:45, 21:00, 21:15
Performance > no cache, View > advanced > cache none.
I show the time field as time ago to show it never updates
The result can be seen at
http://demo3.leafclub.org
I have used this time of Block many times in D7 with no issue and now my first 2 D8 sites seem to have the same problem
Any guidance appreciated ar maybe a known bug?

CommentFileSizeAuthor
#19 Dated view as ADMIN.jpg85.25 KBthatdanceguy
#18 dated-view.png100.6 KBwebsmithc
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

artatac created an issue. See original summary.

artatac’s picture

BTW if I log on (user 1) and go to the page it automatically updates - proving the view itself is configured correctly

artatac’s picture

Issue summary: View changes
artatac’s picture

Priority: Normal » Major
artatac’s picture

bump..please

artatac’s picture

really surprised that no one wants to comment on this - either i am wrong and would value the community feedback or am right and moving to current d8 is a major setback in this regard

roaldumandal’s picture

This happens to me too, even though I turn off views block caching, it still cache the block for anon users

artatac’s picture

Glad it's not just me - let's hope that this is sorted asap

roaldumandal’s picture

Yeah I wish that too,hopefully have time checking it again this weekend and will try to help fixing it,

jonathanshaw’s picture

Is this for block displays only? Does it apply when you filter on time values other than 'Now'?

Are you sure this is specific to time filtering at all? This issue may be a duplicate of #2708485: Views Row caching still caches rows when cache plugin is 'none', which is fixed after D8.1.3

Lendude’s picture

I tried to reproduce this and could. Just not sure if this is a bug or a feature of page_cache.

Since the page_cache module stores the entire page and invalidates the entire page as one (not per block like dynamic page cache), having no-cache on this block would basically mean having no-cache on any page that has this block. So you might as well turn of page_cache and rely on dynamic_page_cache.

Btw the content updates fine is there is a hit on any of the cache tags for the block (an update of a node for example), it just doesn't update based on time.

artatac’s picture

I wonder if this has been sorted. Will update to the latest versions of d8 and relevant modules and will report back

artatac’s picture

Still not working in Drupal 8.25 see http://leafclub.org/slideshow > upcoming events - you will note that the time hence never changes :-(

Lendude’s picture

@artatac have you tried switching the cache settings for the View to time-based and setting both options to '1 minute' or 'never'?

artatac’s picture

Thanks Lendude please clarify both settings. currently in the view > advanced settings > cache is set to never and in admin > performance caching is turned off. I am however having some success with cleaner module, clearing ALL cache ever 15 mins but feels very heavy handed

ba_smith’s picture

@artatac so just to make sure we understand the issue correctly.

An anon user is on the site.

There's x # of events

and the date on the event is d/m/y

the block is setup that it sorts by date > today

if a new event is added the block does not update with that new event?

Or the date doesn't change?

"block view of content with a date field with filter Date > now never updates block for anon users."

thatdanceguy’s picture

Steps to reproduce.

I expect to see views change for all users.

  1. I just made an 8.4 site.
  2. I made a basic Content Type with a Date.
  3. I made a view and a block. I sorted by date and filtered by Date > now.
  4. I put it in the main content display.
  5. I had two computers standing by that were ANONYMOUS USERS, while I stayed logged in as an admin on the same system that I'd just used to create the sandbox.
  6. They could see the content; I could see the content.
  7. I made a bunch of content entries and set their dates at five minute intervals.
  8. The first one dropped as expected but thereafter they failed to update on the anonymous users.

In fact I see views change only for my user.

#fldc17

websmithc’s picture

FileSize
100.6 KB

The anonymous view of @thedanceguy 's steps to reproduce

thatdanceguy’s picture

FileSize
85.25 KB
thatdanceguy’s picture

Steps to reproduce.

I expect to see views change for all users.

  1. I just made an 8.4 site.
  2. I made a basic Content Type with a Date.
  3. I made a view and a block. I sorted by date and filtered by Date > now.
  4. I put it in the main content display.
  5. I had two computers standing by that were ANONYMOUS USERS, while I stayed logged in as an admin on the same system that I'd just used to create the sandbox.
  6. They could see the content; I could see the content.
  7. I made a bunch of content entries and set their dates at five minute intervals.
  8. The first one dropped as expected but thereafter they failed to update on the anonymous users.

In fact I see views change only for my user.

Ky1eT’s picture

Issue tags: +FLDC17
Gravypower’s picture

Have a problem that fits this issue and wanted to share my workaround in case it helps anyone.

On my site I have a list of nodes of type x that are ordered by a date field very similar to what others describe above, when a new node is added the list does not update for the anonymous user. Digging through the code it seems like the page cache was getting in the way also touched on above.

To work around this issue I have leveraged the rules module and created a rule that subscribes to the publish event of type x on top of that I created a new action (patch here) that will invalidate a cache tag(s).

Basically I set the rule to invalidate the tag of the page where my view was hosted.

  1. Add new rule
  2. Add a new Node is published Condition( Data selector set to "node")
  3. Add a new Node is of type Condition ( Data selector set to "node", CONTENT TYPES set to "your node type")
  4. Add Action: Cache Tag Invalidator (CACHE TAG(S) TO INVALIDATE set to "the cache tag for the page that hosts your view")

I hope this helps someone.

Aaron

artatac’s picture

Ref #16
If you add a new event it DOES appear. However as the days pass and some listed events are now in the past they DONT dissapear for anon users

Lendude’s picture

Berdir’s picture

Yes, that issue will fix this as page cache will then respect the max age set by the view.

jonathanshaw’s picture

Status: Active » Closed (duplicate)