ardittristan / VTTColorSettings

adds color picker as settings option in Foundry VTT
MIT License
8 stars 9 forks source link

Players get error in the console when opening Configure Settings #25

Closed yjeroen closed 2 years ago

yjeroen commented 2 years ago
TypeError: Cannot read properties of null (reading 'style')
[Detected 1 package: colorsettings]
    at colorSetting.js:537:21
    at colorSetting.js:539:11
    at Function._call (foundry.js:294:14)
    at Function.call (foundry.js:279:33)
    at ExtendedSettingsConfig._render (foundry.js:3114:13)
    at async ExtendedSettingsConfig._render (foundry.js:3761:5)
ardittristan commented 2 years ago

hm, do you know which module the setting that errors belongs to? I'm not able to reproduce it at my end currently.

Artemisthemp commented 2 years ago

I managed to trigger the error below with Minimal UI enable

foundry.js:316 TypeError: Error thrown in hooked function '' for hook 'renderSettingsConfig': Cannot read properties of null (reading 'style') at colorSetting.js:537:21 at colorSetting.js:539:11 at Function._call (foundry.js:294:14) at Function.call (foundry.js:279:33) at SettingsConfig._render (foundry.js:3117:13) at async SettingsConfig._render (foundry.js:3764:5)

ardittristan commented 2 years ago

I'm still not able to reproduce, is there any kind of changed settings you have for Minimal UI?

at least the issue is that it can't find an element specified by div.settings-list div.form-group.submenu button[data-key="${_this.module}.${_this.key}"] but unless Minimal UI greatly changes the interface in settings (which it doesnt for me) it should still work.

On which system are you (dnd5e etc.)

Artemisthemp commented 2 years ago
  1. Foundry 9.245 with DnD 5e 1.5.7 and Minimal UI 1.4.15 with Lib - Color Settings 2.8.2 installed.
  2. Create a World with 5e system.
  3. Enable Minimal UI + Lib - Color Settings.
  4. Create an additional user in User Management and give it the Trusted Player User Role.
  5. Log on the Trusted Player and open Configurated Settings.

This should generate the error.

ardittristan commented 2 years ago

Ah, I see, it errors when it tries to add a color to a button that the user doesn't have access to because of permissions. Will fix!