Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

#6226 closed defect (bug) (fixed)

Multisite: Deleting a post that matches a BP page ID will wipe out the directory page mapping

Reported by: r-a-y's profile r-a-y Owned by:
Milestone: 2.2.1 Priority: highest
Severity: blocker Version: 2.2
Component: Core Keywords: commit
Cc:

Description

r9177 introduced functionality to delete BP's directory page marker when the corresponding page ID is deleted.

Unfortunately, r9177 forgot to add a check to see if we're on the BP root blog.

The problem is if a sub-site deletes a post whose page ID matches a BP directory page ID, the BP directory page marker is removed.

Will try to write a unit test for this, but it's kind of hard to write a test to match post IDs.

BP forum thread that sparked this ticket: https://buddypress.org/support/topic/page-templates-disassociate/

Attachments (2)

6226.01.patch (504 bytes) - added by r-a-y 10 years ago.
6226.unit-test.patch (1.4 KB) - added by r-a-y 10 years ago.
Corresponding unit test for #6226.

Download all attachments as: .zip

Change History (9)

@r-a-y
10 years ago

#1 @johnjamesjacoby
10 years ago

  • Keywords commit added; has-patch removed
  • Milestone changed from 2.2.2 to 2.2.1
  • Priority changed from high to highest
  • Severity changed from normal to blocker

Moving to 2.2.1.

This is a nasty bug causing data loss for multisite installations with a straightforward fix.

Thanks again, Ray.

#2 @johnjamesjacoby
10 years ago

In 9505:

When removing directory pages, bail if request is not made from the root site ID.

This prevents accidental data loss when deleting pages from non-root blogs.

Props r-a-y. See #6226. (2.2 branch, for 2.2.1)

#3 @johnjamesjacoby
10 years ago

In 9506:

When removing directory pages, bail if request is not made from the root site ID.

This prevents accidental data loss when deleting pages from non-root blogs.

Props r-a-y. See #6226. (2.2.1 tag)

#4 @johnjamesjacoby
10 years ago

In 9507:

When removing directory pages, bail if request is not made from the root site ID.

This prevents accidental data loss when deleting pages from non-root blogs.

Props r-a-y. See #6226. (trunk)

@r-a-y
10 years ago

Corresponding unit test for #6226.

#5 @johnjamesjacoby
10 years ago

In 9509:

Unit test for bp_core_get_directory_pages(). Props r-a-y. See #6226 (trunk)

#6 @johnjamesjacoby
10 years ago

In 9510:

Unit test for bp_core_get_directory_pages(). Props r-a-y. See #6226 (2.2 branch)

#7 @johnjamesjacoby
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Thanks Ray for the quick fixes.

Marking as resolved.

Note: See TracTickets for help on using tickets.