Hello @Developers!
Conversation in the <#811676497965613117> room raised attention of an issue with preCreate hooks which needed to be corrected. This is an unfortunate, last-minute breaking change. The preCreate hook for Documents in 0.8.3 was incorrectly receiving the fully expanded DocumentData rather than the expected initial data object (usually just a name and a type, though folder can also be included).
What does this mean
With the prior version of the
preCreate(Document)
Hook, this was a functional example:
After this change, you will need to wrap your changes in an update call:
We're sorry this wasn't caught in alpha testing, but this change is necessary as the implications of this are far-reaching. I know that this may catch some of you who have already updated for 0.8.x unawares and may require you to implement changes, but hopefully the change is incredibly trivial to make. The full details of this are outlined here: https://gitlab.com/foundrynet/foundryvtt/-/issues/5126
If you have any questions regarding this or other update issues, we are glad to assist in #08x-dev-supportGitLab
The preCreate{DocumentName} hook was incorrectly being provided wit...
The intended design of the _preCreate{DocumentName} hook is to provide the hooked function with the following arguments:
0 Replies