Make WordPress Core

Opened 9 years ago

Closed 3 years ago

Last modified 3 years ago

#40607 closed defect (bug) (worksforme)

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

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

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 (3)

#1 @sabernhardt
6 years ago

  • Component GeneralPermalinks

@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>

#2 @kebbet
3 years ago

  • Resolutionworksforme
  • Status newclosed

Testing with 6.4.2, can not reproduce the described issue.

#3 @swissspidy
3 years ago

  • Milestone Awaiting Review
Note: See TracTickets for help on using tickets.