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

Compatibility with WP Graphql #1239

Closed
sagararyal opened this issue Mar 3, 2021 · 5 comments · Fixed by #1243
Closed

Compatibility with WP Graphql #1239

sagararyal opened this issue Mar 3, 2021 · 5 comments · Fixed by #1243

Comments

@sagararyal
Copy link

Bug Report

Activating Stream Crashes WP GraphQL (not sure if the issue is with Stream or WP GraphQL, but WP points to the file below)
Loading siteurl/graphql

results to:
Screen Shot 2021-03-03 at 10 46 42 PM

System Information

  • Stream plugin version: Version 3.6.2
  • WP GraphQL: Version 1.2.5
  • WP GraphQL WPML : Version 0.0.1
  • WordPress version: 5.6.2
  • PHP version: 7.4
  • Browser: Any
  • Computer operating system: Any
@kidunot89
Copy link
Contributor

@sagararyal Sorry for the late response. Are you using any other plugins or have some Alerts set to trigger?

@sagararyal
Copy link
Author

sagararyal commented Mar 6, 2021

@kidunot89 Just activating stream creates the issue. No alerts set.

I have WPML, ACF; and Cloudflare; but I also have another identical site with same set of plugins excluding GraphQL; where stream works perfectly.

If you can't reproduce, I can probably create a staging access for you.

@kidunot89
Copy link
Contributor

@sagararyal Can you test you setup against the branch in ☝🏿 PR #1243

@sagararyal
Copy link
Author

sagararyal commented Mar 22, 2021

@kidunot89 the issue is still present in the above PR.

Same error; from NGINX log

2021/03/22 16:28:11 [error] 20162#20162: *389944 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function get_current_screen() in /var/www/blog.plant-for-the-planet.org/htdocs/wp-content/plugins/stream-bugfix-get_current_screen/classes/class-alerts-list.php:59
Stack trace:
#0 /var/www/blog.plant-for-the-planet.org/htdocs/wp-includes/class-wp-hook.php(287): WP_Stream\Alerts_List->parse_request()
#1 /var/www/blog.plant-for-the-planet.org/htdocs/wp-includes/plugin.php(212): WP_Hook->apply_filters()
#2 /var/www/blog.plant-for-the-planet.org/htdocs/wp-includes/class-wp.php(379): apply_filters()
#3 /var/www/blog.plant-for-the-planet.org/htdocs/wp-includes/class-wp.php(745): WP->parse_request()
#4 /var/www/blog.plant-for-the-planet.org/htdocs/wp-includes/functions.php(1291): WP->main()
#5 /var/www/blog.plant-for-the-planet.org/htdocs/wp-blog-header.php(16): wp()
#6 /var/www/blog.plant-for-the-planet.org/htdocs/index.php(17): require('/var/www/blog.p...')
#7 {main}
  thrown in /var/www/blog.plant-for-the-planet.org/htdocs/wp-content/plu" while reading response header from upstream, client: 3.64.65.151, server: blog.plant-for-the-planet.org, request: "POST /graphql HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php74-fpm-blog.plant-for-the-planet.org.sock:", host: "blog.plant-for-the-planet.org", referrer: "https://blog.plant-for-the-planet.org/graphql"
2021/03/22 16:29:26 [error] 20163#20163: *389986 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function get_current_screen() in /var/www/blog.plant-for-the-planet.org/htdocs/wp-content/plugins/stream-bugfix-get_current_screen/classes/class-alerts-list.php:59
Stack trace:
#0 /var/www/blog.plant-for-the-planet.org/htdocs/wp-includes/class-wp-hook.php(287): WP_Stream\Alerts_List->parse_request()
#1 /var/www/blog.plant-for-the-planet.org/htdocs/wp-includes/plugin.php(212): WP_Hook->apply_filters()
#2 /var/www/blog.plant-for-the-planet.org/htdocs/wp-includes/class-wp.php(379): apply_filters()
#3 /var/www/blog.plant-for-the-planet.org/htdocs/wp-includes/class-wp.php(745): WP->parse_request()
#4 /var/www/blog.plant-for-the-planet.org/htdocs/wp-includes/functions.php(1291): WP->main()
#5 /var/www/blog.plant-for-the-planet.org/htdocs/wp-blog-header.php(16): wp()
#6 /var/www/blog.plant-for-the-planet.org/htdocs/index.php(17): require('/var/www/blog.p...')
#7 {main}
  thrown in /var/www/blog.plant-for-the-planet.org/htdocs/wp-content/plu" while reading response header from upstream, client: 3.64.65.151, server: blog.plant-for-the-planet.org, request: "POST /graphql HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php74-fpm-blog.plant-for-the-planet.org.sock:", host: "blog.plant-for-the-planet.org", referrer: "https://blog.plant-for-the-planet.org/graphql"

@sagararyal
Copy link
Author

Just ran some more tests:

The issue could also be related to:
https://github.com/rburgst/wp-graphql-wpml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants