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

is_amp_endpoint() produces errors. #1217

Closed
nextgenthemes opened this issue Jun 18, 2018 · 2 comments
Closed

is_amp_endpoint() produces errors. #1217

nextgenthemes opened this issue Jun 18, 2018 · 2 comments

Comments

@nextgenthemes
Copy link

nextgenthemes commented Jun 18, 2018

I am using the is_amp_endpoint() function in my code and I had multiple reports from customers who said recent updates of AMP WP broke it. Someone told me another update fixed it and then another update brought it back. So I like to ask what is going on and if I can use a different future proof way of detecting amp without running into errors.

#986 (comment) speaks of a new way instead of this constant. I saw many issues around this including one where someone closed it claiming that is_amp_endpoint() is not part of this plugin when it actually it, found that very strange ... so not sure where to start.

2018/06/17 17:32:28 [error] 1051#1051: *227322 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught Error: Call to a member function get() on null in /var/www/html/wp-includes/query.php:28
Stack trace:
#0 /var/www/html/wp-content/plugins/accelerated-mobile-pages/includes/vendor/amp/includes/amp-helper-functions.php(44): get_query_var(‘AMP_QUERY_VAR’, false)
#1 /var/www/html/wp-content/plugins/arve-amp/arve-amp.php(28): is_amp_endpoint()
@westonruter
Copy link
Member

The is_amp_endpoint() function has always been part of this plugin.

You are using the accelerated-mobile-pages plugin not the amp plugin. Please report your issue on their repo: https://github.com/ahmedkaludi/accelerated-mobile-pages

@nextgenthemes
Copy link
Author

@westonruter I am not using anything it was from a customer and I copy pasted just the the relevant portion of the report here. But thanks I failed to spot that so he is just running the wrong plugin, I did never intend to support that so I guess there is nothing wrong at all.

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

2 participants