sdenec / tidy5e-sheet

An alternative Character Sheet for Foundry VTT dnd5e aimed at creating a cleaner UI.
86 stars 98 forks source link

Actors throw errors when placed via module import function [BUG] #779

Open DrTravisProthro opened 1 year ago

DrTravisProthro commented 1 year ago

Module Version: v0.9.14

image image

Describe the bug Created campaign via the import function which places all the maps and actors on those maps into the game. When I try to open the actor sheet of an npc it throws the error. When I delete that actor and replace it on the map the error is no longer thrown. When I change the default sheet to normal the error is no longer thrown. If I switch from regular back to Tidy as default the error IS then thrown once again.

The results of the error are that when the sheet is opened I cannot roll any skills or abilities or use any of the sheet functions

To Reproduce Steps to reproduce the behavior:

  1. Create campaign via import function that places actors onto the map
  2. Have Tidy set as default sheet for NPC actors
  3. Open NPC sheet of actor on one of the maps
  4. See error

Expected behavior Should be able to open the character sheet of an NPC actor without error even if actor was placed on map by import function. Should not have to re-"place" actors to resolve error.

Browser:

Foundry Version: V11.306 Game System: DnD 5e Additional context This only started happening roughly about 2 maybe 3 weeks ago as I recall and I don't remember it happening before then.

p4535992 commented 1 year ago

Did you eanble the module setting _"Enable debugging" ?

Before open any issue

1) Enable the module setting "Enable debugging" 2) Click F12 go to the console tab 3) make the test you want and replicate the error 4) Go to the tab console open on point 2) and just right click and click 'Save as' and 'Save' or send a screenshot of the exception on the console. 5) Attach the text file on the github issue with all the logs related tot he module, or send a screenshot of the messages on the console.

DrTravisProthro commented 1 year ago

Yes, I ensured that the "enable debugging" was checked before I replicated the error.

Here is the full screen shot showing the error and the debugging being checked.

image

I can confirm that this is only affecting SOME actors and not all of them. I can open some sheets no issues but others trigger the error it seems.

image image image image

p4535992 commented 1 year ago

The error persist if you disable the "item-piles" module ?

DrTravisProthro commented 1 year ago

So, I've had a little bit of time to test a few more variables and this is the results I've found. Disabling the Item-piles does not seem to impact the error for better or worse.

I loaded a new copy of Foundry v11 onto my other PC and reinstalled everything from scratch including pulling down the adventure via the DDB import module function. I originally had the default pages set to the Foundry 5e default when I did this.

Once I extracted the canvas and actors and opened their sheets in 5e default there were no errors as expected. I then switched the default page to Tidy5e and initially, it did not throw any errors. I closed down the server thinking the problem may have been resolved and when I came back and started the server back up the actors on canvas were once again throwing the errors as above.

I also learned that I could cure the issue without deleting and replacing the actors from the actor compendium. I simply have to open the token page, change NOTHING, and click the update actor button and it fixes any of the errors thereafter. I'm not sure if that bit of information may help you track down the issue as it seems to be likely from the canvas actor ID possibly not carrying over from the actor compendium but when I hit update it refreshes it possibly.

I hope that helps as I'm not a developer, so my understanding of coding logic is limited.