Folder Item Limit Configuration
Introduction
Goal
Learn about folder item limit configurations introduced in Bloomreach Experience Manager 16.9.0 in order to enforce the best practice to keep at most 100 items per folder, for optimal performance and user experience.
Background
Bloomreach Experience Manager contains the content structure in the repository in a folder tree, and UI performance depends on how many items there are in a folder. Best practice is to have no more than 100 items in a folder, as mentioned in How to structure your content.
To be able to enforce this best practice, a configurable improvement was made, on workflow level, so also content imports will adhere to the limits.
How it works
Creating documents, images or assets will return an error if the target folder already contains 100 items. Subfolders are counted as part of the items in a target folder. "Creating" content means adding, copying, translating, uploading, from both the CMS's content perspective and Experience Manager.
The limit of 100 is a default and can be configured, see below. A configured value of -1 will disable the feature (opt-out).
Adding subfolders will always be possible, to not block editors from creating content. Implementation projects should validate that the delivery tier is well-configured to serve content in subfolders.
Technically, a FolderLimitException will be thrown by the workflows FolderWorkflowImpl and GalleryWorkflowImpl, meaning that content import processes using Workflow will use this feature.
Configuration
Configuration follows this precedence: system property, then repository configuration, and finally the default hardcoded value of 100. A negative value (typically -1) will disable the folder item limit validation.
System Property
The system property repository.folderworkflow.item.limit will be checked first to determine the value of the folder item limit.
Repository Configurations
A JCR property item-limit=100 of type Long has been bootstrapped to these places below /hippo:configuration/hippo:workflows where classes org.hippoecm.repository.standardworkflow.FolderWorkflowImpl and org.hippoecm.repository.gallery.impl.GalleryWorkflowImpl are present. These values can be changed separately, for instance if it is wanted to have different values, e.g. different between document and image folders.
// documents
1. /hippo:configuration/hippo:workflows/embedded/folder-extended/hipposys:config
2. /hippo:configuration/hippo:workflows/embedded/folder/hipposys:config
3. /hippo:configuration/hippo:workflows/internal/folder/hipposys:config
4. /hippo:configuration/hippo:workflows/threepane/folder/hipposys:config
5. /hippo:configuration/hippo:workflows/threepane/folder-extended/hipposys:config
6. /hippo:configuration/hippo:workflows/threepane/folder-permissions/hipposys:config
7. /hippo:configuration/hippo:workflows/translation-internal/folder/hipposys:config
8. /hippo:configuration/hippo:workflows/shortcuts/folder/hipposys:config
9. /hippo:configuration/hippo:workflows/subsite/folder/hipposys:config
// images and assets
10. /hippo:configuration/hippo:workflows/threepane/asset-gallery/hipposys:config
11. /hippo:configuration/hippo:workflows/threepane/generic-gallery/hipposys:config
12. /hippo:configuration/hippo:workflows/threepane/image-gallery/hipposys:config
13. /hippo:configuration/hippo:workflows/embedded/gallery/hipposys:config
14. /hippo:configuration/hippo:workflows/gallery/image-gallery/hipposys:config
15. /hippo:configuration/hippo:workflows/gallery/asset-gallery/hipposys:config
16. /hippo:configuration/hippo:workflows/shortcuts/gallery/hipposys:config
Default
If no system property nor item-limit configuration is present (the latter is true on workflows on the outdated directory type instead of folder type), there is a hardcoded default of 100 in the ItemLimitValidator class