zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.46k stars 1.94k forks source link

(Bug Report) Renaming a Note Doesn't Update Link Text on Internal Links on Share Page #4879

Open kleutzinger opened 2 weeks ago

kleutzinger commented 2 weeks ago

Trilium Version

0.63.7

What operating system are you using?

Other Linux

What is your setup?

Local + server sync

Operating System Version

Linux 6.11.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 01 Nov 2024 03:30:41 +0000 x86_64 GNU/Linux

Description

When you update the title of a note that you are internally linking to, this may not update the internal link's text in certain scenarios. The two key places I see it is in the 'view source' of the outer note doing the linking, and the content part of the outer note's share page.

It may be easier to show rather than tell, see the video or steps to recreate below.

Steps To Recreate

  1. In some note (call the note "outer"), make an internal link to another note (call the note "inner")
  2. Open the inner note and rename it.

Observed Behavior

  1. View the outer note in trilium text note interface see the note's link is renamed properly, good.
  2. However, on the outer note's share/public page, the inner note link text is renamed in the sidebar and child notes section, but the link text to the inner note is not renamed in the main content section of the share page.
  3. Similarly, back in the trilium interface on the outer notes "view source", the inner note link's text has the old name. This may be why the bug is arising

Expected Behavior

  1. The link to the inner note should have the updated title everywhere (the share page, and in the view source of the outer note as well?). At the very least it should be displayed with the updated title in the shared note's html, like the main note interface.

Potential Workarounds / Fixes

  1. some signal when a note's title is changed that updates the text everywhere it is internally-linked
  2. some cron job like above
  3. some manually-run script that updates link's text like above.
  4. a manual fix for an individual inner link is to go to the outer note, delete the internal link, and re-add it. This is not so nice to do in many places, though.

Video Example

Peek 2024-11-12 15-26-trilium-rename-bug.webm

Error logs

No response

meichthys commented 1 week ago

@kleutzinger this project is in maintenance mode and likely won't receive patches for things like this.

Would you mind filing the same issue over on the community maintained TriliumNext/Notes? https://github.com/TriliumNext/Notes/issues