Conditional statement looks at old value, caching issue?

First off, I filed a bug report with a lot more details so hopefully that is getting picked up soon but in the meantime I’m wondering if other people have similar issues…

On page load I have a condition that checks if the current user’s ‘was_welcomed’ = ‘no’

If the was_welcomed field on the user is no, an onboarding group is shown. At the end of it, the field is changed to ‘yes’. This works fine and the value is updated in the database.

I noticed during user testing that people navigate away from the dashboard page to the profile page. When they return to the dashboard (there is a back button, but also through the browser back button) the onboarding popup was loaded again.

Upon inspection, the condition reads that the was_welcomed field on the user was still ‘no’. Another field that should have had a value is also seen as empty.

When I scroll down the current users fields, the correct value is shown. So the condition says no, where the actual field on the user in the debugger shows yes.

When I refresh the dashboard page, the popup is not loaded. Only when the user navigates away from the page and returns to it.

Is there a difference on loading a page coming from another page and doing a refresh of the current page? (a simple refresh, not ctrl-F5) Is the condition looking at a cached version of the user?

Having a text field on the page with the was welcomed value shows me the following:

During onboarding the user’s welcomed field changes to ‘yes’ - expected behaviour

When clicking a button to go to another page and then returning to the previous page, the text field shows ‘no’ for various durations. - not expected behaviour

After a second or more than a second the value changes to ‘yes’ as if it had to check again and found the correct value. In the meantime, the onboarding popup shows again because it met the condition (welcomed=no).

So it seems an issue with the page loading. If it loads slowly, the value is not updated quickly enough. I just don’t understand why it would switch back to the ‘no’ value even if it was already set to yes and showing yes… :confused:

It actually took a few weeks of debugging by the Bubble team, but it was indeed a bug and they pushed a fix! Thanks again @neerja