payload icon indicating copy to clipboard operation
payload copied to clipboard

[V3] Filtering by ID Not Working

Open lukyfebrianto opened this issue 1 year ago • 3 comments

Describe the Bug

Filtering documents by ID no longer functions as expected.

Link to the code that reproduces this issue

https://www.youtube.com/watch?v=t-FzJab4Py8

Reproduction Steps

  1. Attempt to filter a document by its ID.
  2. Observe that the filter does not return the expected result (Empty result).

Which area(s) are affected? (Select all that apply)

db-mongodb, area: ui, area: docs

Environment Info

"dependencies": {
    "@anatine/zod-openapi": "^2.2.6",
    "@aws-sdk/cloudfront-signer": "^3.696.0",
    "@livit/portal.common.types": "^1.6.10",
    "@payloadcms/db-mongodb": "3.1.1",
    "@payloadcms/next": "3.1.1",
    "@payloadcms/plugin-sentry": "3.1.1",
    "@payloadcms/richtext-lexical": "3.1.1",
    "@payloadcms/storage-s3": "3.1.1",
    "@payloadcms/ui": "3.1.1",
    "@sentry/nextjs": "^8.40.0",
    "cookie": "^1.0.2",
    "cross-env": "^7.0.3",
    "dd-trace": "^5.27.1",
    "googleapis": "^144.0.0",
    "graphql": "^16.9.0",
    "http-status": "^2.0.0",
    "image-size": "^1.1.1",
    "ioredis": "^5.4.1",
    "jose": "^5.9.6",
    "katex": "^0.16.11",
    "lodash": "^4.17.21",
    "mime-types": "^2.1.35",
    "next": "15.0.0",
    "payload": "3.1.1",
    "pino": "9.5.0",
    "pino-pretty": "13.0.0",
    "react": "19.0.0-rc-65a56d0e-20241020",
    "react-dom": "19.0.0-rc-65a56d0e-20241020",
    "sharp": "0.33.5",
    "zod": "^3.23.8"
  },

lukyfebrianto avatar Nov 26 '24 06:11 lukyfebrianto

Please add a reproduction in order for us to be able to investigate.

Depending on the quality of reproduction steps, this issue may be closed if no reproduction is provided.

Why was this issue marked with the invalid-reproduction label?

To be able to investigate, we need access to a reproduction to identify what triggered the issue. We prefer a link to a public GitHub repository created with create-payload-app@beta -t blank or a forked/branched version of this repository with tests added (more info in the reproduction-guide).

To make sure the issue is resolved as quickly as possible, please make sure that the reproduction is as minimal as possible. This means that you should remove unnecessary code, files, and dependencies that do not contribute to the issue. Ensure your reproduction does not depend on secrets, 3rd party registries, private dependencies, or any other data that cannot be made public. Avoid a reproduction including a whole monorepo (unless relevant to the issue). The easier it is to reproduce the issue, the quicker we can help.

Please test your reproduction against the latest version of Payload to make sure your issue has not already been fixed.

I added a link, why was it still marked?

Ensure the link is pointing to a codebase that is accessible (e.g. not a private repository). "example.com", "n/a", "will add later", etc. are not acceptable links -- we need to see a public codebase. See the above section for accepted links.

Useful Resources

github-actions[bot] avatar Nov 26 '24 06:11 github-actions[bot]

Hello! I think the issue you're running with is related to ObjectID relationships change - https://github.com/payloadcms/payload/releases/tag/v3.0.0-beta.131 You should run the provided migration

r1tsuu avatar Nov 26 '24 06:11 r1tsuu

Thanks for your response! I've already tried that, but it's still not working. Also, it's an ID, not the relation data object.

Image

lukyfebrianto avatar Nov 26 '24 19:11 lukyfebrianto

It turned out that only the media collection is affected 🤔

lukyfebrianto avatar Dec 02 '24 08:12 lukyfebrianto

Hey @lukyfebrianto,

Thanks for your patience here!

I just tried to reproduce the above behavior and I'm able to filter by ID's in an uploads collection / other collections as well.

Can you confirm if you're still experiencing this issue on latest version (3.32.0)?

PatrikKozak avatar Apr 01 '25 20:04 PatrikKozak

This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.

github-actions[bot] avatar Jul 23 '25 05:07 github-actions[bot]