• Resolved Wsan1

    (@wsan1)


    AMP Plugin Error


    For the site indicated, I get the error message below. I noticed in the Forum, other user(s) have had this issue, BUT, it appeared that the culprit was excessive CSS (usage) exceeding CSS Budget. That does not appear to be the case in this instance

    I checked with my hosting company. They said it was this AMP Plugin causing
    the problem, in their assessment.

    My hosting company wanted me to find out “(Server) requirements” & report back to them.
    As far as PHP, 5.6 I recall, is enough to work for this AMP Plugin, so we should bevfine there.

    Failed to prepare AMP page
    A PHP error occurred while trying to prepare the AMP response. This may not be caused by the AMP plugin but by some other active plugin or the current theme. You will need to review the error details to determine the source of the error.
    If you get stuck, you may want to share any details in a new topic on the plugin’s?support forum.

    Some (potentially) helpful info.

    – I have not created external CSS stylesheets

    – I have put Custom CSS into the “Additional CSS” in the “Appearance” > “Customize” > “Additional CSS” section of WordPress

    – I have tested the AMP Plugin & every time I turn OFF the AMP plugin, the “Failed to Prepare AMP page” message / error goes
    away & all is fine. When I active the AMP plugin, the message / Error Returns, immediately.

    – I checked the “inspect”, and clicked the “Network” tab and checked CSS usage. It was very minimal it appeared, only about 35 Kbytes.

    ?
    – BTW, I read in AMP plugin documentation that adding !important is not allowed. Evidently AMP pages won’t render or won’t render properly if !important is used – – – ? I have used !important in my custom CSS code to edit & have removed it.

    ? I thought that could have something to do with the Failed to prepare AMP page message? but when I removed !important from custom CSS, I still got the Failed to prepare AMP page error message when I activated the AMP plugin.

    Also, I have not changed any plugins, or added / changed CSS in the last 30 / 60 days but since then, this error pops
    up, I thought, after the most recent AMP plugin update.

    Error Log Below

    https://gist.github.com/wsan12/1a5171839c18dbfdf6c28e3a427a1c58


    >>> I have done this, below, per instructions to other user with same error message. I did not see any errors in the error index related to this issue.

    To debug this issue first make sure you are able to access the developer tool for AMP, ie you can see AMP has a submenu Validation tool and error index if no then goto Users->Profile->enable AMP developer Tools (screenshot)

    >>> My admin toolbar does not show the AMP plugin. I did not see access to CSS Usages

    Next visit subscribe page to check which plugin or theme is excedding your site CSS budget goto Admin Toolbar->AMP->CSS Usages (screenshot)
    Clicking on it will take you to a page where you can find which plugin or theme is overbudgeting CSS

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

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thanks for sharing the additional insights. If your host is limiting your PHP memory limit to 64MBs this could be the cause. Given you don’t have a large number of plugins active and you’re using an AMP compatible theme let’s continue some more tests.

    When selecting reader mode can you check if the same occurs when selecting Twenty Twenty as the default reader theme, if not already done?

    Thread Starter Wsan1

    (@wsan1)

    James, thanks.

    I put the AMP Plugin in Reader mode while all the other plugins were deactivated.

    The pages and posts rendered OK as expected.

    Keeping the AMP Plugin in reader mode, I then activated all the plugins & the pages and posts again rendered OK as expected.

    Just to check again,
    I then switched the AMP plugin to standard mode and the same error came back, immediately (Which I had already tested before, though I tested again anyway)

    I then tested again, the AMP plugin in standard mode and all other plugins De-activated & the same error continued.

    Should I check with the host & talk to them about increasing the 64 MB PHP memory limit – – – ?

    What can we do next – – – ?

    Thanks

    Many thanks for performing the additional checks. Indeed that would be a good next check, to increased the 64MB PHP memory limit. Please increase to 512MB before checking once more. As there are no issues in reader mode I suspect that sanitizing your content with your current theme and active plugins may be reaching your current PHP error limit.

    Thread Starter Wsan1

    (@wsan1)

    James, thanks.

    I increased the PHP memory limit to 512 MB. I tested it and the error still came up.

    But then the host recommended to deactivate and delete both the Theme & AMP plugin and re-install them. After deleting / removing both, I re-installed the Theme first, then the AMP Plugin, and now it HAS been working fine with the AMP Plugin in both Standard & Transitional Modes, with the Twenty-Twenty Theme.

    I thought I previously deactivated, deleted and re-installed the AMP plugin & that did not work. Looks like I needed to fully get rid of both the Theme and Plugin & then re-install them.

    Let me monitor this for a few days. In the past, various glitches sometimes pop back up.

    Also, I do not know if there is a delay after I increased the PHP Memory limit in the php.ini file. If so, it could still be that it took time for the increase to take effect —- ? If so, it is still possible that the memory increase fixed it rather than re-installing the Plugin & Theme…………….

    Anyway, thanks for your help and guidance. Let’s hope this does not pop up again, but let’s keep watch for several days.

    Thanks!!

    Thanks for the update. Nice troubleshooting! Usually any PHP Memory limits only take a short period to reflect, not instant but usually at most a minute or two at most in my experience. I can’t be sure if that was the cause.

    If you had custom functions or made modifications to the default Twenty-Twenty theme this may have also played a part.

    I’ll close this topic now but indeed so let us know should the issue arise again. Thanks for the troubleshooting efforts. If you have any further queries be sure to reach out. Once you get a chance to compare your AMP performance or test out the plugin further be sure to leave your plugin feedback.

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Failed to Prep AMP Page’ is closed to new replies.