-
Notifications
You must be signed in to change notification settings - Fork 147
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
[Optimizely App] variation container allows incorrect variant type to be selected on first render #3790
Comments
I have identified the cause of the issue. The API request space.getEntries({ links_to_entry: ids.entry, skip: 0, limit: 1000 }) sometimes returns an empty items array. I have reproduced the error programatically and this bug manifests because the contentful API is eventually consistent. Adding a delay between linking the |
Hi @LucasAmos! Thank you for raising this issue. As communicated through our support process, we have captured this issue in our backlog and will prioritize it as soon as possible. |
Just another quick update @LucasAmos. I am going to close this issue and we will continue to communicate updates to you about this bug through our internal support process. Thank you! |
Any update on this ticket? As this has been closed makes following it up is practically impossible. |
@juancarlosjr97 Thanks for reaching out! This ticket has not been prioritized, but I will provide an update when we are working on it. |
@whitelisab... As @LucasAmos mentioned, the issue is the line
The reason, we think, is happening is because when the entry is created, it opens immediately the drawer and does the fetch of the L86, but as Contentful has just created the entry, the relationship does not exist yet, and if the patch of the parent entry with the newly created entry happens before the fetch data of L86 the array returns correct data, but if it happens after, it returns an empty array as the linked relationship does not exist yet. Long story short, it requires an await for however long contentful takes to save an empty when a change happens on the UI and does the path. |
I have raised an MR to fix the bug - #4621 @whitelisab. Please, if you could review it and merge it as we need this fix. |
Describe the bug
Given that an optimizely experiment has been linked to the contentful environment and 2 or more reference fields have been enabled on a content type. The first time that a new variation container entry is rendered on the screen any enabled content type can be selected from the "Content type" dropdown menu and added to the variation container. The next time that the entry is rendered only the correct content type can be selected.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Only entries of the correct content type can be added to the variation container via the "Content type" dropdown menu
Screenshots
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: