[DB 2.0.2] Asset size filter causes #Asset page to crash

Open
#1,508 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reproducing the crash on the #Asset page with a size-zero filter after importing a graph with missing PDFs; compare the affected graph with the Demo graph. The developer console reports Expected number or lookup ref for entity id, got 0, and the issue identifies logseq.property.table/filters as the view property whose removal restores access. Done means the filter no longer crashes the page, or the view can be reset gracefully.

Written by the indexing model from the issue text.

Description

Search first
  • I searched and no similar issues were found
What Happened?

After an import with missing PDFs, the #Asset page was super sluggish. When I created a filter to find items of size 0, the page crashed and kept crashing upon opening the page. I was not able to open the #Asset page at all.

The developer console showed:

Expected number or lookup ref for entity id, got 0

The same page worked correctly in the Demo graph.

After deleting the filter with the CLI (and the missing PDF records), the page worked again.

Reproduce the Bug
  1. Import a graph with missing PDF files
  2. Go to the #Asset page
  3. Create a filter for size zero
  4. See crash
Expected Behavior

The page should not crash in the first place.

In beast case, Logseq would handle it gracefully or provide a way to reset the view.

Screenshots

No response

Desktop or Mobile Platform Information

Linux, zip based desktop app

Additional Context

Removing the logseq.property.table/filters property from the affected view using the CLI fixed it.

logseq --graph "GRAPH_NAME" upsert block
--uuid VIEW_UUID
--remove-properties '[:logseq.property.table/filters]'

Are you willing to submit a PR? If you know how to fix the bug.
  • I'm willing to submit a PR (Thank you!)
Dominant language
No language data
Stars
29
Forks
2
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from logseq/db-test

All issues in logseq/db-test

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.