token-mold icon indicating copy to clipboard operation
token-mold copied to clipboard

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

Open ryzimmer opened this issue 1 year ago • 7 comments

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):

  • OS: My laptop is running windows 11, the VM running foundry is on Ubuntu
  • Browser: Edge
  • FVTT Version: 11 build 3.15
  • System version: 3.0.1
  • Module version: 2.20.3

ryzimmer avatar Feb 07 '24 23:02 ryzimmer

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

ryzimmer avatar Feb 08 '24 21:02 ryzimmer

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.

Joe-Engineer avatar Feb 24 '24 17:02 Joe-Engineer

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

KomradeKoshka85 avatar Feb 25 '24 08:02 KomradeKoshka85

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

b-bilko avatar Feb 28 '24 23:02 b-bilko

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

Safier516 avatar Mar 17 '24 15:03 Safier516

I've published an unofficial fork that should fix the issue, please test the version that matches your Foundry install.

Foundry v11: https://raw.githubusercontent.com/BeardedGnome/token-mold/v2.21.0/module.json Foundry v12: https://raw.githubusercontent.com/BeardedGnome/token-mold/v2.22.1/module.json

BeardedGnome avatar Jul 08 '24 05:07 BeardedGnome

Latest release for Foundry v12 is listed in issue: https://github.com/Moerill/token-mold/issues/204

BeardedGnome avatar Aug 10 '24 00:08 BeardedGnome