Skip to:
Content

BuddyPress.org

Opened 4 years ago

Closed 4 years ago

#6891 closed defect (bug) (fixed)

"Reinstall emails" tool fails on Network Admin

Reported by: needle Owned by: djpaul
Milestone: 2.5 Priority: normal
Severity: normal Version:
Component: Core Keywords: has-patch
Cc:

Description

Trying out the new features (nice work BTW!) and find that in multisite installs the "Reinstall emails" tool fails on Network Admin.

The cause is that [10536] prevents the taxonomy from being registered in Network Admin, so the terms are not created due to "Invalid taxonomy" errors.

Attachments (1)

6891.01.patch (462 bytes) - added by DJPaul 4 years ago.

Download all attachments as: .zip

Change History (9)

#1 @imath
4 years ago

  • Keywords reporter-feedback added

Thanks for your feedback @needle could you tell us how BuddyPress is activated ?

Is it network activated, or is it activated on a subsite ?

#2 @needle
4 years ago

@imath Sorry, should have said - network activated.

#3 @DJPaul
4 years ago

To clarify, the email posts are being added, but aren't being assigned to their taxonomies.

#4 @DJPaul
4 years ago

  • Milestone changed from Awaiting Review to 2.5

#5 @DJPaul
4 years ago

The tool function is bp_admin_reinstall_emails and it does have a switch_to_blog but clearly that doesn't internally switch registered taxonomies (TIL).

@DJPaul
4 years ago

#6 @DJPaul
4 years ago

  • Keywords has-patch added; reporter-feedback removed

Patch registers the taxonomy when inside the network admin (which doesn't visually add any menus, because those are hidden), the existing switch_to_blog takes care of switching the tables, and everything ends up in the right place.

#7 @DJPaul
4 years ago

Fixing a bit differently -- using the pattern from r10580 instead. Tested, and it works.

#8 @djpaul
4 years ago

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

In 10581:

Emails: fix "reinstall emails" tool when run from Network Admin.

Similar to r10580, we needed to make sure the email type taxonomy is registered when we switch_to_blog to run the reinstall emails tool on the correct site.

Fixes #6891

Note: See TracTickets for help on using tickets.