logseq / logseq/db-test

Duplicate page created

Open
#741 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug can't reproduce
Dominant language
No language data
Stars
28
Forks
2
PR merge metrics
No merged PRs in 30d

Description

### Search first

- [x] I searched and no similar issues were found

### What Happened?

In a new block I typed `[[Some Page]]`, attempting to refer to a page named `Some Page` which already existed. Instead, a new page with that name was created.

### Reproduce the Bug

My guess is that if I have a page `Some Page` that doesn't appear in the search index, then attempting to reference `[[Some Page]]` can create a new page instead of referring to the existing one.

Perhaps there is another way to check whether a page with the given name exists, which could be checked before an attempted page reference creates a new page.

### Expected Behavior

_No response_

### Files

_No response_

### Browser, Desktop or Mobile Platform Information

_No response_

### Additional Context

_No response_

### Are you willing to submit a PR? If you know how to fix the bug.

- [ ] I'm willing to submit a PR (Thank you!)

Contributor guide

No contributing guide indexed for this repository

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

Reproduce the issue by creating an existing page named “Some Page” that is absent from the search index, then entering `[[Some Page]]` in a new block. Trace how page references resolve names and create pages; done means the existing page is referenced and no duplicate is created, with a regression test covering this case.

Written by the indexing model from the issue text.

Assessment

Domain
search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.