I have pages that live within a bucket. The pages are based on a branch template, such that each newly added page will also have a child item which serves as a local data source folder (which is used to store source items).
When I edit the page in Experience Editor and add a new component, I try to select the associated content for that rendering, however the child folder of the page does not appear as an option.
I know with 100% certainty that all of the usual configurations are correct in terms of datasource location paths:
In the above screenshot I have also tried removing the piped source, so that the field only contained
./Local Content. I also tried to set it as
query:./Local Content as was mentioned in this similar post.
I have also ruled out Sitecore context issues (web, master, core), and all of the other typical issues (display name vs item name). I have verified that this is an issue on multiple environments. It's not a permission issue as I'm signed in as admin. It also doesn't matter which rendering type I choose. The folder does not show.
Here's the kicker: if I move the page (along with its local datasource folder) somewhere else in the tree, or if I restart Sitecore, the source folder appears as expected:
What could be causing the local datasource folder to not show up in the dialogue? It seems like some kind of an indexing issue. However, even if I reindex the tree, it still doesn't show up. Again, it's only once I move the page or restart Sitecore that it shows up.
Edit: Clearing the Sitecore cache makes the folder item appear in the dialogue, however it does not fix the issue for each subsequent newly created page. We have to keep clearing the cache to make the item appear whenever we create a new page.
The issue also ONLY occurs if the newly created page lives inside of a bucket.