Insights

How to Identify Which Items Are From Resource Files (IAR) and Database on Sitecore XM Cloud

Sitecore XM Cloud has had a hidden feature for several months that reveals whether an item originates from a database or a resource file

Why is Identifying if Items Are From Resource Files and Databases Useful?

Knowing if an item is loaded from the database or a resource file is useful for developers when working with XM Cloud. It provides extra information when troubleshooting complex issues and could lead to a faster cause identification and resolution.

Enable the Content Editor Developer Ribbon Tab

This new feature is inside the Developer ribbon tab. This tab is hidden by default. To enable the Developer ribbon tab:

  1. Open the Content Editor
  2. On the right of the last ribbon tab, right click in in the dark gray area.

    Sitecore ribbon with item editing options and a search bar for content.

  3. Select the Developer item to enable it.

    Sitecore content tree on the left with workspace showing folder contents.

  4. Once enabled, you have access to many new actions.

    Sitecore's main toolbar with options for home, navigate, publish, and developer tools.

Enable the View Item Source Option

In the Developer ribbon tab, Sitecore XM Cloud has a View section with an Item source toggle. Once enabled, all selected Sitecore content tree items now have an extra Source property in the right panel Quick Info section.

Sitecore interface displaying Quick Info panel with item details.

What Are the Possible Source Values?

Resources

A resources source means that the item is stored in an Items as Resources (IAR) .dat file. Sitecore XM Cloud stores default items in resource files (source). Sitecore XM/XP also stores them in resource files from Sitecore 10.1 (source). Sitecore XM Cloud also package all your solution serialized item in resource files (one per database) at deployment time (source).

An item from a resource file cannot be deleted. When one of its field is modified, the whole item is copied to the database and starts being loaded from the database (source).

Database

A database source means that the item is stored and loaded from the database. Items that have been manually created in an environment are stored in the database.

Also, items from resource files that are modified get copied and stored in the database (source). If such a database item is deleted, it reverts back to being loaded from the resource file.

In Which Environments is This Available?

This feature is available in:

  • Local XM Cloud development environments running with containers.
  • Deployed XM Cloud environments.

What to Do if Your Environment Does Not Have This Option

For a local development environment, run the .\up.ps1 script to pull the latest Sitecore XM Cloud Docker base images, rebuild your solution Docker images, and restart the containers.

For a deployed environment, in the Sitecore XM Cloud Deploy App, select the environment and run a “Build and deploy” action to redeploy your solution using the latest Sitecore XM Cloud Docker base images.

Dropdown menu with cursor selecting 'Build and deploy' option.

Troubleshooting Advanced Issues With Items as Resources

To troubleshoot advanced Items as Resources (IAR) issues, I highly recommend the Sitecore Item as Resource Explorer tool built by Sitecore Technology MVP Ghodrat Ashournia.

Thanks to Sitecore community members Robbert Hock and Nick Allen who helped me to find this hidden feature.

Happy Sitecoring!



Meet Jeff L'Heureux

Director of Technology

🧗‍♂️🏔️ 🍺

Jean-François (Jeff) L'Heureux is an experienced leader in Sitecore and Coveo technologies, having worked in both organizations. He is a three-times Sitecore Technology MVP and three-time Coveo MVP. He has 16 years of software development experience, including ten years of Sitecore experience. He specializes in front-end, and he has experience in technologies like Next.js, React, Vercel, Netlify, Docker, Coveo Cloud, Coveo for Sitecore, Sitecore XP/XM, and the latest Sitecore technologies, including XM Cloud, JSS, CDP, Personalize, OrderCloud, Discover, Send, Search, and Content Hub ONE. Outside work, he can be found outside rock climbing, mountain biking, hiking, snowshoeing, or cross-country skiing.

Connect with Jeff