Make WordPress Core

Opened 10 months ago

Last modified 4 weeks ago

#51147 reviewing defect (bug)

avoid_blog_page_permalink_collision shouldn't change the post_name when the page has a parent.

Reported by: stormrockwell Owned by: SergeyBiryukov
Milestone: Future Release Priority: normal
Severity: normal Version: 5.5
Component: Posts, Post Types Keywords: has-patch has-unit-tests
Focuses: administration, multisite Cc:


How to reproduce:

Create multisite install (subdirectory)
Add subsite "bar"
On the main site, create a page for "foo" and a page for "bar" with the parent "foo"

When trying to publish that page you will get /foo/bar{rand1-10}.

Attachments (4)

51147.diff (455 bytes) - added by stormrockwell 10 months ago.
51147.2.diff (2.8 KB) - added by stormrockwell 10 months ago.
Add unit test
51147.3.diff (2.8 KB) - added by stormrockwell 10 months ago.
Unit tests & fix typo in comment.
51147.4.diff (2.8 KB) - added by stormrockwell 10 months ago.
Change the class name

Download all attachments as: .zip

Change History (9)

#1 @SergeyBiryukov
10 months ago

  • Component changed from Administration to Posts, Post Types
  • Focuses administration multisite added
  • Keywords has-patch needs-unit-tests added
  • Milestone changed from Awaiting Review to 5.6
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

Hi there, welcome back to WordPress Trac!

Thanks for the ticket and the patch, this makes sense at a glance.

A unit test to confirm the fix would also be great.

10 months ago

Add unit test

#2 @stormrockwell
10 months ago

This was my first go at unit tests. Any feedback is much appreciated.

10 months ago

Unit tests & fix typo in comment.

10 months ago

Change the class name

#3 @helen
8 months ago

  • Milestone changed from 5.6 to Future Release
  • Version changed from trunk to 5.5

Don't want to go changing these internals in late beta, moving out of 5.6 and assigning the reported version to 5.5 although I imagine this has existed since long before that. If this really is new to trunk please feel free to move back and kindly add more context around what change caused it.

#4 @stormrockwell
7 months ago

  • Keywords has-unit-tests added; needs-unit-tests removed

#5 @stormrockwell
4 weeks ago

Is there anything else you need from me on this?

Note: See TracTickets for help on using tickets.