foundryvtt / black-flag

The official repository for Kobold Press's "Black Flag" game system implementation in Foundry Virtual Tabletop.
MIT License
10 stars 5 forks source link

Items can't be created #13

Open Drental opened 1 year ago

Drental commented 1 year ago

When I try to create a Background I get an error message instead: image

Error: BlackFlagItem Model Validation Errors
[BlackFlagItem.system]: Model Validation Errors
[BackgroundTypeDataModel.description]: may not be undefined
[BackgroundTypeDataModel.color]: may not be undefined
[BackgroundTypeDataModel.equipment]: may not be undefined
    at SchemaField._validateType (commons.js:4098:15)
    at SchemaField.validate (commons.js:3824:37)
    at BlackFlagItem.validate (commons.js:5492:35)
    at new DataModel (commons.js:5269:26)
    at new Document (commons.js:5811:3)
    at new BaseItem (commons.js:8590:3)
    at new ClientDocumentMixin (foundry.js:13053:5)
    at new Item (foundry.js:19553:1)
    at new BlackFlagItem (item.mjs:1:16)
    at ClientDatabaseBackend._preCreateDocumentArray (foundry.js:12525:15)
onError @ foundry.js:747
_preCreateDocumentArray @ foundry.js:12527
_createDocuments @ foundry.js:12459
create @ commons.js:6738
await in create (async)
createDocuments @ commons.js:6110
create @ commons.js:6233
callback @ foundry.js:13608
button.callback @ foundry.js:56516
submit @ foundry.js:56403
_onClickButton @ foundry.js:56332
dispatch @ jquery.min.js:2
y.handle @ jquery.min.js:2
foundry.js:59187 BlackFlagItem Model Validation Errors
[BlackFlagItem.system]: Model Validation Errors
[BackgroundTypeDataModel.description]: may not be undefined
[BackgroundTypeDataModel.color]: may not be undefined
[BackgroundTypeDataModel.equipment]: may not be undefined
fetch @ foundry.js:59187
notify @ foundry.js:59114
error @ foundry.js:59150
onError @ foundry.js:748
_preCreateDocumentArray @ foundry.js:12527
_createDocuments @ foundry.js:12459
create @ commons.js:6738
await in create (async)
createDocuments @ commons.js:6110
create @ commons.js:6233
callback @ foundry.js:13608
button.callback @ foundry.js:56516
submit @ foundry.js:56403
_onClickButton @ foundry.js:56332
dispatch @ jquery.min.js:2
y.handle @ jquery.min.js:2

image

I have no modules active and am of course using the most current version of the System. I can work through what I need by copying items and will look into it again later.

Drental commented 1 year ago

only tested in v10

Drental commented 1 year ago

it works in V11...

Okay, Mystery why this doesn't work for me and seemed to work allright for you solved. I can dev a new system on v11 just fine because stealing code from this project is all I want to do 🏴

dutchcolonial commented 1 year ago

Doesn't work for me either. Actually it does not work for any item (V10): ItemDropdown Errors are different for the different item types. Background error: BackgroundError

Equipment error: EquipmentError

Heritage error: HeritageError

Lineage error: LineageError

Talent error: TalentError