WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 4 months ago

#40607 new defect (bug)

The slug of a menu-item of type "Custom Links" interferes with pages/posts slugs.

Reported by: Karimeo Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Permalinks Keywords:
Focuses: administration Cc:

Description

How to reproduce:

  • Add a menu-item of type "Custom Links" to a menu. Let's say with content "URL = http://google.com / Link Text = Google"
  • Create a page with the same name as the "Link Text" used. In the example with Google, the slug "google" will be taken and "google-2" will be used.

My suggestion would be to just add "-menu" to the slugs of such menu-items as they are not visible anyway ?


Change History (1)

#1 @sabernhardt
4 months ago

  • Component changed from General to Permalinks

@Karimeo Hi and thanks for the report!

Please try again with the latest WordPress version (5.4.1). It somehow worked for me, so this may have been solved another way.

Custom menu link:

 <title>google</title>
 <link>http://localhost/wp54/google/</link>
 <pubDate>Tue, 12 May 2020 06:19:26 +0000</pubDate>
 <guid isPermaLink="false">http://localhost/wp54/?p=54</guid>
 <wp:post_name><![CDATA[google]]></wp:post_name>
 <wp:status><![CDATA[publish]]></wp:status>
 <wp:post_type><![CDATA[nav_menu_item]]></wp:post_type>

Page created after menu item with same slug:

 <title>google</title>
 <link>http://localhost/wp54/google/</link>
 <pubDate>Tue, 12 May 2020 06:19:47 +0000</pubDate>
 <guid isPermaLink="false">http://localhost/wp54/?page_id=55</guid>
 <wp:post_name><![CDATA[google]]></wp:post_name>
 <wp:status><![CDATA[publish]]></wp:status>
 <wp:post_type><![CDATA[page]]></wp:post_type>
Note: See TracTickets for help on using tickets.