p4535992 / foundryvtt-inventory-plus

A Foundry VTT module to enhance the dnd5e inventory. Allows to customize your Inventory in various ways.
GNU General Public License v3.0
3 stars 3 forks source link

[BUG] Can't move or add items #10

Closed shecrio closed 2 years ago

shecrio commented 2 years ago

Module Version: v0.6.6 Foundry Version: v10.287 Dnd5e Version: 2.0.3 Foundry Electron Browser Active Modules only Inventory+ and libWrapper

When trying to move an item around within its category, to another category, from a compendium, or to a character sheet nothing changes and this error is produced.

lib.js:96 inventory-plus | No itemId founded for the item warn @ lib.js:96 🎁game.dnd5e.applications.actor.ActorSheet5eCharacter.prototype._onDropItem#inventory-plus @ module.js:70 🎁call_wrapper @ libWrapper-wrapper.js:616 🎁game.dnd5e.applications.actor.ActorSheet5eCharacter.prototype._onDropItem#0 @ libWrapper-wrapper.js:189 _onDrop @ foundry.js:61034 callback @ foundry.js:56371 _handleDrop @ foundry.js:56422

Trying to create a new item on a character sheet in any category also does nothing but produce this much larger error.

foundry.js:747 Error: Item5e Model Validation Errors [Item5e.type]: may not be a blank string [Detected 1 package: system:dnd5e] at SchemaField._validateType (commons.js:4090) at SchemaField.validate (commons.js:3817) at Item5e.validate (commons.js:5470) at new DataModel (commons.js:5247) at new Document (commons.js:5786) at new BaseItem (commons.js:8565) at new ClientDocumentMixin (foundry.js:12996) at new Item (foundry.js:19467) at new Item5e (item.mjs:9) at ClientDatabaseBackend._preCreateDocumentArray (foundry.js:12478) at ClientDatabaseBackend._createEmbeddedDocuments (foundry.js:12441) at ClientDatabaseBackend.create (commons.js:6712) at async Function.createDocuments (commons.js:6085) onError @ foundry.js:747 🎁call_wrapped @ libWrapper-wrapper.js:507 🎁Hooks.onError#lib-wrapper @ listeners.js:137 🎁Hooks.onError#0 @ libWrapper-wrapper.js:187 _preCreateDocumentArray @ foundry.js:12480 _createEmbeddedDocuments @ foundry.js:12441 create @ commons.js:6712 async function (async) create @ commons.js:6710 createDocuments @ commons.js:6085 createEmbeddedDocuments @ commons.js:6303 _onItemCreate @ inventory-plus.js:1142 (anonymous) @ inventory-plus.js:539 dispatch @ jquery.min.js:2 y.handle @ jquery.min.js:2 foundry.js:58721 Item5e Model Validation Errors [Item5e.type]: may not be a blank string [Detected 1 package: system:dnd5e] fetch @ foundry.js:58721 notify @ foundry.js:58648 error @ foundry.js:58684 onError @ foundry.js:748 🎁call_wrapped @ libWrapper-wrapper.js:507 🎁Hooks.onError#lib-wrapper @ listeners.js:137 🎁Hooks.onError#0 @ libWrapper-wrapper.js:187 _preCreateDocumentArray @ foundry.js:12480 _createEmbeddedDocuments @ foundry.js:12441 create @ commons.js:6712 async function (async) create @ commons.js:6710 createDocuments @ commons.js:6085 createEmbeddedDocuments @ commons.js:6303 _onItemCreate @ inventory-plus.js:1142 (anonymous) @ inventory-plus.js:539 dispatch @ jquery.min.js:2 y.handle @ jquery.min.js:2 inventory-plus.js:1144 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'setFlag') [Detected 1 package: inventory-plus] at InventoryPlus._onItemCreate (inventory-plus.js:1144) _onItemCreate @ inventory-plus.js:1144 async function (async) _onItemCreate @ inventory-plus.js:1142 (anonymous) @ inventory-plus.js:539 dispatch @ jquery.min.js:2 y.handle @ jquery.min.js:2

I appreciate the work you put into your modules, I don't know coding but if there's anything I can do to help let me know.

p4535992 commented 2 years ago

made some bug fix try out version 0.6.7

Deltinum commented 2 years ago

Bug is still present on version 0.6.7

Dragging:

warn    @    lib.js:96
:gift:game.dnd5e.applications.actor.ActorSheet5eCharacter.prototype._onDropItem#inventory-plus    @    module.js:97
async function (async)        
:gift:game.dnd5e.applications.actor.ActorSheet5eCharacter.prototype._onDropItem#inventory-plus    @    module.js:79
:gift:call_wrapper    @    libWrapper-wrapper.js:616
:gift:game.dnd5e.applications.actor.ActorSheet5eCharacter.prototype._onDropItem#0    @    libWrapper-wrapper.js:189
_onDrop    @    foundry.js:60834
:gift:call_wrapped    @    libWrapper-wrapper.js:507
_lw_ActorSheet_prototype__onDrop    @    PatcherActorSheet.js:26
async function (async)        
_lw_ActorSheet_prototype__onDrop    @    PatcherActorSheet.js:23
:gift:call_wrapper    @    libWrapper-wrapper.js:616
:gift:ActorSheet.prototype._onDrop#0    @    libWrapper-wrapper.js:189
callback    @    foundry.js:56178
_handleDrop

Adding:

[Item5e.type]: may not be a blank string
[Detected 1 package: system:dnd5e]
    at SchemaField._validateType (commons.js:3636)
    at SchemaField.validate (commons.js:3363)
    at Item5e.validate (commons.js:5016)
    at new DataModel (commons.js:4793)
    at new Document (commons.js:5332)
    at new BaseItem (commons.js:8101)
    at new ClientDocumentMixin (foundry.js:12999)
    at new Item (foundry.js:19457)
    at new Item5e (item.mjs:9)
    at ClientDatabaseBackend._preCreateDocumentArray (foundry.js:12401)
    at ClientDatabaseBackend._createEmbeddedDocuments (foundry.js:12364)
    at ClientDatabaseBackend.create (commons.js:6261)
    at async Function.createDocuments (commons.js:5631)
onError @ foundry.js:711
:gift:call_wrapped @ libWrapper-wrapper.js:507
:gift:Hooks.onError#lib-wrapper @ listeners.js:137
:gift:Hooks.onError#0 @ libWrapper-wrapper.js:187
_preCreateDocumentArray @ foundry.js:12403
_createEmbeddedDocuments @ foundry.js:12364
create @ commons.js:6261
async function (async)
create @ commons.js:6259
createDocuments @ commons.js:5631
createEmbeddedDocuments @ commons.js:5849
_onItemCreate @ inventory-plus.js:1142
(anonymous) @ inventory-plus.js:539
dispatch @ jquery.min.js:2
y.handle @ jquery.min.js:2
foundry.js:58524 Item5e Model Validation Errors
[Item5e.type]: may not be a blank string
[Detected 1 package: system:dnd5e]
fetch @ foundry.js:58524
notify @ foundry.js:58451
:gift:call_wrapped @ libWrapper-wrapper.js:507
_lw_ui_notifications_notify @ PatcherNotifications.js:27
:gift:call_wrapper @ libWrapper-wrapper.js:616
:gift:ui.notifications.notify#0 @ libWrapper-wrapper.js:189
error @ foundry.js:58487
onError @ foundry.js:712
:gift:call_wrapped @ libWrapper-wrapper.js:507
:gift:Hooks.onError#lib-wrapper @ listeners.js:137
:gift:Hooks.onError#0 @ libWrapper-wrapper.js:187
_preCreateDocumentArray @ foundry.js:12403
_createEmbeddedDocuments @ foundry.js:12364
create @ commons.js:6261
async function (async)
create @ commons.js:6259
createDocuments @ commons.js:5631
createEmbeddedDocuments @ commons.js:5849
_onItemCreate @ inventory-plus.js:1142
(anonymous) @ inventory-plus.js:539
dispatch @ jquery.min.js:2
y.handle @ jquery.min.js:2
inventory-plus.js:1144 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'setFlag')
[Detected 1 package: inventory-plus]
    at InventoryPlus._onItemCreate (inventory-plus.js:1144)
Deltinum commented 2 years ago

After updating to version 0.6.8, can confirm these are both working now.

p4535992 commented 2 years ago

ty and sorry for the delay