Skip to content

Replace wpmu_current_site() in sunrise.php #303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jzaefferer opened this issue May 19, 2014 · 9 comments
Closed

Replace wpmu_current_site() in sunrise.php #303

jzaefferer opened this issue May 19, 2014 · 9 comments

Comments

@jzaefferer
Copy link
Member

In sunrise.php we currently use wpmu_current_site(). This was deprecated in 3.9 with no replacement: https://core.trac.wordpress.org/ticket/27702

@nacin since you implemented that change, can you recommend a replacement or implement one? Thanks.

@jzaefferer
Copy link
Member Author

Btw. this isn't the only notice/warning I get after updating my local WordPress to 3.9.1. I can't tell if they are related or not. This is the full list:

Notice: wpmu_current_site is deprecated since version 3.9 with no alternative available. in /Users/jza/dev/wordpress-3.4/wp-includes/functions.php on line 3085

Warning: Creating default object from empty value in /Users/jza/dev/wordpress-3.4/jquery-wp-content/sunrise.php on line 6

Notice: Undefined property: stdClass::$blog_id in /Users/jza/dev/wordpress-3.4/wp-includes/functions.php on line 3530

Notice: Undefined property: stdClass::$path in /Users/jza/dev/wordpress-3.4/wp-includes/ms-default-constants.php on line 54

Notice: Undefined property: stdClass::$path in /Users/jza/dev/wordpress-3.4/wp-includes/ms-default-constants.php on line 60

Notice: Undefined property: stdClass::$blog_id in /Users/jza/dev/wordpress-3.4/wp-includes/functions.php on line 3530

@kborchers
Copy link
Member

@nacin Another ping on this since you just commented on #316 Should we be finding a different way to do this without the deprecated method?

@nacin
Copy link
Member

nacin commented Sep 25, 2014

Thanks to all of the cool stuff I thought about while writing jquery.com's sunrise.php two years ago, and since implemented in WordPress 3.9, we can greatly simplify sunrise.php. But it'll work fine until that happens. Happy to dig in once I'm back from my current trip next week.

@nacin nacin closed this as completed Sep 25, 2014
@nacin nacin reopened this Sep 25, 2014
kborchers added a commit to kborchers/jquery-wp-content that referenced this issue Sep 25, 2014
kborchers added a commit to kborchers/jquery-wp-content that referenced this issue Sep 25, 2014
@kborchers
Copy link
Member

Great, thanks!

kborchers added a commit that referenced this issue Oct 6, 2014
@aprillins
Copy link

@nacin I still got this when I use WordPress 3.9 and up (4.1). My PHP Version is 5.5.9. I just don't know how to solve this.
gotthis

@jzaefferer
Copy link
Member Author

Yeah, I still get those, too.

@gnarf
Copy link
Member

gnarf commented Oct 9, 2015

Ping @nacin - this isn't really blocking me from pushing infrastructure updates, but it is very unfortunate.

Any chance you can update this process for us or suggest someone who could help?

@nacin
Copy link
Member

nacin commented Oct 10, 2015

Hey all, sorry for never following up on this. I'm slammed through the end of the month but I asked @jeremyfelt (the WordPress multisite maintainer) if he has time to look. This should not be hard to fix -- stuff changed in 3.9 to make things better, and in the process broke my hack while also making it easier to do what I had originally tried to do. My work on jquery-wp-content specifically led to the work in core, so thank you for inspiring WP development!

@gnarf
Copy link
Member

gnarf commented Oct 13, 2015

Fixed in 41db0b2 #379

@gnarf gnarf closed this as completed Oct 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

5 participants