compendium errors upgrading to v9
hmm im not entirely sure how this will work though.. because I did just a quick smell test to my module under v9, and it broke on the compendium settings which is absolutely core to the module 😛 and I'm not sure if whatever I do to fix it will work on 0.8.x
6 Replies
Mind sharing what errors you got?
I know of one change that should only produce a deprecation warning
i am .. not entirely sure, but I built a FormApplication on my module to have users select compendiums, and then I mapped those into an array. but the application result is now different
And I know of at least one bug with compendiums
its a little hard to explain, honestly, I would need to produce some examples and/or show you
but I don't recall ANY deprecation message and/or error
it just.. returned something different than before
(firing up v8)
There should be a deprecation warning if a pre-v9 compendium is being used in v9. The schema has changed
Could be causing weirdness
hmmm
I did some HB shenanigans to implement this, registered a checked helper, but it's all a little finnicky, never fully understood what I was doing honestly xD
so.. here's 0.8.9 working response.. when the FormApplication is closed, I get this formData on _updateObject(event, formData).
those arrays of booleans map to the Item compendiums the user has on the world, I map those later into their appropriate names to save them reversed (e.g. races: { 'dnd5e.races': true, ...} IIRC)
and what I get on v9.... (a min)
interestingly, this seems even easier to work with xD but I have no idea why this changed
i don't remember why I didn't save stuff this way directly on the setting, but I will give it a try! saving exactly which compendiums have each data instead of marking them all should probably help a little with performance when reading them
this is how my setting is supposed to look (i forgot I trimmed unused compendia hahah)
I do some complicated mappings back and forth, there might be an easier and more straightforward way of doing this :/