Steps to reproduce

Render something (e.g. a teaser in a list somewhere

Change the CE display

Reload the thing. Content should be changed.

Note

I haven't doublechecked whether it's something in our distribution, but I suspect not. I suspect CustomElementGenerator just needs to add the CE display config entity as cacheable dependency.

Just adding this issue here now to get the list complete.

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

roderik created an issue. See original summary.

junkuncz’s picture

Assigned: Unassigned » junkuncz
Status: Active » Needs work

junkuncz’s picture

Assigned: junkuncz » Unassigned
Status: Needs work » Needs review
roderik’s picture

Great, thanks for testing / fixing!

I'm also adding it inside the "else" of buildEntityContent(), where the CE display is disabled. Because when it is enabled again, the same cache tags should be cleared.

But I can do that at the same time as a quick test.

roderik’s picture

Two things:

1. My previous comment was dumb. In the "else", there IS no CE display, so you also cannot add it.

2. This is incomplete.

  • Suppose you build a list of stuff in "teaser" view mode -- and the "teaser" CE display is not enabled, so it's using the default CE display.
  • If this default CE display is edited, then caches for this list should be flushed. OK.
  • If the "teaser" CE display is created/saved, then caches for this list should also be flushed, because they should be rebuilt with the new display. This did not happen yet.

So, cache tags should be added for both cases.

I figured it would be better to do this instead of setting needs work. Please review current status.

junkuncz’s picture

Status: Needs review » Reviewed & tested by the community

Works well, good to go!

  • roderik committed 8f6d8679 on 3.x authored by junkuncz
    Issue #3468371 by junkuncz, roderik: Old content is cached after...
roderik’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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