I’m debugging a strange issue where some of my users cannot see my documents when most other users can. My website has an integration with Prismic where we fetch documents and render them based on the URL the user visits on our site.
To fetch the Prismic documents I’m using the Api.php code from this git repository: https://github.com/prismicio/php-kit/tree/master/src/Prismic
I’m querying my Repository using the Prismic API: https://.cdn.prismic.io/api and I query by document.type, path_prefix, and slug.
Most of my site visitors (about 1500 so far) are able to load the page without issue.
About 30 of my site visitors repeatedly get an error and the document does not load.
The only way I’m able to reproduce the issue is by copying the cookies of my affected users. If they try private/incognito browser sessions they are able to view my page, but if they log in to their user account for my site their cookies are set and they get a 404 page again. I haven’t been able to find anything the users have in common with each other and it’s starting to look like something in their cookies is altering the query results.
Here are my query parameters:
- [my.features.path_prefix] => features
- [my.features.slug] => bethechange
In the query results (for a non-affected user), I get multiple documents back with the following slugs:
-  => bethechange
-  => be-the-change
-  => test-caro-btc
-  => test-be-the-change-2020
-  => be-the-change-2020
When affected users go to my webpage, they trigger a search with the same path_prefix and slug, but they get back 0 documents. Has anyone seen this type of behavior before?