Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 6 years ago

#23840 closed defect (bug) (invalid)

current_site, wpms, ajax

Reported by: meglio's profile meglio Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5.1
Component: Multisite Keywords:
Focuses: Cc:

Description

Doing an ajax request to:
http://2.wp.meg/wp-admin/admin-ajax.php

In ajax handler, both global $current_site and get_current_site() is always id=1 (eg the main site).

With id=1 I Have website wp.meg, while 2.wp.meg is the second one on my multisite installation.

Change History (4)

#1 @meglio
13 years ago

Am I just confused with site_id and blog_id and do they have different meaning?

#2 @mark-k
13 years ago

  • Keywords close added

Probably. site in the "network" context is the whole network. Potentially you can have more then one network based on the same WP install although there is no UI in core to support that.

You should probably use the $blog_id global.

In any case, this is not the right place to ask this kind of question, unless you are sure there is a bug, or you suggest an enhancement, you should try asking at the support forums first.

#3 @SergeyBiryukov
13 years ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Severity changed from major to normal
  • Status changed from new to closed

This ticket was mentioned in Slack in #core-editor by mkaz. View the logs.


6 years ago

Note: See TracTickets for help on using tickets.