-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Search results entry fields are not updated correctly when collection entry fields are updated across multiple languages #7203
Comments
@tiagom-m I think I am following, but could you upload a quick screen capture of this process? |
I can attempt to recreate the search issue you are having. One thing to note, when you switch between locales, it does not store your current document data. So I think you were losing it when you switched from FR to EN which made it seem like it was not saving. If you update to the latest beta, I made a change to make this clearer and it will ask you if you want to leave without saving. Can you try that out and see if it clears up some of the initial confusion you were having? |
I updated to the latest version the beta project and tested it again. I think that the issue still persists, so in this capture I went throught the steps described in my last message to better show the issue I'm facing. test.MOV |
@tiagom-m thank you for the screen recording, this is so helpful. I should have time to look into this today. |
So to recreate this issue:
This stems from afterRead hooks only having access to the data of the requested locale. The search plugin allows you to tie into afterRead, but the doc will only have the |
@tiagom-m will be fixed in next beta release |
This issue has been automatically locked. |
Link to reproduction
No response
Payload Version
beta.63
Node Version
20 LTS
Next.js Version
15.0.0-canary.58
Describe the Bug
When the Search Plugin is enabled for a collection, publishing changes in multiple languages for an entry from that collection do not update the fields for all languages in the respective search entry.
When changes across languages are published for an entry, only the values for the selected language are stored in the respective search entry. The values for the other languages are not saved in that search entry.
The current beta app (version 63) was used for testing and the following changes were added to the
payload.config.ts
:pages
collection, and a localized slug field was addedAfter updating the title and slug fields for a new page for both EN and FR, several issues are visible in the search results entry when those changes are published:
I was not able to find a lot of documentation (or a working example) on how to setup the search plugin for multiple locales were it worked properly, so maybe I might be missing some more configurations.
Reproduction Steps
create-payload-app@beta
command and followed the setup instructions.payload.config.ts
file to enable localization and the search plugin, as shown above.Adapters and Plugins
plugin-search
The text was updated successfully, but these errors were encountered: