Giter Club home page Giter Club logo

Comments (6)

JarrodMFlesch avatar JarrodMFlesch commented on July 24, 2024

@tiagom-m I think I am following, but could you upload a quick screen capture of this process?

from payload.

tiagom-m avatar tiagom-m commented on July 24, 2024

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.
IMG_0946
IMG_0947
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.
IMG_0948
IMG_0949
3. The fields of the created page are updated again and the fr locale is the one selected when these changes are published.
IMG_0950
IMG_0951
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.
IMG_0953
IMG_0952

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.

JarrodMFlesch avatar JarrodMFlesch commented on July 24, 2024

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.

tiagom-m avatar tiagom-m commented on July 24, 2024

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.

JarrodMFlesch avatar JarrodMFlesch commented on July 24, 2024

@tiagom-m thank you for the screen recording, this is so helpful. I should have time to look into this today.

from payload.

JarrodMFlesch avatar JarrodMFlesch commented on July 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.