[5.x]: Hide sidebar if only one entry section is available
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 134
Description
What happened?
Description
I have an entry selection field that has multiple sections available, but due to user permissions, only one is available. Meaning the sidebar is now redundant and shouldn't be displayed as only one item is available.
Steps to reproduce
- Add an entries field
- Select multiple sections
- Restrict user permissions to only make one of those sections available
- See needless sidebar
Expected behavior
The sidebar should not be visible as it's redundant and takes up a lot of space.
Actual behavior
Craft CMS version
5.6.13
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in Craft CMS 5.6.13 by creating an entries field with multiple sections and restricting permissions so only one remains available. Inspect the entry selection field and sidebar behavior; done means the sidebar is hidden when exactly one section is available while remaining visible for multiple sections.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100