Closed TarionT closed 3 years ago
Thanks this has been mentioned by other users, i'll push out a fix later this evening
Fixed in v2.3.51
I think this needs to be reopened @earlSt1 - the issue is System dependent (note that dnd5e is fine).
Running v2.3.51 System: DSA/TDE (the dark eye)
Exporting folder structure (shown below) to an empty compendium (world or module) results in:
Uncaught (in promise) TypeError: Cannot read property 'update' of undefined
at Function.packUpdateEntity (fic-folders.js:10)
at async fic-folders.js:647
I think there are two issues here:
#[CF_tempEntity]
actor has no data flags attached to it when it gets added to the compendium.
entity
that gets passed into removeOrUpdateFolderIdForEntity
https://github.com/earlSt1/vtt-compendium-folders/blob/082-update/fic-folders.js#L895 has a field called _id
rather than id
so when it gets passed back to the updateData
, it ends up trying to update an undefined entity (because the id is undefined
).Looks like the system is causing issues, it's clearing all flags when you create an actor (which wipes all CF folder data). I'll raise it with the systems guys
With only the compendium folder module enabled and attempting to export folder structure, this happens. I have attempted it with only a single folder or more, and the same error occurs.
Nothing within the compendium appears to update when this happens.
With only the compendium folder module enabled and attempting to export folder structure, this happens. I have attempted it with only a single folder or more, and the same error occurs.
Nothing within the compendium appears to update when this happens.
Hi, which system + version are you using?
Version 8.9 of Foundry with the latest version of the module with no other module running on dnd5e. I'm not sure if this completely resolves the issue (it looks like it so far) but I put an if(document) statement right where the undefined variable error message was located. It took away the error message and compendium was exporting again.
if(document) return await document.update....
It was occurring with anything I was attempting to export that had a folder: scenes. actors, and items
Aha, I think I've identified the issue, was passing the incorrect id into that function.
Can you try installing the test version of CF to see if it fixes it for you? To do so, uninstall CF and install this version using the manifest input at the bottom of the install screen: https://raw.githubusercontent.com/earlSt1/vtt-compendium-folders/082-update/test/module.json
Aha, I think I've identified the issue, was passing the incorrect id into that function.
Can you try installing the test version of CF to see if it fixes it for you? To do so, uninstall CF and install this version using the manifest input at the bottom of the install screen: https://raw.githubusercontent.com/earlSt1/vtt-compendium-folders/082-update/test/module.json
I receive this error message.
fic-folders.js:1136 Uncaught (in promise) TypeError: Cannot read property 'flags' of undefined at Function.exportSingleFolderToCompendium (fic-folders.js:1136) at async Function.recursivelyExportFolders (fic-folders.js:1103) at async Function.recursivelyExportFolders (fic-folders.js:1117) at async callback (fic-folders.js:1016)
if (existingFolder){
// Use existing
folderId = existingFolder.data.flags.cf.id
path = existingFolder.data.flags.cf.path (X)
Ahhhhh, the manifest was wrong, I must have accidentally merged it in from the other branch
Can you try and install again using the same methods?
Ahhhhh, the manifest is wrong, I must have accidentally merged it in from the other branch
Can you try and install again using the same methods?
It's working. Thank you for the quick fix!
Talked through the issue with @TarionT, issue is now fixed in v2.3.53
Describe the bug I have several actor comendiums with folders but beginning with version 2.3.5 i have a message that open the actor comepdium an say updatening folder structur and the compendium overlay will closed imediatly after that message apears.
The thing is this only happends on actor compendiums, all other comendiums scenes and journalitem works like a charm.
The error message in the console: fic-folders.js:10 Uncaught (in promise) TypeError: Cannot read property 'update' of undefined at Function.packUpdateEntity (fic-folders.js:10) at async fic-folders.js:647
To Reproduce it happend al the time even with no moduls expect comepndium folders and lib... activ
Information