*Help Needed* How can preview Live search results be different from Live?

How am I getting search results when I preview in Live (read-only), but if I go to my domain and enter the same search query, the results are 0? What could be the cause? How can I troubleshoot this? Thank you** :hugs:

Are you logged in as the same user in both cases?

The search feature does not require the user to be logged in. When I preview Live (Read-only) or Dev, I get the correct results representing their specific databases.

While the search element itself may be accessible by a logged out user, it doesn’t necessarily mean that the data is also accessible. It could be that there are privacy rules preventing the data from showing or that the search used to fetch the data references the current user

So, the preview Live (read-only) IS NOT a true representation of what’s accessible and/or the privacy rules being considered, Live?

Huh? Privacy rules are the same in both Live and Preview. Live and Preview use different databases.

Whatever data you have in your Preview does not sync with your Live database.

But isn’t the Live (read-only) preview using the same database as the website?

Preview is simply a feature. It doesn’t refer to a specific instance of the app in the way that Live or a dev branch does.

Yes it is a true representation of your live app instance. BUT that doesn’t guarantee that you’re viewing your app with the same user. Make sure that in both cases you’re testing with the same user or that you’re logged out in both cases. Another thing you can do is use the debugger to inspect the search element

Thank you, Alex. I appreciate your explanation. However, Im still confused. If I use the debugger, which I have, both in the Live (read-only) and Dev, and the search results are correct, what should I be looking for when I ‘inspect the search element’, as you suggest?

Also, I deleted all privacy rules but still the same thing.

Should I just submit a bug report?

You’d want to inspect the search element when the results aren’t as expected.

I really wouldn’t advise deleting all privacy rules unless you’re absolutely sure they’re not needed and there’s no sensitive data being exposed.

“You’d want to inspect the search element when the results aren’t as expected.”
That’s the problem. The results ARE as expected, during debugging.

Also, I only deleted the privacy rules to rule out that being the problem. I only have test data currently in both databases.

I’ve never done so before, but maybe a bug report would be my next step.

Thank you again, for your help :grinning:

So if you simply change “debug_mode=true” to “debug_mode=false”, the search works?

No, the opposite

If I change from true to false, it doesn’t work🤦🏽‍♀️

Yes that’s what I meant - doesn’t work. Ok I didn’t realize all this time this was your problem! :sweat_smile: :sweat_smile:

I’ve seen things work differently when debugger is running in slow or step by step mode. But if you’re running it in run mode and still getting different results then I’m not sure. I’d submit a bug report.

:sweat_smile: :sweat_smile: crazy right?!

Thanks again,

1 Like

No. Your development DB and Live DB are seperate. Data in your dev do not carry to your Live.

Buutt i see what the OP meant now.

We weren’t talking about Live vs Dev…

I submitted a bug report and the engineering team pushed a fix for a related issue and now I’m good to go🤗!

2 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.