• Resolved warrentab

    (@warrentab)


    Hello;

    After updating my AMP plugin I encountered this fatal error (below):
    Can you please let me know what I must do in order to update the plugin?
    (Or is a different plugin recommended?)

    Thank you.

    Fatal error: Uncaught AmpProject\AmpWP\Exception\InvalidService: The service ID "paired_routing" is not recognized and cannot be retrieved. in /home/customer/www/crossicehockey.com/public_html/wp-content/plugins/amp/src/Exception/InvalidService.php:57 Stack trace: #0 /home/customer/www/crossicehockey.com/public_html/wp-content/plugins/amp/src/Infrastructure/ServiceContainer/SimpleServiceContainer.php(39): AmpProject\AmpWP\Exception\InvalidService::from_service_id('paired_routing') #1 /home/customer/www/crossicehockey.com/public_html/wp-content/plugins/amp/src/Services.php(55): AmpProject\AmpWP\Infrastructure\ServiceContainer\SimpleServiceContainer->get('paired_routing') #2 /home/customer/www/crossicehockey.com/public_html/wp-content/plugins/amp/includes/amp-helper-functions.php(1861): AmpProject\AmpWP\Services::get('paired_routing') #3 /home/customer/www/crossicehockey.com/public_html/wp-content/plugins/amp/includes/amp-helper-functions.php(744): amp_has_paired_endpoint() #4 /home/customer/www/crossicehockey.com/public_ht in /home/customer/www/crossicehockey.com/public_html/wp-content/plugins/amp/src/Exception/InvalidService.php on line 57
    There has been a critical error on this website. Please check your site admin email inbox for instructions.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 18 total)
  • @warrentab Thanks for getting in touch. We’re aware of this issue and are currently investigating.

    Can you tell me if your site is using the tagDiv Mobile Theme plugin?

    Thread Starter warrentab

    (@warrentab)

    Hello, Bethany:

    Thank you so much for your quick response. Yes, I am using that plugin.

    @warrentab Thank you! As a temporary solution, can you try deactivating the tagDiv Mobile Theme plugin? We’re still investigating, but it appears that this conflict could be related. I’ll let you know as soon as we have more info.

    Thread Starter warrentab

    (@warrentab)

    OK, will do. Should I activate AMP after doing so?

    Also, on a separate but related matter, despite the fact that I have the AMP plugin installed, Google often sends notifications that they detected that I am not using the AMP plugin.

    Should I be using a different one, like AMP for Google or something?

    Thank you again,

    Warren

    @warrentab Yes, once you deactivate the tagDiv plugin you should be able to activate the AMP plugin once again. While we continue to investigate, can you also reach out to the TagDiv support team to report this issue?

    Also, on a separate but related matter, despite the fact that I have the AMP plugin installed, Google often sends notifications that they detected that I am not using the AMP plugin.

    I’m unsure why this would be happening, but those emails are generated by the overall AMP service. You can reach out via their support forum for more details. That said, you can safely ignore those emails, as well. šŸ™‚

    Thread Starter warrentab

    (@warrentab)

    Hi, Bethany:

    I will do that. Thank you again for your fast reply and for following up with me.
    Please keep me posted on your developments.

    Kind regards,

    Warren T.

    @warrentab No problem, and will do.

    Plugin Author Weston Ruter

    (@westonruter)

    I have a pull request for testing: https://github.com/ampproject/amp-wp/pull/6184

    You can find a production amp.zip build of here: https://github.com/ampproject/amp-wp/pull/6184#issuecomment-834647329

    (Please note the version will be shown as 2.2-alpha.)

    The crux of the problem is that the tagDiv theme for some reason is disabling AMP with the amp_is_enabled filter. When this is done, a call to is_amp_endpoint() would cause the fatal error because the underlying PairedRouting service that the function relies on is not registered. So in this new PR it’s now catching the exception and emitting a _doing_it_wrong() notice instead.`

    Thread Starter warrentab

    (@warrentab)

    Thank you for the explanation. How can this be fixed? (Please excuse my ignorance; I am a just lowly blogger.)

    @warrentab @julien133 Per Weston’s update above, we’re working on testing a fix right now. If you don’t feel comfortable using the ZIP update method that he noted, hold for now and we’ll push out a public, directory update to the plugin once we’ve confirmed the fix. Thanks!

    Thread Starter warrentab

    (@warrentab)

    Much appreciated, Bethany!

    Plugin Author Weston Ruter

    (@westonruter)

    @julien133 Thanks for sharing the plugin you’re using. I can see that WPMobile.App is also filtering amp_is_enabled, so this is a common denominator with the tagDiv Mobile Theme. My pull request should prevent that error from happening.

    @warrentab @julien133 I’ve just merged the pull request and added it to the 2.1 branch. So if you would please test this 2.1.1-alpha build it would be very helpful. You can find a link to the 2.1.x production build at https://github.com/ampproject/amp-wp/wiki/Development-Builds

    Specifically, the amp.zip build is located here: https://storage.googleapis.com/ampwp_github_artifacts/refs/heads/2.1/prod/amp.zip

    You can also then find the standard WordPress plugin installation instructions on that same page.

    Upon installation, the plugin version will be shown as: 2.1.1-alpha-20210507T193507Z-b416d35.

    Thread Starter warrentab

    (@warrentab)

    @westonruter Thank you for this, Weston. I have downloaded the Zip file and am preparing to install it. Is it an update, or do I delete the current version and install this one?

    Also, once it’s been installed, should I then enable the tagDiv Mobile theme?

    Plugin Author Weston Ruter

    (@westonruter)

    @warrentab it is an update, yes. Just go to the Plugins > Add New screen, click the Upload Plugin button at the top, select the ZIP file, and submit. It will then ask you to confirm replacing 2.1.0 with 2.1.1-alpha.

    You should then be able to re-activate the tagDiv Mobile Theme.

    Thread Starter warrentab

    (@warrentab)

    @westonruter @shetheliving That seemed to do it. Thank you, everyone!

Viewing 15 replies - 1 through 15 (of 18 total)

The topic ‘FATAL ERROR WITH AMP UPDATE’ is closed to new replies.