- πΊπΈUnited States alphex Atlanta, GA USA
How many of you are on Pantheon?
I've built a few sites in the last year or two who rely on paragraphs HEAVILY for page building, and this symptom crops up every so often.
I'm testing this patch now on a production site, I'll follow up in a few days with any results.
- π«π·France fgm Paris, France
The site on which I had this run on a bare VM, and I could see the issue even on my native mac (no containers involved), so no Pantheon there.
- πΊπΈUnited States alphex Atlanta, GA USA
Updating this ticket.
The patch in #19 hasn't done anything to make this better.
Just last night I got an alert in my page diff monitoring tool that something changed.
The larger red box on this image is a paragraph type that sits on a node.
And has 4 paragraphs inside of it.The alert I got showed that the 4 sub paragraphs had vanished.
The only way to restore things when this happens is to edit the node, and simply change the weight of the elements that are impacted, and hit save.
This clears what ever problem is happening, and makes them show up again. (drush cr does nothing...)
No errors show up in watch dog related to this.
- πΊπΈUnited States vegantriathlete Lakewood, CO
This is an interesting approach to tackling this problem. It's a decent start. Here are the limitations I am seeing:
It makes heavy assumptions about using nodes. The entity references won't necessarily be limited to nodes; they could be to media or terms, for example. So, for media references, the cache tag would not be node:[nid], it would be media:[mid].
It appears to stop at one level and expects that you have a node that references a paragraph that has an entity reference. It's also possible that you could have nested paragraphs that ultimately have an entity reference field.
Finally, associating the cache tags with the node entity will cause the entire node view template to be invalidated. If I understand Drupal's caching and rendering properly, I thought it has the ability to invalidate just part of a page. It would be preferable to have the cache tags tied to the correct element / layer of the render array.
I'm going to continue thinking on this and see what I can do with hook_ENTITY_TYPE_entity_build_defaults_alter.