League-of-Foundry-Developers / foundryvtt-devMode

A module with some tools to help enable Foundry VTT package developers.
MIT License
12 stars 15 forks source link

Error on JournalEntryPage editor rendering in 10.275 #52

Closed drewg13 closed 2 years ago

drewg13 commented 2 years ago

Environment Details

Describe the bug Error thrown when module enabled and edit button on JournalEntryPage clicked, see screenshot Error does not occur when module is not enabled, error occurs under multiple systems including dnd5e 2.0.0-alpha2

To Reproduce Steps to reproduce the behavior:

  1. Open JournalEntry
  2. Select Page
  3. Click to edit
  4. See error in console, no editor window renders

Expected behavior Editor window opens

Screenshots image

akrigline commented 2 years ago

That's concerning. I have no idea why this could be happening. If anyone figures this out, please open a PR with a fix.

drewg13 commented 2 years ago

I've narrowed it down to the Disable Template Cache option, which makes sense, given the error. If I disable that, I no longer get the error. I'm assuming something in that template cache is necessary to connect the partial to the path and is not being preserved.

ben commented 2 years ago

Yeah it looks like Foundry's template resolution has changed subtly. Maybe the solution is to not bypass the cache for paths that start with templates/?

Here's the foundry.js change:

CleanShot 2022-09-08 at 08 46 55

ben commented 2 years ago

Whoops, nope, that's not it. The patch just isn't passing along the id parameter. That's an easy fix. Lemme whip up a PR.