Is there some trick with placeholders in Sitecore MVC to ensure that they are always selectable in the page editor experience editor even when they don't contain any renderings? My controller rendering declares the placeholder in the cshtml view as follows:
<div>
<!-- some html markup and fields rendered here -->
@Html.Sitecore().Placeholder("my-component-placeholder")
</div>
In case you are using some kind of dynamic placeholder keys, there is a setting that controls if empty placeholders without settings are editable. It is located in the Sitecore.ExperienceEditor.config.
The default value is false. If set to true, empty placeholders can be edited:
Solved by setting Query.MaxItems:
Explanation:
In large projects you may have a lot of placeholders (more then 260 what is default amount of items Sitecore Query API reads at one time).
Sitecore team set the limitation but Placeholder cache was not fixed and still reads items only once so as a result placeholders which weren't added into cache because of the limitation are skipped.
This is the code of the cache manager taken from reflector:
To ensure placeholder visibility and selectability, you need to ensure the following:
Placeholder Key
matching that declared in the cshtml rendering.Editable
setting checked.