earlSt1 / vtt-compendium-folders

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

Exporting data to compendium causes folder structure to not render in some cases #34

Closed earlSt1 closed 3 years ago

earlSt1 commented 3 years ago

Hi, not sure it's fixed. Whenever I try to export data to a compendium, I get this: image with this error in the console: image It was on a gm account.

Edit: Apparently it works with a brand new compendium without any entries in it, but it kinda defeats the purpose to me.

Originally posted by @Honkou in https://github.com/earlSt1/vtt-compendium-folders/issues/32#issuecomment-746666919

earlSt1 commented 3 years ago

@Honkou can you let me know what happens when you import all content from that compendium, create a new compendium, then export all that content into a new compendium?

I had the issues you're describing with an old compendium of mine, but after deleting it all, exporting it into a new compendium, and exporting a new folder into it, I can't get it to error.

Honkou commented 3 years ago

So the only folder that remains looks like this: image Everything else is just scattered.

When trying to import it, I get this error: image

Edit: I managed to import all the data through the compendium tab. When exported to a new compendium, there were no temporary entities, but there was no folder structure either: image

No console errors though.

Honkou commented 3 years ago

The problem occurs only when trying to export data to a compendium that some data was already imported to.

earlSt1 commented 3 years ago

Hmm ok, which version of foundry + system are you running? (it looks like 5e but just to be sure).

Also if you've still got a copy of the faulty compendium can you attach the db file to this issue? (if it's a world compendium you can find it in Data/worlds/<worldName>/packs)

earlSt1 commented 3 years ago

Alrighty a fix has been included in v2.1.6. Can you test again once you update?

Cussa commented 3 years ago

Hello, I'm using the version 2.1.7 with Foundry 0.7.9 and the error is still happening.

earlSt1 commented 3 years ago

Hi @Cussa, was the error appearing after you try to merge folders when exporting again? or was it just from opening the compendium?

Cussa commented 3 years ago

When I tried to "re"export the actors, to have it updated.

earlSt1 commented 3 years ago

Ah ok, if you're still using a compendium that was affected by this bug (where the folders dont render right), then re-exporting wont fix it unfortunately. I can see about coming up with a macro to clean up the compendium so you can try again.

Cussa commented 3 years ago

The point is that I started to use it today, already on the version 2.1.7. I export the content to a Compendium. After I did more changes, I tried to export again to update the content, and it created the CF_tempEntry values.

earlSt1 commented 3 years ago

I see ok, looks like there is another bug somewhere still causing this issue. I'll do some more digging later.

earlSt1 commented 3 years ago

@Cussa and @Honkou if you're available to test can you try uninstalling and reinstalling using this manifest? In my test environment i was able to replicate your issue, and the latest changes in this test branch fixed it for me: https://raw.githubusercontent.com/earlSt1/vtt-compendium-folders/master/test/module.json

Be sure to duplicate compendiums regularly / backup just in case

Honkou commented 3 years ago

Sorry for not responding earlier, holiday time got pretty crazy. Uninstalling and reinstalling with your latest change seems to have done the trick. Thank you for all the help!

earlSt1 commented 3 years ago

No problem, and thats great to hear! Soon i'll push an update which you will be able to update from the test version through foundry

Cussa commented 3 years ago

Sorry for not responding earlier too. I'll do some tests tomorrow night and I will inform you the results.

earlSt1 commented 3 years ago

Got someone else to test this too and they have reported the problem is now solved. Fix now implemented in v2.1.8 and will close this for now.