payloadcms / payload

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
https://payloadcms.com
MIT License
24.88k stars 1.58k forks source link

Collection search removes the locale parameter searching in the wrong language #7813

Closed yobottehg closed 1 month ago

yobottehg commented 2 months ago

Link to reproduction

No response

Payload Version

3.0.0-beta.90

Node Version

20 LTS

Next.js Version

15.0.0-canary.104

Describe the Bug

When a collection is searched the search is done in a different locale then the selected one because the locale parameter is removed from the url.

Please see the attached video demonstrating the issue where a search does not yield any results but it should. After changing the locale again it shows the wanted results because the parameter is appended again.

https://github.com/user-attachments/assets/ab6acc75-4975-4a5f-8954-86ac7ff7e9bc

Reproduction Steps

See the video.

Adapters and Plugins

db-postgres

yobottehg commented 2 months ago

The wrong results were a side effect of #7762 . The parameter is still removed - unsure if this issue should be closed or not.

JarrodMFlesch commented 2 months ago

@yobottehg I think we need to fix the other issue first and then attempt to recreate it here. I can see how having a table full of the same preference could cause issues. But I don't want to close it just yet.

JarrodMFlesch commented 2 months ago

Waiting for review/release of changes from https://github.com/payloadcms/payload/pull/7828

paulpopus commented 1 month ago

Looks like this is now fixed in https://github.com/payloadcms/payload/pull/8100 based on my testing, will be available in the next release

github-actions[bot] commented 1 month ago

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