Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Default Sheets form save logic sometimes reverts default sheets #10609

Closed
2 of 6 tasks
kgar opened this issue Mar 28, 2024 · 1 comment
Closed
2 of 6 tasks
Assignees
Labels
bug Functionality which is not working as intended ui Issues focused on user interface improvements

Comments

@kgar
Copy link

kgar commented Mar 28, 2024

What happened?

The Configure Default Sheet application will save the changed options but not the existing options for default sheets. As a result, any previous default sheet choices are reverted back to whatever is the original default for the document type.

If I have multiple alternative sheets for Actors, Items, etc., and I only change one at a time and click save, only the changed option will be included in the save operation, and it will completely overwrite core.sheetClasses.

For users of my sheets module, if they visit the Configure Default Sheet form multiple times, their previous preferences seem to revert back to whatever is the original default.

What I'd expect to happen: All default sheet preferences, whether saved this time around or previously, should remain intact.

What ways of accessing Foundry can you encounter this issue in?

  • Native App (Electron)
  • Chrome
  • Firefox
  • Safari
  • Other

Reproduction Steps

Using the dnd5e system and a sheets module (e.g., Tidy 5e Sheets),

  1. Go to Configure Default Sheets and specify an alternate sheet for "Character"
  2. Click Save Changes
  3. Refresh the web page
  4. Go to Configure Default Sheets and specify an alternate sheet for "NPC"
  5. Click Save Changes
  6. Refresh the web page
  7. Go to Configure Default Sheets and note that "Character" is not using the alternate sheet, and "NPC" is using the alternate sheet option.
  8. Repeat this back and forth to see how both settings still not stick between visits to the form.

Alternatively, this can be observed without any modules:

  1. Go to Configure Default Sheets and specify the "Legacy 5e Character Sheet" for "Character"
  2. Click Save Changes
  3. Refresh the web page
  4. Go to Configure Default Sheets and do nothing
  5. Click Save Changes
  6. Refresh the web page
  7. Go to Configure Default Sheets and note that "Character" has reverted back to "Default 5e Character Sheet", even though it was set to "Legacy 5e Character Sheet".

What core version are you reporting this for?

11.315

Relevant log output

// Before saving a new default Character sheet
> game.settings.get("core", "sheetClasses")
{}

// Saving a new default Character sheet (note: I only changed the Character sheet option)
Foundry VTT | Retrieved and compiled template templates/sidebar/apps/settings-config-category.html
foundry.js:5802 Foundry VTT | Rendering SettingsConfig
foundry.js:7682 Foundry VTT | Retrieved and compiled template templates/sidebar/apps/package-configuration.html
foundry.js:7682 Foundry VTT | Retrieved and compiled template templates/app-window.html
foundry.js:7682 Foundry VTT | Retrieved and compiled template templates/sidebar/apps/default-sheets-config.html
foundry.js:5802 Foundry VTT | Rendering DefaultSheetsConfig
game.settings.get("core", "sheetClasses")
{
    "Actor": {
        "character": "dnd5e.Tidy5eCharacterSheet"
    },
    "JournalEntryPage": {
        "class": "dnd5e.JournalClassPageSheet",
        "map": "dnd5e.JournalMapLocationPageSheet",
        "rule": "dnd5e.JournalRulePageSheet"
    }
}

// Saving a new default NPC sheet (note: I only changed the NPC sheet option)
Foundry VTT | Rendering DefaultSheetsConfig
> game.settings.get("core", "sheetClasses")
{
    "Actor": {
        "npc": "dnd5e.Tidy5eNpcSheet"
    }
}

// Note how the entire world setting got overwritten.

Bug Checklist

  • The issue occurs while all Modules are disabled
@kgar kgar added the bug Functionality which is not working as intended label Mar 28, 2024
@aaclayton aaclayton added the ui Issues focused on user interface improvements label Mar 30, 2024
@aaclayton aaclayton removed this from the V12 User Testing 1 milestone Apr 25, 2024
@aaclayton aaclayton added nonrepro Bugs which are not yet able to be reproduced. and removed nonrepro Bugs which are not yet able to be reproduced. labels May 13, 2024
@aaclayton
Copy link
Contributor

Confirmed as an active issue by @mattexdee

@Fyorl Fyorl self-assigned this May 14, 2024
@Fyorl Fyorl added this to the V12 User Testing 4 milestone May 14, 2024
@Fyorl Fyorl closed this as completed May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality which is not working as intended ui Issues focused on user interface improvements
Projects
Status: Done
Development

No branches or pull requests

3 participants