earlSt1 / vtt-compendium-folders

Collapsable folders in the compendium directory and folder structures inside compendiums for FoundryVTT
21 stars 18 forks source link

JS error on Foundry when create a Folder into a compendium. type - Item #132

Open aesmiol opened 2 years ago

aesmiol commented 2 years ago

Describe the bug When I crete a new folder into a compendium of type item , Foundry show a JS error. This happen only with kind of type

fic-folders.js:1474 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'insertAdjacentElement') [Detected 1 package: compendium-folders] at Function.createNewFolderButtonWithinCompendium (fic-folders.js:1474:25) at fic-folders.js:587:28 at Function._call (foundry.js:294:14) at Function.call (foundry.js:279:33) at Compendium._render (foundry.js:3117:13)

When move a new items to this compendium , the compendium show #[CF_tempEntity] When move item into directory , show #[CF_tempEntity]

To Reproduce Create a new compendium type item and add create a director into compendium

Expected behavior A clear and concise description of what you expected to happen.

Screenshots

Captura de pantalla 2022-02-08 a las 11 51 12 Captura de pantalla 2022-02-08 a las 11 51 28 Captura de pantalla 2022-02-08 a las 11 51 35

Move Item:

Captura de pantalla 2022-02-08 a las 11 54 08 Captura de pantalla 2022-02-08 a las 11 54 16

Information

Best Regards

earlSt1 commented 2 years ago

Hi, thanks for raising this. I believe its because CoC system compendiums look different to normal ones. A solution for the time being is to close + reopen the compendium and the folders will render correctly. Will work on a fix soon.

aesmiol commented 2 years ago

Yes, I close and open and it shows ok. Great, I'll wait for a solution. Thanks for this module :)