earlSt1 / vtt-compendium-folders

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

Editing the compendium folder file loss #164

Closed TomWithADon closed 1 year ago

TomWithADon commented 1 year ago

I had uploaded some files into the compendium and if I edit anything like the color or name it will delete everything in that folder. This is happening on v10 build 284 and on Warhammer Fantasy Roleplay 4e v 6.1.2

TomWithADon commented 1 year ago

I now also have a folder stuck under default that I can no longer delete

This is the error code that pops up with it

Uncaught TypeError: Cannot read properties of undefined (reading 'id') [Detected 1 package: compendium-folders] at CompendiumFolderDirectory._onSearchFilter (compendium-folders.js:1195:38) at SearchFilter. (foundry.js:4780:77) at commons.js:1311:18 foundry.js:4950 Foundry VTT | Rendering Dialog foundry.js:58303 The world.enemy-in-shadows Datastore is not yet connected! fetch @ foundry.js:58303 game:1 Uncaught (in promise) Error: The world.enemy-in-shadows Datastore is not yet connected! [No packages detected] at get db [as db] (file:///C:/Program%20Files/FoundryVTT/Foundry%20Virtual%20Tabletop/resources/app/dist/database/backend/server-document.mjs:1:712) at o.disconnect (file:///C:/Program%20Files/FoundryVTT/Foundry%20Virtual%20Tabletop/resources/app/dist/database/backend/server-document.mjs:1:860) at o.disconnect (file:///C:/Program%20Files/FoundryVTT/Foundry%20Virtual%20Tabletop/resources/app/dist/database/backend/server-compendium.mjs:1:610) at o.deleteCompendium (file:///C:/Program%20Files/FoundryVTT/Foundry%20Virtual%20Tabletop/resources/app/dist/database/backend/server-compendium.mjs:1:1022) at World._onDeleteCompendium (file:///C:/Program%20Files/FoundryVTT/Foundry%20Virtual%20Tabletop/resources/app/dist/packages/world.mjs:1:12090) at World._onManageCompendium (file:///C:/Program%20Files/FoundryVTT/Foundry%20Virtual%20Tabletop/resources/app/dist/packages/world.mjs:1:10680) at Socket.handleEvent (file:///C:/Program%20Files/FoundryVTT/Foundry%20Virtual%20Tabletop/resources/app/dist/server/sockets.mjs:1:476) at Socket.emit (node:events:527:28) at Socket.emit (node:domain:475:12) at Socket.emitUntyped (C:\Program Files\FoundryVTT\Foundry Virtual Tabletop\resources\app\node_modules\socket.io\dist\typed-events.js:69:22)

earlSt1 commented 1 year ago

Hi, it looks like one of your compendiums that you removed previously may still be saved in CF. Can you run this macro and send me the console output?

const packs = game.packs.contents.map(p => p.collection)
const cfPacks = game.customFolders.compendium.entries.contents.map(p => p._id)

console.log(cfPacks.filter(p => !packs.includes(p)))
TomWithADon commented 1 year ago

I ran the macro and it just gave me this in the console, although it might not be showing anything due to the problem correcting itself on one of the updates. Still going to send it though as a just in case.

[] VM497:6


From: Craig Earl @.> Sent: October 13, 2022 12:30 PM To: earlSt1/vtt-compendium-folders @.> Cc: TomWithADon @.>; Author @.> Subject: Re: [earlSt1/vtt-compendium-folders] Editing the compendium folder file loss (Issue #164)

Hi, it looks like one of your compendiums that you removed previously may still be saved in CF. Can you run this macro and send me the console output?

const packs = game.packs.contents.map(p => p.collection) const cfPacks = game.customFolders.compendium.entries.contents.map(p => p._id)

console.log(cfPacks.filter(p => !packs.includes(p)))

— Reply to this email directly, view it on GitHubhttps://github.com/earlSt1/vtt-compendium-folders/issues/164#issuecomment-1277799785, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A26B32CFCY5IW76UCVCDNB3WDATH5ANCNFSM6AAAAAAQGJETVE. You are receiving this because you authored the thread.Message ID: @.***>

earlSt1 commented 1 year ago

Ah ok, maybe you re-enabled a module that reintroduced the compendium to the world, and the issue sorted itself out then. I'll close this for the time being but if it happens again feel free to reopen it :smile: