# Collection not updated

**URL:** <https://discourse.getcockpit.com/t/collection-not-updated/1805>\
**Category:** Support\
**Created:** [January 26, 2021, 9:40am UTC](https://discourse.getcockpit.com/t/collection-not-updated/1805 "2021-01-26T09:40:30Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [January 28, 2021, 2:34pm UTC](https://discourse.getcockpit.com/t/collection-not-updated/1805/4 "2021-01-28T14:34:18Z")

</div>

To clarify…

1. Did you change an entry and the api doesn’t recognize the change?
2. Or did you change the field definitions, e. g. a field name?

If 1, my only guess would have been the moderation addon.  
If 2, see some related issues:

> [@Remove Collection Field data from Entry when Field is deleted?](https://discourse.getcockpit.com/t/remove-collection-field-data-from-entry-when-field-is-deleted/1760):
>
> I noticed that the api is returning data from deleted fields. In the example below, I created a field called DELETE\_TEST\_DATA, updated it, then deleted the field. I’m curious if there is a way to remove the data once the field is removed. This could be a security issue. Edit: This also happens if you rename a field. Is there a way to prune the collections to only store the active fields? { "fields": { "title": { "name": "title", "type": "text", "localize": false, "options": { …

> [@Unique id for collection fields to keep track of renamed or deleted fields](https://discourse.getcockpit.com/t/unique-id-for-collection-fields-to-keep-track-of-renamed-or-deleted-fields/304):
>
> Renaming or deleting a field of a collection doesn’t change existing entries and their values get fetched with each api call. There are a few issues ([#775](https://github.com/agentejo/cockpit/issues/775), [#843](https://github.com/agentejo/cockpit/issues/843) and [#821](https://github.com/agentejo/cockpit/issues/821)) and a [support question](https://discourse.getcockpit.com/t/api-returns-fields-that-have-been-removed-from-collection/150) about this topic. I thought about it again and I think I found a solution. Revisions for collections would be a nice feature, but it would still work without revisions. Each field just needs a unique id and we need a trigger before the collection is updated [here](https://github.com/agentejo/cockpit/blob/next/modules/Collections/bootstrap.php#L61) $this-\>app-\>trigger('collections.update…

If not 1 or 2, please provide some steps to reproduce.

---

_[View the full topic](https://discourse.getcockpit.com/t/collection-not-updated/1805)._
