Hi Sitecorians! 👋
I’m back with another installment of my Sitecore Content Hub Tips & Tricks series. This series is dedicated to sharing real-project learnings, platform nuances, and small but impactful configuration tweaks that can save significant development and debugging time.
In this part, we dive into a few frequently misunderstood areas that often lead to silent failures or unexpected UI behavior: Component Nesting and Advanced Relation Filtering.
All scenarios discussed here are based on actual implementation cases.
Tip 1: The Invisible Creation Component Fields (Nested Entity Details Component)
A common and confusing issue is when the creation modal opens, but no fields are visible. This is usually misdiagnosed as a schema or permission problem.
The Problem
- A Creation Component is properly configured on the main page (e.g., Page X).
- The correct Detail Page (e.g., Page Y) is assigned in the settings.
- Clicking Create (+) opens the modal successfully.
- Crucially, no fields or members are rendered—the modal is blank.
The Root Cause
The most frequent cause stems from component reuse and a hidden setting:
The Entity Details Component on the assigned Detail Page (Page Y) has been accidentally marked as “Nested.”
When the Entity Details Component is flagged as Nested, it is designated for internal-use only (typically for displaying content within another component, not as the primary entity editor). As a result, the Creation Component treats it as unusable and fails to render any entity fields, resulting in the blank modal.
Resolution
- Navigate to the Detail Page configured in your Creation Settings (Page Y).
- Open the Entity Details Component on that page.
- Go to Component Settings.
- Locate the Nested toggle (it may be labeled Is Nested).
- Disable this option.
- Save the page and re-test the creation flow.
- The Entity Details Component can become nested automatically based on the selected Source.
- If Component Settings → Source = Choose definition, the system displays a message indicating that the component will be set to Nested.
- After this, every edit and save operation automatically converts the component into a Nested component.
- A Nested Entity Details Component cannot be rendered inside a Creation Component, which results in a blank creation modal.
- When Source = From entity identifier or From event, the component does not become nested automatically and continues to function correctly for entity creation.
Tip 2: Controlling Selectable Relations with Nested Search
The Nested Search Component is specifically designed for reusability. Its most powerful and intended use is to apply dynamic filtering logic to relation fields within the Entity Details Component.
🎯 Use Case: Restricting a Relation Field to Specific User Groups
The Requirement:
- Entity: Marketing Campaign
- Relation Field: Contacts (a User relation)
- Goal: Only users belonging to the Internal.Users group should be selectable in this field.
This ensures data quality by preventing the linking of external users to internal-only campaigns.
⚙️ Step-by-Step Configuration
Step 1: Create the Filtered Nested Search Component
- On the Detail Page assigned to your entity, add a Search Component.
- In the component's Filtering tab, apply the required filter:
- UserGroup (UserGroup) = Internal.Users
- Open the Functionality tab.
- Enable the option: ✅ Use in relation editor.
- This action automatically marks the component as Nested and makes it available for relation field settings.
- Save the page.
Step 2: Attach the Nested Search to the Relation Field
- Navigate back to the Entity Details Component.
- Locate and open the Contacts relation field configuration.
- In the field settings, navigate to Functionality → Search Configuration.
- Select the Nested Search Component you created in Step 1.
- Save the field configuration.
Result
When a user opens the entity creation/edit form:
The lookup modal for the Contacts field will now only display and allow selection of users from the Internal.Users group, enforcing the business rule at the query level.
Tip 3: Expediting Permission Debugging with Security Diagnostics
Security permission issues are notoriously difficult to debug in complex enterprise systems. Sitecore Content Hub provides a dedicated tool to quickly verify the security context of a specific user against a specific entity: Security Diagnostics.
Purpose
Use Security Diagnostics to verify why a user:
- Cannot view an asset or page.
- Cannot edit a specific piece of data.
- Cannot perform actions (e.g., Upload, Edit).
How to Use the Tool
- Access the Tool: Navigate to the Manage page and search for Security Diagnostics.
- Pro-Tip: You can directly access it by appending /en-us/admin/security-diagnostics to your Content Hub domain URL.
- Input Context: You will need two key pieces of information:
- User Identifier: The email or username of the user you are testing (e.g., test123@company.com).
- Entity ID: The unique identifier of the asset, entity, or page you are testing permissions against (e.g., a file's asset ID, a page ID, or an entity's unique identifier).
- Review Results: The tool will instantly display an exhaustive, hierarchical breakdown of all security roles, policies, and conditions that apply to the selected User for the specified Entity ID. This allows you to pinpoint the exact policy that is granting or denying a specific permission (e.g., Read, Write, Edit).
This tool is invaluable for moving beyond guesswork and directly identifying missing or conflicting security policies.
Conclusion
These hidden platform behaviors—whether it's the subtle impact of the Nested component flag or the advanced filtering power of a Nested Search—are often the difference between a smooth implementation and hours of frustrating debugging. By understanding the intentional design behind component reuse and leveraging the Security Diagnostics tool effectively, you can build more robust and predictable solutions in Sitecore Content Hub. Stay tuned for the next set of tips!