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

Plugin Conflict: Also using Give plugin currently creates 500 server error when viewing /wp-admin/ #1720

Closed
KZeni opened this issue Dec 7, 2018 · 4 comments
Milestone

Comments

@KZeni
Copy link
Contributor

KZeni commented Dec 7, 2018

I’m getting a 500 server error when trying to access the site admin after updating AMP to the latest version while also running the current version of https://wordpress.org/plugins/give/. Turns out that there’s a conflict with Give which my sites were running into. I also believe the issue could be specific to PHP 7.x (a matter of the number of variables provided to a function vs. what was expected).

I’ve opted to disable AMP to avoid this error until this is fixed since Give is more important to the site than AMP is.

This issue has also been reported at https://wordpress.org/support/topic/http-error-500-after-updating/ (topic was marked as resolved by the topic author after finding they could disable Give, but that doesn't mean the underlying issue has been resolved & those that want to use Give and AMP together are still having the issue.)

@Jany-M
Copy link

Jany-M commented Dec 11, 2018

Same here, but it might look like this needs a better fallback/failsafe, not just Give conflicting.

[11-Dec-2018 15:24:30 UTC] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function AMP_Validated_URL_Post_Type::filter_the_title_in_post_list_table(), 1 passed in /var/www/vhosts/site.com/httpdocs/wp-includes/class-wp-hook.php on line 286 and exactly 2 expected in /var/www/vhosts/site.com/httpdocs/wp-content/plugins/amp/includes/validation/class-amp-validated-url-post-type.php:1897
Stack trace:
#0 /var/www/vhosts/site.com/httpdocs/wp-includes/class-wp-hook.php(286): AMP_Validated_URL_Post_Type::filter_the_title_in_post_list_table('#20SECONDS')
#1 /var/www/vhosts/site.com/httpdocs/wp-includes/plugin.php(203): WP_Hook->apply_filters('#20SECONDS', Array)
#2 /var/www/vhosts/site.com/httpdocs/wp-content/plugins/give/includes/admin/shortcodes/abstract-shortcode-generator.php(301): apply_filters('the_title', '#20SECONDS')
#3 /var/www/vhosts/site.com/httpdocs/wp-content/plugins/give/includes/admin/shortcodes/abstract-shortcode-generator.php(153): Give_Shortcode_Generator->generate_post(Array)
#4 /va in /var/www/vhosts/site.com/httpdocs/wp-content/plugins/amp/includes/validation/class-amp-validated-url-post-type.php on line 1897

@KZeni
Copy link
Contributor Author

KZeni commented Dec 11, 2018

Alrighty. I've found a quick patch which prevents the error within the AMP plugin if/when too few arguments are provided while still honoring if/when that additional argument is provided.

Pull request is here with the proposed patch: #1725

@westonruter westonruter added this to the v1.0.1 milestone Dec 11, 2018
westonruter pushed a commit to KZeni/amp-wp that referenced this issue Dec 11, 2018
…rror when viewing site admin)

See additional details here: ampproject#1720
@kienstra
Copy link
Contributor

Hi @KZeni,
Thanks for bringing this up, and for opening #1725. I've also opened impress-org/givewp#3899.

@westonruter
Copy link
Member

Closing since PRs merged for AMP plugin.

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

No branches or pull requests

4 participants