• Resolved hansollkim

    (@hansollkim)


    I’ve seen internal server error loading AMP sites when I after activate the plugin.I’ve turned off the plugin since the site isn’t available in certain mobile client. So If you need another info, please kindly ask me.

    Notice: Undefined property: DOMDocument::$documentElement in /var/www/html/purengom.com/public_html/wp-content/plugins/amp/includes/sanitizers/class-amp-dev-mode-sanitizer.php on line 33

    Fatal error: Uncaught Error: Call to a member function setAttribute() on null in /var/www/html/purengom.com/public_html/wp-content/plugins/amp/includes/sanitizers/class-amp-dev-mode-sanitizer.php:33 Stack trace: #0 /var/www/html/purengom.com/public_html/wp-content/plugins/amp/includes/templates/class-amp-content-sanitizer.php(117): AMP_Dev_Mode_Sanitizer->sanitize() #1 /var/www/html/purengom.com/public_html/wp-content/plugins/amp/includes/templates/class-amp-content.php(213): AMP_Content_Sanitizer::sanitize_document(Object(DOMDocument), Array, Array) #2 /var/www/html/purengom.com/public_html/wp-content/plugins/amp/includes/templates/class-amp-content.php(132): AMP_Content->sanitize(‘\n<p>\xEC\x95\x88\xEB\x85\x95\xED\x95\x98\xEC\x84…’) #3 /var/www/html/purengom.com/public_html/wp-content/plugins/amp/includes/templates/class-amp-content.php(79): AMP_Content->transform() #4 /var/www/html/purengom.com/public_html/wp-content/plugins/amp/includes/templates/class-amp-post-template.php(329): AMP_Content->__construct(‘<!– wp:pa in /var/www/html/purengom.com/public_html/wp-content/plugins/amp/includes/sanitizers/class-amp-dev-mode-sanitizer.php on line 33

    and this is another error.

    Notice: Undefined property: DOMDocument::$documentElement in /var/www/html/purengom.com/public_html/wp-content/plugins/amp/includes/sanitizers/class-amp-base-sanitizer.php on line 390

    Fatal error: Uncaught Error: Call to a member function hasAttribute() on null in /var/www/html/purengom.com/public_html/wp-content/plugins/amp/includes/sanitizers/class-amp-base-sanitizer.php:390 Stack trace: #0 /var/www/html/purengom.com/public_html/wp-content/plugins/amp/includes/sanitizers/class-amp-style-sanitizer.php(766): AMP_Base_Sanitizer->is_document_in_dev_mode() #1 /var/www/html/purengom.com/public_html/wp-content/plugins/amp/includes/templates/class-amp-content-sanitizer.php(117): AMP_Style_Sanitizer->sanitize() #2 /var/www/html/purengom.com/public_html/wp-content/plugins/amp/includes/templates/class-amp-content.php(213): AMP_Content_Sanitizer::sanitize_document(Object(DOMDocument), Array, Array) #3 /var/www/html/purengom.com/public_html/wp-content/plugins/amp/includes/templates/class-amp-content.php(132): AMP_Content->sanitize(‘\n<p>\xEC\xA7\x91\xEC\x97\x90 \xEB\x91\x90\xEB…’) #4 /var/www/html/purengom.com/public_html/wp-content/plugins/amp/includes/templates/class-amp-content.php(79): AMP_Content->transfor in /var/www/html/purengom.com/public_html/wp-content/plugins/amp/includes/sanitizers/class-amp-base-sanitizer.php on line 390
    The site is experiencing technical difficulties.

    It is happened when I set the plugin to “Reader” mode. when I set to the standard mode, site is loaded, but it still have internal server error.

    URL validation failed to due to the absence of the expected JSON-containing AMP_VALIDATION comment after the body.

    OR

    Standard mode activated! However, there was an error when checking the AMP validity for your site. Internal Server Error

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

Viewing 8 replies - 16 through 23 (of 23 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    PHP 7.3 should work. We are testing it on Travis CI: https://github.com/ampproject/amp-wp/blob/7027f05e92a2cd0984b12e2bd88f1a7fd8bc0433/.travis.yml#L109-L111

    I’m also using PHP 7.3 successfully on my site.

    My only guess is that there was a misconfiguration of the dom extension in 7.3.

    Thread Starter hansollkim

    (@hansollkim)

    I’ve reinstalled PHP 7.3 and it’s major extensions. Still, I have issues. How do you think? Do I stay 7.2 or pioneering for the answer to solving with 7.3?

    Thread Starter hansollkim

    (@hansollkim)

    I think I solved the issue. I think I made mistakenly added a snippet in php.ini to enable the DOM extension(I’ve read this https://stackoverflow.com/questions/44045478/how-do-i-enable-the-dom-extension-in-the-php-ini). I removed the snippet and restart Apache2 to see the plugin is working. Mr. Ruter, Would you check the plugin is working correctly on your side?

    Thanks.

    • This reply was modified 5 years, 4 months ago by hansollkim.
    Plugin Author Weston Ruter

    (@westonruter)

    Yes, it seems to be working properly. I see you are using Twenty Seventeen in Standard mode and valid AMP pages are being served.

    Thread Starter hansollkim

    (@hansollkim)

    So far, It seems generally good. I have two issues. a) Google removed my AMP pages from its index. Now I’m considering to move reader mode again. b) Whichever link I click(tap) the same link is opened. Please open my website from Twitter profile page(https://twitter.com/purengom) in your smartphone’s Twiter app. It’ll open the article page about (interestingly) AMP, not the homepage.

    • This reply was modified 5 years, 4 months ago by hansollkim.
    Plugin Author Weston Ruter

    (@westonruter)

    a) Google removed my AMP pages from its index. Now I’m considering to move reader mode again.

    When you switch between the modes (e.g. Reader to Standard), you may see that the AMP results temporarily drop out of search results. However, the AMP badges should return to your site after it gets re-crawleed. For example, my site is running in Standard mode and you can see when searching for “weston ruter coco easter egg” that my site’s URLs are shown with the AMP badge in mobile search results.

    b) Whichever link I click(tap) the same link is opened. Please open my website from Twitter profile page(https://twitter.com/purengom) in your smartphone’s Twiter app. It’ll open the article page about (interestingly) AMP, not the homepage.

    Please open a new issue for this.

    Plugin Author Weston Ruter

    (@westonruter)

    @hansollkim

    b) Whichever link I click(tap) the same link is opened. Please open my website from Twitter profile page(https://twitter.com/purengom) in your smartphone’s Twiter app. It’ll open the article page about (interestingly) AMP, not the homepage.

    I was able to reproduce this yesterday, actually. I tried:

    $ curl -i 'https://t.co/axyNeG94zY?amp=1' -A 'iPhone mobile'
    HTTP/2 301
    amp: 1
    location: https://purengom.com/amp/#click=https://t.co/axyNeG94zY

    The location has /amp/ in the URL, which causes the redirect to the URL you indicated:

    $ curl 'https://purengom.com/amp/#click=https://t.co/axyNeG94zY' -i
    HTTP/2 301
    location: https://purengom.com/2017/10/21/amp%ec%97%90-%eb%8c%80%ed%95%b4%ec%84%9c-%ec%96%b4%eb%96%bb%ea%b2%8c-%ec%83%9d%ea%b0%81%ed%95%98%ec%84%b8%ec%9a%94/

    However, today I am not seeing that.

    curl -i 'https://t.co/axyNeG94zY?amp=1' -A 'iPhone mobile'
    HTTP/2 301
    location: https://purengom.com/

    Did you temporarily try using another AMP plugin which used the /amp/ endpoint? It appears that Twitter (or rather Cloudflare) may have cached the amphtml link that was on the homepage, but this cache has since been purged and I’m no longer seeing that behavior.

    Thread Starter hansollkim

    (@hansollkim)

    Hello, Ruter. Thank you for trying troubleshooting. The change you’ve encountered triggered via disabling and re-enabling your AMP plugin for troubleshooting. I don’t know why, but it changed when I just re-enabled it.

    • This reply was modified 5 years, 4 months ago by hansollkim.
Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘I have a Internal Server error’ is closed to new replies.