Comments (6)
@tiagom-m I think I am following, but could you upload a quick screen capture of this process?
from payload.
Maybe with these screenshots I can better explain the issue I'm having than with only a screen capture.
1. Create a new page with content for fr and en languages. The en locale is selected when the changes are published.
2. This is the search result entry that is created in the Search Results
collection when the page changes are published. For the en locale, the values match the page values, but for the fr locale is visible that no slug value is saved and that the title and doc relationship remain the same as in the en language.
3. The fields of the created page are updated again and the fr locale is the one selected when these changes are published.
4. The search entry fields are updated. For the fr locale, the values match the updated page values, except the Doc relationship that still shows the en page title. Changing to the en locale, is visible that the title and doc relationship match the values from the fr language and the slug field is not saved.
I assume that the expected behaviour for the search result entry is for the fields to match the values of the page fields across all supported languages.
from payload.
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?
from payload.
I updated to the latest version the beta project and tested it again.
Since I have the Drafts functionally with autosave enabled, I don't think that the issue is related to the data not being stored in the document.
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
from payload.
@tiagom-m thank you for the screen recording, this is so helpful. I should have time to look into this today.
from payload.
So to recreate this issue:
- create DRAFT version of
es
doc - create PUBLISHED version of
en
doc - the search collection will only have the
en
data
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 en
data. Therefore the search doc will not have access to other localized content when it creates/updates its entry.
from payload.
Related Issues (20)
- Changing the cookie prefix prevents login in Next.js standalone mode
- Build production Error HOT 2
- Safari, @payloadcms/richtext-lexical, Invalid regular expression: invalid group specifier name HOT 4
- Move segments to root instead of /admin HOT 2
- Collection throws ValidationError when using slug `pages` HOT 1
- Locale overwriting (critical bug) HOT 3
- Serverless & db connections on vercel HOT 2
- Next dev & mongo adapter HOT 2
- DefaultTemplate not rendering any menu items in sidebar HOT 1
- Payload breaks with custom Babel config HOT 1
- Payload Local API increase First Load JS size to client chunks HOT 1
- Form state doesn't update after Locale change HOT 2
- [v3] Need example of custom form in admin
- rowLabel for array field does not return {data, index} attributs HOT 2
- Duplicating documents with localized required text(area) field doesn't work
- Loading admin page with relationship filters ends up in infinite loop HOT 1
- Array field row labels cannot be customized HOT 1
- unique field property is not working HOT 2
- Focal point crop does work differently then expected. HOT 3
- Can't build on Netlify because of React issues HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from payload.