Opened 8 years ago
Last modified 3 weeks ago
#40178 new enhancement
Menus that contain post types in Draft status should be hidden from logged out users
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.7.3 |
Component: | General | Keywords: | has-patch 2nd-opinion needs-testing |
Focuses: | ui, administration | Cc: |
Description
I recently added 2 pages to my site. I published them, and moved them into a Menu on my site.
Then realized, I don't want them public, but I also don't want to lose their positioning where I put them in the menu. I moved them to draft.
When I go to my site logged out, I still see the links and goes to a 404.
I'm proposing that when an item in the Menu moves to a non-published state that isn't the Trash (Draft or Pending), it should remain in the nav, but be hidden from any logged out users.
Attachments (4)
Change History (9)
#4
@
8 years ago
- Keywords 2nd-opinion needs-testing added
I think that it would be better not to declare draft content in the menu as "invalid".
I added a new patch that shows draft items as orange with a new warning. They are then filtered out the same way as invalid items, but with a new filter function checking that the content is published.
Customizer support for this approach needs to be added.
#5
@
3 weeks ago
Reproduction Report
Description
This report validates that the issue cannot be reproduced.
Environment
- WordPress: 6.8.1
- PHP: 8.2.27
- Server: nginx/1.26.1
- Database: mysqli (Server: 8.0.35 / Client: mysqlnd 8.2.27)
- Browser: Chrome 137.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.2
- MU Plugins: None activated
- Plugins:
- Admin and Site Enhancements (ASE) 7.8.12
- Site Kit by Google 1.153.0
- Test Reports 1.2.0
- WP Consent API 1.0.8
Actual Results
- ❌ Error condition does not occurs (not reproduced).
Additional Notes
- I created a menu with 3 page links added to it, changed the status of the 2 pages in the menu to draft/pending review. The menu does not show the page links for the pages saved as draft or pending review. The page links are not displayed in the menu to the logged out users as well.
I was able to reproduce this and I agree that it is a bug. Non-published pages do not appear on the dropdown list in Appearance > Menus. However, when once added to a menu, they will appear in the Menu Structure in wp-admin regardless of their publish status.
After proposed patch, unpublished items will appear as such "Name (Invalid)" on the wp-admin part.