Moerill / token-mold

MIT License
24 stars 33 forks source link

[BUG] configure dialog doesn't open for D&D 5e #197

Open ryzimmer opened 4 months ago

ryzimmer commented 4 months ago

Describe the bug I am running the most updated version of foundry and the Dungeons and Dragons 5e system. When I try to update token mold's token configure options, the dialog doesn't pop up. This is the error from the console:

foundry.js:753 TypeError: An error occurred while rendering TokenMoldForm 41. Cannot convert undefined or null to object at Function.keys () at get _actorAttributes [as _actorAttributes] (token-mold.js:1324:32) at TokenMoldForm.getData (token-mold.js:1081:33) at TokenMoldForm._render (foundry.js:5812:29) at TokenMoldForm._render (foundry.js:6532:17) at TokenMoldForm.render (foundry.js:5769:10) at HTMLAnchorElement. (token-mold.js:268:19)

To Reproduce Steps to reproduce the behavior:

  1. Create a world with the D&D 5e system
  2. go to actors tab
  3. open development console
  4. click on the settings icon for token mold image
  5. See error (only on console, nothing happens in UX at all)

Expected behavior The dialog with the token configuration settings should pop up and let me update the settings

Module incompatibilities I have no other modules active (and have not turned any on since I created a new world to test this)

Desktop (please complete the following information):

ryzimmer commented 4 months ago

I have created a PR for this fix after playing around in the js console for a bit to get the dialog to open: https://github.com/Moerill/token-mold/pull/198

Joe-Engineer commented 4 months ago

This is impacting me. I see there is an open PR. I use Forge...so getting the module updated in my game is more complex (I do not know how). Requesting that the change #198 be validated and a patch version created. The code change looks good to me, signed off. I cannot integrate or trigger any GitHub actions for this repo.

KomradeKoshka85 commented 4 months ago

I was looking at the console for the error and added the fixes that @Joe-Engineer approved of 15 hours ago and still wasn't able to get the settings screen to pop up, i decided to comment out lines 1317 - 1344 and I did manage to get the settings menu to open, not the most elegant fix but hey, no null pointer exceptions if theres nothing to call on the null pointer exception LOL

b-bilko commented 4 months ago

I'm having the same issue.

From the console:

foundry.js:753 TypeError: An error occurred while rendering TokenMoldForm 216. Cannot convert undefined or null to object at Function.keys (<anonymous>) at get _actorAttributes [as _actorAttributes] (token-mold.js:1324:32) at TokenMoldForm.getData (token-mold.js:1081:33) at TokenMoldForm.renderPatch (application-render.js:28:29) at 🎁call_wrapper [as call_wrapper] (libWrapper-wrapper.js:591:14) at 🎁Application.prototype._render#0 (libWrapper-wrapper.js:189:20) at TokenMoldForm._render (foundry.js:6532:17) at 🎁call_wrapped [as call_wrapped] (libWrapper-wrapper.js:507:22) at 🎁FormApplication.prototype._render#remote-highlight-ui (hooks.js:31:14) at 🎁call_wrapper [as call_wrapper] (libWrapper-wrapper.js:616:16) at 🎁FormApplication.prototype._render#0 (libWrapper-wrapper.js:189:20) at TokenMoldForm.render (foundry.js:5769:10) at HTMLAnchorElement.<anonymous> (token-mold.js:268:19)

Token mold 2.20.3

Foundry V11 Build 325

Safier516 commented 3 months ago

I have the same error. The HP dice and unnamed token works when I drag tokens onto the map, but I can't open the settings. Foudnry Version 11 Build 315 Dungeons 6 Dragons 5E 3.0.4 Token Mold 2.20.3

From the console:

undry.js:753 TypeError: An error occurred while rendering TokenMoldForm 95. Cannot convert undefined or null to object [Detected 1 package: token-mold] at Function.keys () at get _actorAttributes [as _actorAttributes] (token-mold.js:1324:32) at TokenMoldForm.getData (token-mold.js:1081:33) at TokenMoldForm._render (foundry.js:5812:29) at TokenMoldForm._render (foundry.js:6532:17) at TokenMoldForm.render (foundry.js:5769:10) at HTMLAnchorElement. (token-mold.js:268:19) onError @ foundry.js:753 🎁call_wrapped @ libWrapper-wrapper.js:507 🎁Hooks.onError#lib-wrapper @ listeners.js:138 🎁Hooks.onError#0 @ libWrapper-wrapper.js:187 (anonymous) @ foundry.js:5771 Promise.catch (async) render @ foundry.js:5769 (anonymous) @ token-mold.js:268