logseq / logseq/logseq

Renaming a page doesn't update queries using the page

Open
#7,519 26 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

:type/bug DB-storage estimate: very large page-ref page-rename query
Dominant language
Clojure
Stars
45k
Forks
2.8k
Avg merge
1d 22h
Merged PRs (30d)
105

Description

I've seen this for some time, and it's quite a hindrance.

Steps to reproduce:
* create page named `temp test page`
* on some other page, create a query `{{query [[temp test page]]}}`
* confirm that the query above returns the page (yes)
* rename page `temp test page` to `temp test page renamed`

Expected result:
* the query is automatically changed to `{{query [[temp test page renamed]]}}`, and hence still returns the page

Actual result:
* the query still reads `{{query [[temp test page]]}}`, and hence there are now no results

Screenshot: a link has been updated accordingly, but the query has not:
![CleanShot 2022-11-29 at 21 37 44](https://user-images.githubusercontent.com/76884940/204642554-e70ce324-d1c8-4244-a769-da2fea841dcc.jpg)

Note: refresh or re-index has no effect, the problem still persists.

Issue https://github.com/logseq/logseq/issues/2397 is similar, but was reported for a case involving templates and cyrillic letters in the page name.

---
LogSeq `Version 0.8.11 (0.8.11)`
MacOS `Darwin Kernel Version 21.6.0`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files, tests, or entry points are named in the report. Start by reproducing the page rename and query steps, then trace how page renames update links versus query references. Done means the query changes to reference the renamed page and still returns it without requiring refresh or re-indexing.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.