ClipplerBlood / journal-improvements

MIT License
4 stars 4 forks source link

[Issue/Bug] Dragged Journal links not resolving properly when dropped into a markdown page #11

Open deanraspa opened 1 year ago

deanraspa commented 1 year ago

While trying to cross link pages within a single Journal entry, I identified an issue with the identifier included in the dropped target when dragging another page from the same Journal into the markdown editor page. The reference that is added when dropping a journal page into the markdown editor is formatted like: @UUID[.JournalEntryPage.<Identifier>]{<Page Title>} instead of the correct @UUID[.<Identifier>]{<Page Title>}. If I do not remove the additional .JournalEntryPage from the reference, the page fails to load with an error, and ends up hanging the Journal Entry Window whenever a page with an invalid reference is loaded.

Foundry VTT Version: 10.291 Module Version: 0.6.2 Settings Enabled: ( If not listed value is either default or unchecked)

Steps to Reproduce:

  1. Create a new Journal Entry
  2. Ensure the Sheet type is Improved Journal Sheet
  3. Create 2 text pages
  4. Drag a reference from the one page into the markdown edit pane of the other page.
    • If you save now the page will clear and an error will show up in the console. You are unable to select another page in this journal entry until it has been closed and reopend. Clicking on the entry again after reopening puts the entry into the same errored state.
    • If you remove the extra .JournalEntryPage the page will save and the reference will work as intended
    • Once saved with the error, the only way I have found to recover is to delete the page and recreate it.