Closed ribalnasr closed 5 years ago
hi, you will have to specify the schemaKey
as well when using entryId
. Can you try that, please?
yep i did that, still no result. :(
Are the _fl_meta_.fl_id
values the same for your ar
and en-US
entries? They should be the same for the same entry in the Flamelink app, whereas the Firestore doc ID should be unique across locales.
true
reminder: am on firestore.
Yeah, the _fl_meta_.fl_id
was specifically introduced for Firestore. The RTDB structure leans itself to using the exact same ID for the node because the data is nested.
Can you paste your 2 entries' data here so that I can see how they are created? You can remove any confidential data if needed..mostly interested in the _fl_meta_
object and id
.
sure, here you go:
// en-US:
_fl_meta_: {
createdBy: "W9XxXn6zJSgQ7mRbGBAO2KFw6s23"
createdDate: April 29, 2019 at 12:49:01 AM UTC+3
docId: "h1I2hT1nBUq2HcUCRyR9"
env: "production"
fl_id: "h1I2hT1nBUq2HcUCRyR9"
locale: "en-US"
schema: "channels"
schemaRef: /fl_schemas/channels
schemaType: "collection"
}
id: "h1I2hT1nBUq2HcUCRyR9"
name: "rr"
project: /fl_content/LcZbMcRxlwf5ky8Z64uj
// ar:
_fl_meta_: {
createdBy: "W9XxXn6zJSgQ7mRbGBAO2KFw6s23"
createdDate: May 20, 2019 at 4:54:55 PM UTC+3
docId: "z3eO55yKfU2EZ4pztMda"
env: "production"
fl_id: "h1I2hT1nBUq2HcUCRyR9"
locale: "ar"
schema: "channels"
schemaRef: /fl_schemas/channels
schemaType: "collection"
}
id: "z3eO55yKfU2EZ4pztMda"
name: "rr arabic"
project: /fl_content/LcZbMcRxlwf5ky8Z64uj
Out of interest, is it only returning undefined after you set a new locale or does it return undefined always for your “ar” locale?
i set the locale to ar at the beginning with a button, and the queries come after it on independent triggers in other pages. switching back to en-us everything works again normally.
maybe it's worth mentioning that usually when the result is empty it returns null, but in this case here it's returning undefined.
I found the issue - a fix will be available soon.
Fix available in v1.0.0-alpha.19
yep.. working now!
i have another locales-related issue for you later today. after i make sure its not from my side :)
haha, okay, I'll wait for that one then. :)
hello, i have a document in both 'en-US' and 'ar' locales. after i switch to 'ar' by running
settings.setLocale('ar')
when i run
it returns the correct array of docs in the specified language.
however when try to retrieve one doc by id when language is 'ar', as follows,
it returns undefined. i tried it using both the firestore ID and the flamelink id (_flmeta.fl_id).