unsoluble / smalltime

A small FoundryVTT module for displaying and controlling the current time of day.
MIT License
23 stars 15 forks source link

Darkness Configuration setting image is missing and generates error when using through The Forge #164

Closed T-Whiz closed 1 year ago

T-Whiz commented 1 year ago

Foundry Version: 10.288 Game System: dnd5e, 2.0.3 Hosting: The Forge Active Modules: SmallTime 1.15.8, The Forge 1.10 OS: Windows 11 Browser: Microsoft Edge Version 107.0.1418.42 (Official build) (64-bit)

Expected: The 'Darkness Configuration' section of the settings screen for SmallTime shows the thumbnail picture of the scene currently being viewed. If the scene being viewed has no thumbnail, then a default picture is displayed.

Actual: As expected when displaying the Game Settings window while viewing a scene with no thumbnail.

When displaying the Game Settings window while viewing a scene with a thumbnail, and through the Forge, no image is displayed behind the suns and moons in the SmallTime Darkness Configuration section and an error message is displayed in the console. Attached examples of two error messages, one when viewing the initial/default scene in a new world (default Foundry scene called "Foundry Virtual Tabletop") and another when viewing a scene with a background and thumbnail (other than the initial/default "Foundry Virtual Tabletop" scene).

Steps to recreate:

  1. View a scene with a thumbnail picture in the Scenes Sidebar.
  2. Go to the Game Settings sidebar section and select Configure Settings (error is displayed in console and no thumbnail/image is displayed in the SmallTime Darkness Configuration section).
  3. Close the Game Settings window and view a scene that does not have a thumbnail picture in the Scenes Sidebar.
  4. Go to the Game Settings sidebar section and select Configure Settings (no error is displayed in console and a default thumbnail/image is displayed in the SmallTime Darkness Configuration section).
  5. With the settings still open, switch between viewing scenes that do and do not have thumbnails (Darkness Configuration between showing no image when viewing a scene with a thumbnail scene and the default image when viewing a scene with no thumbnail, although no additional errors appear in the console unless the settings window is closed and reopened).
  6. Repeat steps 1-5 using the initial/default "Foundry Virtual Tabletop" scene.

Attached example screen shots and console log. log-default scene.log log-scene with background and thumbnail.log Scene with thumbnail Scene without thumbnail

unsoluble commented 1 year ago

Hmm. Can you pop into the console while in the scene that isn't working, throw canvas.scene.data.img in there and show me what it returns?

T-Whiz commented 1 year ago

Thanks for taking a look, here's the results for both a regular scene and the default Foundry scene for a new world.

canvas.scene.data.img (scene with thumbnail).log canvas.scene.data.img default-scene.log

unsoluble commented 1 year ago

Thanks! Should be fixed in 1.15.9.

T-Whiz commented 1 year ago

Awesome, thank you so much! 😄 I'll retest as soon as the update appears in The Forge.

T-Whiz commented 1 year ago

The settings images appear as expected now. Some existing scenes required using Regernate Thumbnail first. Thanks again.