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**
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
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!
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.
crazy right?!
Thanks again,
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đ¤!
This topic was automatically closed after 70 days. New replies are no longer allowed.