token-mold
token-mold copied to clipboard
[BUG] Cannot read properties of undefined (reading 'prof')
Describe the bug
Just loading the app with some module cause incompatibility issue with an error : Cannot read properties of undefined (reading 'prof')
I found the error the first time with foundryvtt-link-item-resource-5e and send a correction in his repo. Now the incompatibility is with dae
I think the correction for everyone is simple. In _getBarAttributes
, do you really need to create a dummy objet of type base
?
full log
DAEdnd5e.js:1001 Could not prepare data tmp TypeError: Cannot read properties of undefined (reading 'prof')
at Actor5e.getRollData (actor.mjs:204:56)
at 🎁call_wrapped [as call_wrapped] (libWrapper-wrapper.js:507:22)
at Actor5e.getRollData (DAESystem.js:167:12)
at Actor5e.getRollData (DAEdnd5e.js:903:56)
at 🎁call_wrapper [as call_wrapper] (libWrapper-wrapper.js:616:16)
at Actor5e.actorGetRollData (patching.js:1960:15)
at 🎁call_wrapper [as call_wrapper] (libWrapper-wrapper.js:616:16)
at 🎁CONFIG.Actor.documentClass.prototype.getRollData#0 (libWrapper-wrapper.js:189:20)
at 🎁call_wrapped [as call_wrapped] (libWrapper-wrapper.js:507:22)
at Actor5e.getRollData (summons-actor.mjs:253:22)
at 🎁call_wrapper [as call_wrapper] (libWrapper-wrapper.js:616:16)
at 🎁Actor.implementation.prototype.getRollData#0 (libWrapper-wrapper.js:189:20)
at Actor5e.prepareData (DAEdnd5e.js:978:31)
at 🎁call_wrapper [as call_wrapper] (libWrapper-wrapper.js:616:16)
at Actor5e.actorPrepareData (patching.js:863:3)
at 🎁call_wrapper [as call_wrapper] (libWrapper-wrapper.js:616:16)
at 🎁CONFIG.Actor.documentClass.prototype.prepareData#0 (libWrapper-wrapper.js:189:20)
at Actor5e.prepareData (automation.mjs:159:19)
at Actor5e._safePrepareData (foundry.js:14187:14)
at Actor5e._initialize (foundry.js:14015:19)
at new DataModel (commons.js:6919:12)
at new Document (commons.js:7583:3)
at new BaseActor (commons.js:9244:3)
at new ClientDocumentMixin (foundry.js:13979:7)
at new Actor (foundry.js:18605:1)
at new <anonymous> (mixin.mjs:6:44)
at new Actor5e (actor.mjs:13:16)
at new Actor5e (automation.mjs:156:34)
at TokenMold._getBarAttributes (token-mold.js:948:9)
at Object.fn (token-mold.js:89:39)
at #call (foundry.js:730:20)
at Hooks.callAll (foundry.js:687:17)
at Game.setupGame (foundry.js:8746:11)
at async Game._initializeGameView (foundry.js:9990:5)
at async Game.initialize (foundry.js:8650:5)
Desktop (please complete the following information):
- OS: Widows WSL
- Browser Edge
- FVTT Version 315
- System: DnD2e 2.4.1
- Module versions
- Tokenmold 2.20.3
- dae 11.1.11
Also have similar problem related to creation of dummy actor.
This doesn't seem to be an issue that impacts anything as the exception is caught. Token mold appears to be functioning fine.
Some more research tells me that no, it does not need to create a type base
for this to work. I'll get that into a future v12 update.
Fixed for Foundry v12 in latest version. See issue: https://github.com/Moerill/token-mold/issues/204