Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] The 'contains' operator throws RSOE when used with non-list field #8918

Open
Marxsal opened this issue Jan 28, 2025 · 3 comments · May be fixed by #8931
Open

[BUG] The 'contains' operator throws RSOE when used with non-list field #8918

Marxsal opened this issue Jan 28, 2025 · 3 comments · May be fixed by #8931

Comments

@Marxsal
Copy link
Contributor

Marxsal commented Jan 28, 2025

Describe the bug

An RSOE is thrown when using 'contains' .

Expected behavior

Empty set

To Reproduce

Use the advanced search to create a filter like:

[all[tiddlers]contains:created[20250115]]

Instead of simply failing to find any matches, it throws a RSOE (Red screen of embarassment).

TiddlyWiki Configuration

v5.3.6

@pmario
Copy link
Member

pmario commented Jan 29, 2025

Uuups, This should have been catched by the tests.

@pmario
Copy link
Member

pmario commented Feb 1, 2025

There are 2 problems here.

  1. There is no check if the list-variable exists
  2. created is one of the tiddler fields that need to be treated in a special way. Internally they are stored as a js-date variable. For users they are strings.

PR is under way

@pmario
Copy link
Member

pmario commented Feb 1, 2025

@Marxsal There is an other problem. The created field will always be serialized like so: "20160204225047445" ... So a filter will need to match down to the millisecond. -- Your filter [all[tiddlers]contains:created[20250115]] will always return an empty list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants