Skip to content

Toggling is/is not on a Tags "Empty" filter crashes All Pages with "Invalid view resource context" #1434

Closed
logseq/logseq
#13885

Description

@mohanrex

Search first

  • I searched and no similar issues were found

What Happened?

On All Pages, after adding a Tags filter with the value "Empty", switching the operator between "is" and "is not" crashes the app with "Something went wrong" / "Invalid view resource context". The broken filter is persisted on the view, so the page keeps crashing until the filter is removed.

Reproduce the Bug

  1. Open All Pages (table view).
  2. Click Filter → Tags → is → choose "Empty".
  3. Click the operator pill ("is") and switch it to "is not" (or back from "is not" to "is").
  4. See error: "Something went wrong".
  5. One time, I have to change the option multiple times to reproduce the issue.

Expected Behavior

The operator flips and the filter keeps its "Empty" value (Tags is not Empty), with no crash.

Screenshots

Console:

POST http://127.0.0.1:61624/v1/invoke 500 (Internal Server Error)
[frontend.ui] {:exception #error {:message "Invalid view resource context", :data {:status 500, :code :exception, :error {:code "exception", :message "Invalid view resource context"}}, :cause #object[Error React ErrorBoundary Error: Invalid view resource context]}, :line 682}

Persisted filter on the All Pages view block after the crash (logseq.property.table/filters):
{:or? false :filters [[:block/tags :is]]} — a 2-element clause (value dropped).

logseq-filter.mp4

Files

No response

Browser, Desktop or Mobile Platform Information

Windows 11, Desktop App, build 2026-10-07, revision 533ac43

Additional Context

Likely cause: view-filter-value-after-operator-change in src/main/frontend/worker/handler/view.cljs keeps the value for :is/:is-not only when it is a set:

(:is :is-not) (when (set? value) value)

The "Empty" choice stores :empty (a keyword), so it is dropped, and filter-operator (components/views.cljs) saves [property operator]. valid-filters? requires 3-element clauses, so the view resource request fails. Unchanged on master as of 2026-10-12.

Possible fix: (:is :is-not) (when (or (set? value) (= :empty value)) value)

Related: #1392 has the same 2-element clause failure, but via Text operators; draft PR logseq/logseq#13575 handles Text only.

Workaround: logseq upsert block --id --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!)

Activity

  1. yuxi-liu-wired commented on Oct 27, 2026

    @yuxi-liu-wired

    Fixed in logseq/logseq#13884 (fix(views): table filters keep working when a clause is empty or matches text values). Its description has the cause and the test that pins it; it fails on current master and passes with the fix.

  2. added 5 commits that reference this issue on Oct 28, 2026
    16ba761
    1d01534
    73c628c
    4d6d2ef
    7d329c1
  3. added 7 commits that reference this issue on Nov 11, 2026
    bfaced2
    56d5a3d
    b22ba6b
    cb6183a
    f1d911f
    c4f56ec
    e3908f5
  4. added a commit that references this issue on Nov 19, 2026
    7f84204
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions