Closed 4external closed 1 month ago
please correct me if I'm wrong, but if follow the code
at first time when page with Global opened in admin
createGlobalBeforeReadHook
executed and create doc by initGlobal
func in collection with initial values (here some bug with required fields without values)
when user input new values and click Save button
createGlobalBeforeChangeHook
executed where getGlobal
func return already existed doc (from step 1), so there is no branch for storing new values from data to existed doc.
Hi!
I create new "blank" instance of payload with this plugin. Also create shared global "Settings".
In admin panel user can create shared global "Settings" record, successfully save it to DB(Mongo), but than user cannot change value of this global. In dev panel in browser I see that new values POST-ed to server, but server response old values.