Support » Plugin: AMP » JSON-containing AMP_VALIDATION comment after the body

  • I would really apologize if this was a repeated topic. I looked to see if anyone else made the same mistake, but it seemed to be just me.

    First of all, I would like to thank you for your sharing in Ho Chi Minh City on December 5, 2019. D (it was really a great day.

    After practicing, I encountered this error: https://prnt.sc/q71ch4

    This is my PHP log

    [06-Dec-2019 08:50:37 UTC] PHP Notice: Trying to get property ‘taxonomy’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 861
    [06-Dec-2019 08:50:37 UTC] PHP Notice: Trying to get property ‘taxonomy’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 861
    [06-Dec-2019 08:50:37 UTC] PHP Notice: Trying to get property ‘taxonomy’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 861
    [06-Dec-2019 08:50:37 UTC] PHP Notice: Trying to get property ‘taxonomy’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 861
    [06-Dec-2019 08:50:37 UTC] PHP Notice: Undefined variable: separator in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 1505
    [06-Dec-2019 08:50:37 UTC] PHP Notice: Undefined index: report in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/parts/modal/delivery/mail.php on line 22
    [06-Dec-2019 08:50:37 UTC] PHP Notice: Undefined variable: key in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 727
    [06-Dec-2019 08:50:37 UTC] PHP Notice: Uninitialized string offset: 36 in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 727
    [06-Dec-2019 08:50:37 UTC] PHP Notice: Uninitialized string offset: 36 in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 727
    [06-Dec-2019 09:02:36 UTC] PHP Notice: Trying to get property ‘ID’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 111
    [06-Dec-2019 09:02:36 UTC] PHP Notice: Trying to get property ‘post_type’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 323
    [06-Dec-2019 09:02:41 UTC] PHP Notice: Undefined index: HTTPS in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 731
    [06-Dec-2019 09:04:08 UTC] PHP Notice: Trying to get property ‘ID’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 111
    [06-Dec-2019 09:04:08 UTC] PHP Notice: Trying to get property ‘post_type’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 323
    [06-Dec-2019 09:04:48 UTC] PHP Notice: Undefined index: report in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/parts/modal/delivery/mail.php on line 22
    [06-Dec-2019 09:04:48 UTC] PHP Notice: Undefined variable: key in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 727
    [06-Dec-2019 09:06:55 UTC] PHP Notice: Undefined index: HTTPS in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 731
    [06-Dec-2019 09:07:43 UTC] PHP Notice: Trying to get property ‘taxonomy’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 861
    [06-Dec-2019 09:07:43 UTC] PHP Notice: Trying to get property ‘taxonomy’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 861
    [06-Dec-2019 09:07:43 UTC] PHP Notice: Trying to get property ‘taxonomy’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 861
    [06-Dec-2019 09:07:43 UTC] PHP Notice: Trying to get property ‘taxonomy’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 861
    [06-Dec-2019 09:07:43 UTC] PHP Notice: Undefined variable: separator in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 1505
    [06-Dec-2019 09:07:43 UTC] PHP Notice: Undefined index: report in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/parts/modal/delivery/mail.php on line 22
    [06-Dec-2019 09:07:43 UTC] PHP Notice: Undefined variable: key in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 727
    [06-Dec-2019 09:11:05 UTC] PHP Notice: Trying to get property ‘ID’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 111
    [06-Dec-2019 09:11:05 UTC] PHP Notice: Trying to get property ‘post_type’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 323
    [06-Dec-2019 09:11:08 UTC] PHP Notice: Trying to get property ‘ID’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 111
    [06-Dec-2019 09:11:08 UTC] PHP Notice: Trying to get property ‘post_type’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 323
    [06-Dec-2019 09:12:43 UTC] PHP Notice: Undefined index: report in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/parts/modal/delivery/mail.php on line 22
    [06-Dec-2019 09:12:43 UTC] PHP Notice: Undefined variable: key in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 727
    [06-Dec-2019 09:14:28 UTC] PHP Notice: Undefined index: HTTPS in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 731
    [06-Dec-2019 09:15:29 UTC] PHP Notice: Trying to get property ‘ID’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 111
    [06-Dec-2019 09:15:29 UTC] PHP Notice: Trying to get property ‘post_type’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 323
    [06-Dec-2019 09:15:46 UTC] PHP Notice: Trying to get property ‘ID’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 111
    [06-Dec-2019 09:15:46 UTC] PHP Notice: Trying to get property ‘post_type’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 323
    [06-Dec-2019 09:16:39 UTC] PHP Notice: Trying to get property ‘ID’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 111
    [06-Dec-2019 09:16:39 UTC] PHP Notice: Trying to get property ‘post_type’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 323
    [06-Dec-2019 09:19:25 UTC] PHP Notice: Trying to get property ‘ID’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 111
    [06-Dec-2019 09:19:25 UTC] PHP Notice: Trying to get property ‘post_type’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 323
    [06-Dec-2019 09:20:20 UTC] PHP Notice: Trying to get property ‘ID’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 111
    [06-Dec-2019 09:20:20 UTC] PHP Notice: Trying to get property ‘post_type’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 323
    [06-Dec-2019 09:30:42 UTC] PHP Notice: Undefined index: HTTPS in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 731
    [06-Dec-2019 09:31:15 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ReCaptcha has a deprecated constructor in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/parts/modal/delivery/formularios/recaptchalib.php on line 42
    [06-Dec-2019 09:32:40 UTC] PHP Notice: Trying to get property ‘ID’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 111
    [06-Dec-2019 09:32:40 UTC] PHP Notice: Trying to get property ‘post_type’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 323
    [06-Dec-2019 09:34:42 UTC] PHP Notice: Trying to get property ‘ID’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 111
    [06-Dec-2019 09:34:42 UTC] PHP Notice: Trying to get property ‘post_type’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 323
    [06-Dec-2019 09:36:07 UTC] PHP Notice: Trying to get property ‘taxonomy’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 861
    [06-Dec-2019 09:36:07 UTC] PHP Notice: Trying to get property ‘taxonomy’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 861
    [06-Dec-2019 09:36:07 UTC] PHP Notice: Trying to get property ‘taxonomy’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 861
    [06-Dec-2019 09:36:07 UTC] PHP Notice: Trying to get property ‘taxonomy’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 861
    [06-Dec-2019 09:36:07 UTC] PHP Notice: Undefined variable: separator in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 1505
    [06-Dec-2019 09:36:08 UTC] PHP Notice: Undefined index: report in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/parts/modal/delivery/mail.php on line 22
    [06-Dec-2019 09:36:08 UTC] PHP Notice: Undefined variable: key in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 727
    [06-Dec-2019 09:38:24 UTC] PHP Notice: Trying to get property ‘ID’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 111
    [06-Dec-2019 09:38:24 UTC] PHP Notice: Trying to get property ‘post_type’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 323
    [06-Dec-2019 09:38:28 UTC] PHP Notice: Trying to get property ‘ID’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 111
    [06-Dec-2019 09:38:28 UTC] PHP Notice: Trying to get property ‘post_type’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 323
    [06-Dec-2019 09:38:45 UTC] PHP Notice: Trying to get property ‘taxonomy’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 861
    [06-Dec-2019 09:38:45 UTC] PHP Notice: Trying to get property ‘taxonomy’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 861
    [06-Dec-2019 09:38:45 UTC] PHP Notice: Trying to get property ‘taxonomy’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 861
    [06-Dec-2019 09:38:45 UTC] PHP Notice: Trying to get property ‘taxonomy’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 861
    [06-Dec-2019 09:38:45 UTC] PHP Notice: Undefined variable: separator in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 1505
    [06-Dec-2019 09:38:45 UTC] PHP Notice: Undefined index: report in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/parts/modal/delivery/mail.php on line 22
    [06-Dec-2019 09:38:45 UTC] PHP Notice: Undefined variable: key in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 727
    [06-Dec-2019 09:46:11 UTC] PHP Notice: Trying to get property ‘ID’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 111
    [06-Dec-2019 09:46:11 UTC] PHP Notice: Trying to get property ‘post_type’ of non-object in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/core/assets.php on line 323
    [06-Dec-2019 09:46:18 UTC] PHP Notice: Undefined index: HTTPS in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 731
    [06-Dec-2019 09:51:42 UTC] PHP Notice: Undefined index: HTTPS in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 731
    [06-Dec-2019 09:55:00 UTC] PHP Notice: Undefined index: report in /home/zenphim.com/public_html/wp-content/themes/zenphim/includes/parts/modal/delivery/mail.php on line 22
    [06-Dec-2019 09:55:00 UTC] PHP Notice: Undefined variable: key in /home/zenphim.com/public_html/wp-content/themes/zenphim/functions.php on line 727

    I’m not a developer, my knowledge is only basic, looking forward to your help

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    Thank you very much for sharing the log, and for coming to the event in HCMC!

    These PHP notices mean that your theme could be improved to prevent them from happening. At same time, I see no errors so I don’t think they are causing the problem you are seeing here.

    What happens if you go to “Site Health” in the WordPress admin under the Tools menu? Are there any test failures for “loopback requests”?

    Plugin Author Weston Ruter

    (@westonruter)

    Also, the error message you are seeing may not be entirely accurate. In the next version of the plugin (v1.4.2) the message will be more specific about what is going on. See https://github.com/ampproject/amp-wp/pull/3793

    Hello, Thank you so much for your prompt reply.

    I just check the Site Health and there are not any test failures for the “loopback requests” as this picture: http://prntscr.com/q74bus

    However, My website has other failures that im not sure if it is relevant to the error. Please see the picture here: http://prntscr.com/q74c6i

    I also would like to list the plugin I used in my website in case they are conflicting with AMP: (although I deactivated all plugins (except AMP) and continue the same errors so i think that is not the reason)

    1. Akismet Anti-Spam
    2. Autoptimize
    3. Classic Editor
    4. Wordfence Security
    5. WP-PostViews
    6. Yoast SEO

    Thank so much for your help.

    Plugin Author Weston Ruter

    (@westonruter)

    Do you know if your server has the PageSpeed module running? It may be stripping out HTML comments.

    After you log-in, are please try going to the homepage with ?amp_validate added to the URL. When you do that, please look at the page source to see at the bottom if there is an HTML comment that contains AMP_VALIDATION after the closing body tag.

    I’m wondering if that you see is the same thing as currently reported at https://github.com/ampproject/amp-wp/issues/3887

    Plugin Author Weston Ruter

    (@westonruter)

    @zenkynemesis I believe I have something which may fix the issue you are seeing. Here’s the PR: https://github.com/ampproject/amp-wp/pull/3898

    Please test the amp.zip plugin build linked to here: https://github.com/ampproject/amp-wp/pull/3898#issuecomment-562873898

    You can test that plugin build by deactivating and uninstalling the current AMP plugin you have installed, and then go to Plugins in the admin and go to Add New and then Upload Plugin. Then activate the plugin.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.