HeroCreationLab / hero-creation-tool

Step-by-step module tool for creating 5e characters in FoundryVTT
MIT License
31 stars 15 forks source link

Compendium Source Button #65

Closed TogashiTogoru closed 2 years ago

TogashiTogoru commented 2 years ago

Hi,

i have an issue with the newest version. I can't select the Compendium Sources button, maybe it's my problem or it`s a bug.

ccjmk commented 2 years ago

Hi @TogashiTogoru ! Can you tell me which Foundry version, DnD5e version and module version you are using, just to be sure? You can get it from the Support button in Foundry:

image

I just tried on the version you see on the screenshot, which is latest Foundry, latest DnD5e and latest module, and it seems to work, so I imagine it's a conflict with another module.

Can I suggest trying without any other module ? If that works, you can use Find the Cultrip to selectively rule out modules until we can pinpoint which one is the conflicting one.

ccjmk commented 2 years ago

Sorry, didn't mean to close the issue, reopening again!!

TogashiTogoru commented 2 years ago

Foundry Virtual Tabletop: Version 9, 9.238 Game System: dnd5e, 1.5.6 Active Modules: 15 Performance Mode: 2

OS: Unknown Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) FoundryVirtualTabletop/9.0.0 Chrome/89.0.4389.128 Electron/12.2.2 Safari/537.36 GPU: ANGLE (Intel(R) UHD Graphics 630 Direct3D11 vs_5_0 ps_5_0) Max Texture Size: 16384

Scene: 6000 x 4600 | Grid Size: 100 | Padding Percentage: 0.25 Walls: 0 | Ambient Lights: 0 | Ambient Sounds: 0 | Tiles: 0 | Tokens: 0

Actors: 0 | Items: 0 | Journal: 0 | Rollable Tables: 1 | Playlists: 0 | Compendium Packs: 22 | Chat Messages: 0

TogashiTogoru commented 2 years ago

even if i disable all other modules i still can't select new sources

ccjmk commented 2 years ago

I am not able to reproduce your issue, can you ping me on discord for seeing this together live ? ccjmk#0141 (its 0141, but the text seems to show #141)

TogashiTogoru commented 2 years ago

i have send you an invite

ccjmk commented 2 years ago

From our live debug

foundry.js:316 TypeError: An error occurred while rendering CompendiumSourcesSubmenu 58: defaultCollection?.includes is not a function at CompendiumSourcesSubmenu.ts:81 at Array.map () at buildCompendiaList (CompendiumSourcesSubmenu.ts:77) at buildTemplateData (CompendiumSourcesSubmenu.ts:103) at CompendiumSourcesSubmenu.getData (CompendiumSourcesSubmenu.ts:62) at CompendiumSourcesSubmenu._render (foundry.js:3031) at CompendiumSourcesSubmenu._render (foundry.js:3733) at CompendiumSourcesSubmenu.render (foundry.js:2990) at SettingsConfig._onClickSubmenu (foundry.js:55267) at HTMLButtonElement.dispatch (jquery.min.js:2)

ccjmk commented 2 years ago

For reference if anyone finds this issue later:

v0.8.x sources were saved on a module setting that had this shape:

{
   races: { pack.name.one: true, pack.name.two: false, ... },
   racialFeatures: { ... },
   ...
}

while the v9 version saves them on an array with all the selected packs only:

{
   races: [selected.pack.one, selected.pack.two],
   racialFeatures: [selected.pack.one],
   feats: [],
   ...
}

A migration was added to forcefully reset the selected compendia to the (new) default, compatible with v9, so sadly you will need to re-select your compendium sources once, but after that, it should not cause any more issues. Now that a migration schema is in place, if this need arises on the future, I will try to smartly migrate the settings to the new format, keeping the selected data, but for now I prefered a faster approach that would unblock people ASAP.