Lifecycle and components inside collections type

Is it possible to update components that are in collection type every time that collection type is updated? I was thinking to use beforeUpdate lifecycle hook, but it doesn’t have data from components only data from collection type. And if i use extra function and update collection type that way i would trigger infinite loop with lifecycle hook.

Anyone have some idea what to do?

It was possible in v3. There is similar confirmed issue #11980

Hello @Igor_Abramov,

yea i know it was possible in v3, but issue you mention is for adding new repeatable component with api. Im trying to manipulate with existing data inside lifecycle hook.

2 Likes

I am also trying to set a field of an component thats inside of an dynamic zone but i dont see the data.
I only see “id”, “__component”(which is the component type) and “__pivot”.

Hello @WardenCommander, Did you find a solution for this issue?

If yes, can you please share it?

I use 2 collection type

1 Like