WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 3 months ago

#20082 new defect (bug)

Admin bar links to wrong site in multisite (subdomain) network — at Version 2

Reported by: niklasbr Owned by:
Milestone: Awaiting Review Priority: normal
Severity: major Version: 3.3.1
Component: Permalinks Keywords:
Focuses: multisite Cc:

Description (last modified by dd32)

The code

	foreach ( $actions as $link => $action ) {
		list( $title, $id ) = $action;

		$wp_admin_bar->add_menu( array(
			'parent'    => 'new-content',
			'id'        => $id,
			'title'     => $title,
			'href'      => admin_url( $link )
		) );
	}

generates the wrong URL, whenever I visit a site that has the URL subsite.subsite.example.com but generates the correct URL if the URL is of the pattern subsite.example.com. On subsite.subsite.example.com the admin bar will generate links to subsite.example.com.

Change History (3)

niklasbr2 years ago

Wrong URL generated

comment:1 solarissmoke2 years ago

  • Keywords reporter-feedback added

Which link is wrong? The one highlighted in blue has the form a.b.domain.tld which looks correct?

comment:2 dd322 years ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.