Closed (fixed)
Project:
Entityqueue
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Jun 2021 at 07:56 UTC
Updated:
5 Apr 2024 at 12:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
pan lee commentedComment #3
bunty badgujar commentedI am getting following error after saving entity queue.
Uncaught PHP Exception InvalidArgumentException: "Field random_field_machine_name is unknown." at core/lib/Drupal/Core/Entity/ContentEntityBase.phpAfter removing "entity_field_info" cache tag issue seems to be resolved.
Comment #4
pan lee commentedthanks for the patch, but I think the patch should not affect the `EntityQueue`, it is ok for config entity
it should be the issue of `EntitySubqueue` getting the cache tag from its `EntityQueue`, just not sure the reason yet
Comment #5
euphoric_mv commentedHello,
We are having an issue with that cache tag,
entity_field_info.We have a website where each page is built by the list of multiple entity_subqueues with nodes list.
If we change the order in one sub-queue, it purges the cache for every entity in all pages, as each entity is tagged with that cache tag. That leads us to load everything from DB on each change in any sub-queue.
From my point of view, the EntityQueue entity type only has settings and doesn't have fields so there is no necessary need for the entity_field_info cache tag.
Here's the reasoning:
I would like to hear what is your opinion about this and can we maybe merge the patch?
Comment #6
amateescu commentedI went through all the old caching issues, and here's a quick summary:
#2645060: Newly added entity queues are not getting listed under relationship in views
Tested this one by removing the
views_datacache tag, and when adding a new queue it shows up correctly in the relationship configuration screen.#2634154: items_target_id in entity_subqueue__items should not be an int
In this one I added the
entity_field_infocache tag to the EntitQueue entity type.. can't really remember the reason so I think it's fine to remove it.#2686623: Empty views cache when queue is updated
Here is where I made subqueues invalidate the parent queue's cache tags. Tested this as well and it's no longer needed because views that have an entity reference relationship now include the
entity_subqueue_listcache tag (see\Drupal\views\Plugin\views\cache\CachePluginBase::getCacheTags()), which means cache will be invalidated when a subqueue is updated by editing its items.In short.. Drupal core has gotten way better at cache invalidation in the past 8 years, so all our hacks are no longer needed :)
Comment #8
amateescu commentedA test view had to be updated.
Comment #10
amateescu commentedCommitted to 8.x-1.x!