Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.I´m trying to figure out how open flag lists, with public create permission, can impact the content type manage display field list or general operations with content type fields can be impacted.
Is safe to the system if a lot of flag lists is created, like 5000 or more?
Thank you for all work.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | How_a_lot_of_lists_can_impact_the_content_type_fields_opertions-3155292-11.patch | 7.57 KB | sl27257 |
Comments
Comment #2
sl27257Hi,
I am not sure I fully understand your question...
If you elaborate a little maybe I will be able to give you a better answer.
The problem that I can see is that if you choose a lot of lists you need to make sure that they will not be added to every entity. I have not tried it yet but it should be possible by selecting that the link for the flagging has to be manually placed somewhere.
But if you give an example it should be easier for me to give a better answer...
Comment #3
sl27257This simple patch might solve a part of the problem I described above.
#3162503: Don't show all Flagging Collections for accounts with view all privilege.
Comment #4
sl27257Also this might be of interest for you:
#3167456: Enhance the Flag list overview
Comment #5
sl27257Comment #6
gcalex5 commentedWould like to expand upon this a little more to see if you can provide more insight:
Now let's say that we have an active site where the users have created 5k+ Collections based on this Flag List setup. All of those options are going to show up under Structure -> Content Type "X" -> Manage Display.
Is there any way to prevent that and just have the Template "Y" entry show up in the "Manage Display" area instead of spamming the form with every user-generated list?
It seems to me like that should be another "hide" option under "/admin/config/flag_lists" potentially?
Comment #7
sl27257My original idea was to remove all but the templates and use that as *** the *** position for where to place the flag_lists. But for doing it like that, I have found no easy solution. The easiest way to put the flag_lists at a different position is via the twig.
But as you state, maybe just to remove everything except the templates would be easier? Let me look into it...
Comment #8
sl27257Comment #9
sl27257This is a first attempt to remove the sometimes huge number of entries in the Content Type Manage Display forms. There is a problem with caching though that I need to look further into.
Comment #10
sl27257An updated patch. This time with "cacheTags" added. Note that there are only specific "cacheTags" for node-entities. However the generic tag is there. The cache update doesn't work despite the tags so for a update of the views a clear cache is still needed...
The removal of the flag list entries should work for all type of entities, not only nodes. I have tested it with media entities and there it works.
Comment #11
sl27257A patch towards the correct base (-dev)
Comment #13
sl27257The committed version in #11 only invalidates the cache using the generic cache tag. The invalidating is working according to what is stated in the Cache API.