Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#12040 closed defect (bug) (wontfix)

switch_to_blog() does not handle permalinks

Reported by: wpmuguru's profile wpmuguru Owned by: wpmuguru's profile wpmuguru
Milestone: Priority: normal
Severity: normal Version:
Component: Multisite Keywords: has-patch needs-testing
Focuses: Cc:

Description

MU Trac Ticket: http://trac.mu.wordpress.org/ticket/1168

When you run switch_to_blog() and then output any of the code that displays permalinks, the permalink structure remains that of the originating blog. If you switch to the main blog on a sub-directory install, links to posts/pages break, because the initial '/blog/' is left off the permalink. This patch adds permalinks, category base and tag base handling to the switch_to_blog and restore_current_blog functions.

Not tested in a subdomain install. If anyone could help out with testing, that'd be great. Thanks!

Change History (5)

#1 @wpmuguru
13 years ago

  • Milestone changed from Unassigned to 3.0
  • Owner set to wpmuguru
  • Status changed from new to assigned

#2 @wpmuguru
13 years ago

  • Milestone changed from 3.0 to 3.1

In 3.0 we are flushing out the custom post_type support. What I would like to do here is write a plugin that does this using the switch_to_blog/restore_current_blog hooks and work out the bugs in the methodology in the plugin.

The second thing is that this adds a fair amount of processing. We won;t want to impose that on everyone.

#3 @wpmuguru
13 years ago

Closed duplicate #13530.

#4 @wpmuguru
13 years ago

  • Resolution set to wontfix
  • Status changed from assigned to closed

Per discussion in IRC, this would be too CPU expensive to impose on all network installs. This can be done in a plugin via the switch_blog hook.

#5 @nacin
13 years ago

  • Milestone 3.1 deleted
Note: See TracTickets for help on using tickets.