WordPress.org

Make WordPress Core

Opened 16 months ago

Last modified 16 months ago

#20082 new defect (bug)

Admin bar links to wrong site in multisite (subdomain) network

Reported by: niklasbr Owned by:
Priority: normal Milestone: Awaiting Review
Component: Administration Version: 3.3.1
Severity: major Keywords:
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.

Attachments (1)

Skärmavbild 2012-02-20 kl. 10.39.48.png (66.5 KB) - added by niklasbr 16 months ago.
Wrong URL generated

Download all attachments as: .zip

Change History (4)

niklasbr16 months ago

Wrong URL generated

comment:1 follow-up: solarissmoke16 months 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 dd3216 months ago

  • Description modified (diff)

comment:3 in reply to: ↑ 1 niklasbr16 months ago

  • Keywords reporter-feedback removed

Replying to solarissmoke:

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

The admin-bar.js script is being loaded from the correct url (which is also the URL being visited) but the links in the admin bar goes to a different site (the blue highlight).

Note: See TracTickets for help on using tickets.