earlSt1 / vtt-compendium-folders

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

Creating a subfolder with compendia messes up compendia list #123

Closed Tommycore closed 2 years ago

Tommycore commented 2 years ago

Describe the bug When trying to add a subfolder in the compendium tab, and selecting existing compendia from a module, those compendia get shot into nirvana.

To Reproduce In a world with existing compendia from a module:

  1. Open compendium tab and click on add folder.
  2. In the dialog, choose some compendia that are in the folder where you click 'add folder'. Click 'Create Folder'.
  3. Some of the chosen folders vanish, some show up at the very end as if belonging to no folder.
  4. An error is thrown:
    TypeError: this.collection.insert is not a function
    at CompendiumFolder.save (compendium-folders.js:196)
    at CompendiumFolder.addCompendium (compendium-folders.js:261)
    at async CompendiumFolderEditConfig._updateObject (compendium-folders.js:1316)
    at async CompendiumFolderEditConfig._onSubmit (foundry.js:3698)

Expected behavior A new subfolder with the chosen items gets created.

Screenshots

1

image

2

image

3

image

4

image

Information

earlSt1 commented 2 years ago

Can you try again by uninstalling your current version and installing via this manifest? https://raw.githubusercontent.com/earlSt1/vtt-compendium-folders/09x-update/test/module.json

earlSt1 commented 2 years ago

Fixed in v2.4.1