Opened 2 months ago
Last modified 4 weeks ago
#63473 new defect (bug)
Most recent tab in classic menu is not showing special pages (front, posts, privacy policy)
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.3 |
Component: | Menus | Keywords: | has-patch has-test-info has-unit-tests dev-feedback |
Focuses: | ui | Cc: |
Description
Steps to reproduce:
- Spin up new WP installation
- Create three new pages (home, privacy policy, blog)
- Set up the page as privacy policy page (Setting -> Privacy)
- Set up the homepage and posts page accordingly (Settings -> Reading)
- Set up a classic theme (no FSE)
- Look at Appearance -> Menus in the sidebar below "Add menu items" and choose "Pages"
The "Most recent" tab does NOT show any of the newly created pages.
Only "View all" or "Search" does reveal those pages, although they are newly created and should shop up as "Most recent" in this case.
This was introduced in #37782 (WordPress 5.3) and I'm not sure if this is useful this way.
Attachments (1)
Change History (16)
This ticket was mentioned in Slack in #core-test by oglekler. View the logs.
7 weeks ago
#3
@
7 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 Eleven 4.9
- 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 occur (unable to reproduce).
Additional Notes
- Created 3 pages - Home, Posts, Privacy Policy. Assigned the privacy policy page to be used as privacy policy from the settings. I can see the pages in the Most Recent tab under the Appearance -> Menu -> Add Menu Item.
Suppliment Artifacts
#4
follow-up:
↓ 6
@
7 weeks ago
As already stated, this is reproducible, but the condition was maybe not clear enough formulated. The assumption from me was, that there is the "example page" still there. Sometimes tools already delete this page (like Local WP).
If there are no pages available other that Home, Front and Privacy page then only it allow these pages in Most recent tab.
You need at least one additional page that is not set up as Blog, Front or Privacy Policy to see that those three pages are hidden.
@avinashbhosale Can you please re-test? Thanks in advance.
This ticket was mentioned in PR #8847 on WordPress/wordpress-develop by @SirLouen.
7 weeks ago
#5
- Keywords has-patch added; needs-patch removed
Replying to @zodiac1978:
You need at least one additional page that is not set up as Blog, Front or Privacy Policy to see that those three pages are hidden.
AFAIK, there is always a Sample Page by default published, unless he used it for any of these 3 important pages.
Anyway, I can confirm your bug.
Judging by the code within the Most Recent tab section within nav-menu.php
$recent_args = array_merge( $args, array( 'orderby' => 'post_date', 'order' => 'DESC', 'posts_per_page' => 15, ) );
There was absolutely no reason for not providing these 3 pages, unless something else is hindering them.
Checking a little further, I found that those 3 pages are having a special treatment, considered "Important pages", but the one who did this, removed them from the list on purpose because it was planned to put them in the top of all the tabs because they are the most important (as the name suggests)
But unfortunately, they forgot to prepend them back to the "Most Recent" tab (but they did it correctly in the View All tab)
@avinashbhosale now you can check the instructions provided by @zodiac1978 to reproduce the bug, and then you test my patch to see if it solves the problem.
Trac ticket: https://core.trac.wordpress.org/ticket/63473
#7
@
7 weeks ago
Test Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: https://patch-diff.githubusercontent.com/raw/WordPress/wordpress-develop/pull/8847.diff
Environment
- WordPress: 6.8.1
- PHP: 8.2.23
- Server: nginx/1.26.1
- Database: mysqli (Server: 8.0.35 / Client: mysqlnd 8.2.23)
- Browser: Chrome 136.0.0.0
- OS: Windows 10/11
- Theme: Twenty Seventeen 3.9
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
- ✅ Issue resolved with patch.
Additional Notes
- This patch resolve the most recent tab in classic menu is not showing special pages issue.
Supplemental Artifacts
Screenshot: https://prnt.sc/G0U1OjK-6CWL
#8
@
7 weeks ago
@zodiac1978 - Thanks for the test info. I tested it again and can reproduce the issue. Also tested the patch and I can confirm that it resolves the issue.
Reproduction Report
Description
This report validates that the issue can 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 Eleven 4.9
- 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 occurs (reproduced).
Supplemental Artifacts
- screenshot: https://prnt.sc/Uiv9kI7AOJ9A
#9
@
7 weeks ago
Test Report
Description
This report validates that the indicated patch works as expected.
Patch tested: https://patch-diff.githubusercontent.com/raw/WordPress/wordpress-develop/pull/8847.diff
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 Eleven 4.9
- 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
- ✅ Issue resolved with patch.
Additional info
- Create 3 pages (For example: Home, Post, Privacy Policy)
- Assign the pages to Front, Blog and Privacy Policy from settings
- Create an additional page (For example: sample page)
- Go to Appearance -> Menu and observe the Most Recent Tab
Supplemental Artifacts
- screenshot: https://prnt.sc/bVeT6j7MoWGO
#10
follow-up:
↓ 11
@
7 weeks ago
Can we can remove the line?
$most_recent = array_slice( $most_recent, 0, 15 );
On the View all tab, we are having 3 Important Pages + 50 pages with pagination.
Same for Most recent tab, We can show 3 important pages + 15 Most recent pages. We don't have slice most recent array.
#11
in reply to:
↑ 10
;
follow-up:
↓ 13
@
7 weeks ago
- Keywords needs-unit-tests added
Replying to umesh.nevase:
Can we can remove the line?
$most_recent = array_slice( $most_recent, 0, 15 );On the View all tab, we are having 3 Important Pages + 50 pages with pagination.
Same for Most recent tab, We can show 3 important pages + 15 Most recent pages. We don't have slice most recent array.
Atm I'm reworking this feature completely and adding some unit tests. I have a better version now, but before pushing it I will be adding the unit tests (that for some reason are not working as expected)
The number 15 is just because the query as you can see is limited to 15 results. In the View All tab for some reason, they have added up to 50 pages with pagination (and there is a bug reported without a solution yet, where pagination goes crazy when there are child pages and it paginates if you want to search for this).
Here I'm going to stick to 15 units, because its the canonical number (and I don't think its a great idea to add more to the default view because theoretically Most recent is not designed to browse posts, for this you have all, and search)
This ticket was mentioned in PR #8848 on WordPress/wordpress-develop by @umesh.nevase.
7 weeks ago
#12
This PR resolve the most recent tab in classic menu is not showing Important pages issue.
Trac ticket: https://core.trac.wordpress.org/ticket/63473
This PR tested on :
WordPress: 6.8.1
PHP: 8.4.7
Server: nginx/1.27.5
Browser: Latest Chrome and Firefox
Theme: Twenty Twenty
#13
in reply to:
↑ 11
@
7 weeks ago
Ok, great, We can stick to 15 units.
Replying to SirLouen:
Replying to umesh.nevase:
Can we can remove the line?
$most_recent = array_slice( $most_recent, 0, 15 );On the View all tab, we are having 3 Important Pages + 50 pages with pagination.
Same for Most recent tab, We can show 3 important pages + 15 Most recent pages. We don't have slice most recent array.
Atm I'm reworking this feature completely and adding some unit tests. I have a better version now, but before pushing it I will be adding the unit tests (that for some reason are not working as expected)
The number 15 is just because the query as you can see is limited to 15 results. In the View All tab for some reason, they have added up to 50 pages with pagination (and there is a bug reported without a solution yet, where pagination goes crazy when there are child pages and it paginates if you want to search for this).
Here I'm going to stick to 15 units, because its the canonical number (and I don't think its a great idea to add more to the default view because theoretically Most recent is not designed to browse posts, for this you have all, and search)
#14
@
7 weeks ago
- Focuses ui added
- Keywords has-unit-tests dev-feedback added; needs-testing needs-unit-tests removed
I've updated my my PR 8847 with full unit tests.
Heads up to @audrasjb @welcher, passing manual tests and unit tests, ready to be shipped 6.9.
I can replicate this issue. I think it is a default behaviour, The query for Most recent pages suppresses the Blog page, front Page and Privacy page. If there are no pages available other that Home, Front and Privacy page then only it allow these pages in Most recent tab.
There is not documentation why Most Recent suppressing those pages.