Skip to content

Bug when selecting/drag-and-dropping a playbook under v14 #308

Description

@LightSnowfall

It's currently possible to run pbta under foundry v14 by editing the system.json file, however there seems to be a problem with playbooks.

When selecting a playbook using the menu on the character sheet, this error shows in the dev console

item.js:216 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'choiceSets')
    at ItemPbta.grantChoices (item.js:216:36)
    at ItemPbta._preCreate (item.js:180:38)
    at async #preCreateDocumentArray (foundry.mjs:78856:29)
    at async ClientDatabaseBackend._createDocuments (foundry.mjs:78813:5)
    at async HTMLSelectElement.<anonymous> (actor-sheet.js:398:18)
grantChoices @ item.js:216
_preCreate @ item.js:180

await in _preCreate
handleMouseUp_ @ (unknown)
await in handleMouseUp_
handleMouseUp_ @ (unknown)

await in handleMouseUp_
#preCreateDocumentArray @ foundry.mjs:78856
_createDocuments @ foundry.mjs:78813
create @ foundry.mjs:78434
handleMouseUp_ @ (unknown)

await in handleMouseUp_
createDocuments @ foundry.mjs:14720
createEmbeddedDocuments @ foundry.mjs:14979
(anonymous) @ actor-sheet.js:398
handleMouseUp_ @ (unknown)

await in handleMouseUp_
dispatch @ jquery.min.js:2
v.handle @ jquery.min.js:2
handleMouseUp_ @ (unknown)
foundry.mjs:198381 Foundry VTT | Synchronized official game time in 3ms

When drag-and-dropping a playbook:

item.js:216 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'choiceSets')
    at ItemPbta.grantChoices (item.js:216:36)
    at ItemPbta._preCreate (item.js:180:38)
    at async #preCreateDocumentArray (foundry.mjs:78856:29)
    at async ClientDatabaseBackend._createDocuments (foundry.mjs:78813:5)
grantChoices @ item.js:216
_preCreate @ item.js:180

await in _preCreate
#preCreateDocumentArray @ foundry.mjs:78856
_createDocuments @ foundry.mjs:78813
create @ foundry.mjs:78434

await in create
createDocuments @ foundry.mjs:14720
createEmbeddedDocuments @ foundry.mjs:14979
_onDropItemCreate @ actor-sheet.js:824
_onDropItem @ actor-sheet.js:815

await in _onDropItem
_onDrop @ foundry.mjs:144246
callback @ foundry.mjs:40374
_handleDrop @ foundry.mjs:40460

The playbook selection also tends to disappear, for example when closing and opening the character sheet again.

System info:

Foundry Virtual Tabletop: Version 14 Stable, 14.360
Game System: pbta, 1.1.22
Active Modules: 8

Performance Mode: High
Screen Dimensions: 3440 × 1440
Viewport Dimensions: 3440 × 1321

OS: Linux x86 (64-bit)
Client: Chromium/147.0.7727.101
GPU: ANGLE (Intel, Mesa Intel(R) UHD Graphics 620 (WHL GT2), OpenGL ES 3.2)
Max Texture Size: 16384

Scene: 2082 x 1087 | Grid Size: 50 | Padding Percentage: 0.25
Walls: 0 | Ambient Lights: 0 | Ambient Sounds: 0 | Tiles: 0 | Tokens: 0
Largest Texture: 1382 × 687

Actors: 4 | Items: 255 | Journal Entries: 16 | Rollable Tables: 18 |
Playlists: 0 | Compendium Packs: 14 | Chat Messages: 38

World Scripts: None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions