1

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).

Newly created item

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.

missing datasource folder

I know with 100% certainty that all of the usual configurations are correct in terms of datasource location paths:

datasource location path 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:

local data source folder appearing

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.

4
  • Do you have a single CM server, or more than one because this type of issue often comes due requests goest to load balancer and then on different servers? Oct 1, 2020 at 18:29
  • @PrashantTomar I have replicated this issue locally, on our single instance TEST server, as well as our multiple CD load balanced PROD environment. Oct 1, 2020 at 18:30
  • is it related to sitecore.stackexchange.com/questions/20951/… ? Oct 2, 2020 at 13:53
  • Thanks for the link @MahendraShekhawat. I did see that post and tried the query: trick but it didn't work. I have a ticket opened with Sitecore to see if this is related to Sitecore reference #413366 as was mentioned in that link. Oct 2, 2020 at 14:03

1 Answer 1

2

The issue was because of a custom save event that aimed to automatically sync items within a bucket whenever an item was saved or created so that the item would automatically move to its correct subfolder within the bucket.

There was a portion of code that disabled events for performance purposes, and in the process, whenever the bucketed item was created or saved, even though it moved to a subfolder, Sitecore still thought the path of the item was its previous location. Thus, when the datasource window tried to find the current context item, it couldn't find it because the old path didn't resolve to the new path.

More info can be found here: https://stackoverflow.com/questions/32612278/sitecore-8-sync-a-bucket-item-on-save/59536261#59536261

There are various code samples on the web that recommend using the EventDisabler in this specific situation, so this question and answer should help people who experience issues related to the use of that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.