You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked the console for errors (F12 to open, Console tab)
I have tried to reset Item Piles' system settings
I have reproduced this bug with only item piles & its dependency modules enabled
Describe the bug
When a player attempts to preview a sheet that is purely Application V2 (e.g., Tidy 5e Item Sheets), an error occurs and the sheet does not open.
To Reproduce
Steps to reproduce the behavior:
Set up a merchant with an item whose sheet is set to "Tidy 5e Item Sheet Classic"
Log in as a player
Have the GM show the merchant to the player
Have the player try to preview the item
Expected behavior
The preview item sheet should show.
Screenshots
If applicable, add screenshots to help explain your problem.
Setup
Foundry Version: 12.331
System Version: 4.1.2
Item Piles Version: 3.1.6
Browser & version: Google Chrome Version 131.0.6778.265 (Official Build) (64-bit)
Active modules
Item Piles
libwrapper
socketlib
Tidy 5e Sheets
Additional context
There are 2 issues:
Application V2 has a different constructor; it takes { document: newItem } instead of newItem, { editable: false }
Application V2 does not have a _render function, only a render function
Here's an example of shimming the constructor for App V2 and falling back to render:
// ... replacing the last part of PileItem.preview()// Shim for App V2, accommodates `{ document: newItem }`newItem.document=newItem;constsheet=newcls(newItem,{editable: false});if(sheet?._render){sheet._render(true);}else{sheet.render(true)}
There's probably a much better way to do this where App V2 is detected and constructed separately. If I find it during foundry dev time, I will pass it along.
Tidy 5e has its own error when constructed in this preview fashion, but I am releasing a patch soon to address my side.
The text was updated successfully, but these errors were encountered:
Yessir, I was aware of the compatibility situation, just wanted to do my civic duty and provide additional detail since the original post only references 4.1.2 👍
I confirm the following:
Describe the bug
When a player attempts to preview a sheet that is purely Application V2 (e.g., Tidy 5e Item Sheets), an error occurs and the sheet does not open.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The preview item sheet should show.
Screenshots
If applicable, add screenshots to help explain your problem.
Setup
Active modules
Additional context
There are 2 issues:
{ document: newItem }
instead ofnewItem, { editable: false }
_render
function, only arender
functionHere's an example of shimming the constructor for App V2 and falling back to
render
:There's probably a much better way to do this where App V2 is detected and constructed separately. If I find it during foundry dev time, I will pass it along.
Tidy 5e has its own error when constructed in this preview fashion, but I am releasing a patch soon to address my side.
The text was updated successfully, but these errors were encountered: