Skip to content
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

PHP Fatal error on Pressable site with Jetpack beta #5716

Closed
rachelsquirrel opened this issue Nov 18, 2016 · 2 comments · Fixed by #5720
Closed

PHP Fatal error on Pressable site with Jetpack beta #5716

rachelsquirrel opened this issue Nov 18, 2016 · 2 comments · Fixed by #5720
Assignees
Labels
General [Pri] BLOCKER [Type] Bug When a feature is broken and / or not performing as intended
Milestone

Comments

@rachelsquirrel
Copy link

There's a server error 500 on my Pressable site - http://rachelsquirrel.mystagingwebsite.com

This is in the debug.log


[18-Nov-2016 14:29:11 UTC] PHP Fatal error:  Uncaught Error: Call to a member function using_index_permalinks() on null in /rachelsquirrel/wp-content/plugins/jetpack-pressable-beta/jetpack.php:41
Stack trace:
#0 /wordpress/core/4.6.1/wp-includes/plugin.php(235): jetpack_index_permalinks_rest_api_url('wp-json')
#1 /wordpress/core/4.6.1/wp-includes/rest-api.php(168): apply_filters('rest_url_prefix', 'wp-json')
#2 /rachelsquirrel/wp-content/plugins/woocommerce/includes/api/class-wc-rest-authentication.php(36): rest_get_url_prefix()
#3 /rachelsquirrel/wp-content/plugins/woocommerce/includes/api/class-wc-rest-authentication.php(55): WC_REST_Authentication->is_request_to_rest_api()
#4 /wordpress/core/4.6.1/wp-includes/plugin.php(235): WC_REST_Authentication->authenticate(false)
#5 /wordpress/core/4.6.1/wp-includes/user.php(2500): apply_filters('determine_curre...', false)
#6 /wordpress/core/4.6.1/wp-includes/pluggable.php(69): _wp_get_current_user()
#7 /wordpress/core/4.6.1/wp-includes/user.php(428): wp_get_current_user()
#8 /rachelsquirrel/wp-content/plugins in /rachelsquirrel/wp-content/plugins/jetpack-pressable-beta/jetpack.php on line 41

The creds for the server are available in the VaultPress MC (#39826).

@rachelsquirrel rachelsquirrel added the [Type] Bug When a feature is broken and / or not performing as intended label Nov 18, 2016
@jeherve jeherve added this to the 4.4 milestone Nov 18, 2016
@jeherve
Copy link
Member

jeherve commented Nov 18, 2016

Related: #5345

cc @kraftbj

@kraftbj
Copy link
Contributor

kraftbj commented Nov 18, 2016

I haven't dove too deeply into this, but it looks like the $wp_rewrite global isn't set yet (and will be afk until post-release)? We can probably check to see if $wp_rewrite is an object with a using_index_permalinks method before applying the hotfix?

@rachelsquirrel did you perform any action to generate this error? I'm thinking adding the checks above is good for Jetpack, but wonder if the same thing would happen on 4.7 with the same plugins enabled since Core added using $wp_rewrite there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
General [Pri] BLOCKER [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants