Hi
I activated the mobile theme plugin (with AMP). I get error issues by Google Search Console. When I investigate the website via https://validator.ampproject.org, I get the following issues:
The parent tag of tag ‘style amp-custom’ is ‘noscript’, but it can only be ‘head’. DISALLOWED_HTML
The tag ‘noscript enclosure for boilerplate’ appears more than once in the document. MANDATORY_AMP_TAG_MISSING_OR_INCORRECT
I found out that there is a problem with the js_composer (WP Bakery builder). When I turn off this plugin, everything goes fine, but there are design issues than. I tried also the Tagdiv Composer, but this plugin didn’t work. It isn’t loading.
Website: http://www.ikwilgoedkoopreizen.be
(https://validator.ampproject.org/#url=https%3A%2F%2Fwww.ikwilgoedkoopreizen.be%2F)
Can I fix this plugin issue with additional code?
Thank you!
Kind regards,
Jens
Hi,
I would suggest as a first test to deactivate all plugins except theme provided plugins. Then test again with the validator. Chances are the issue will be solved.
I remember seeing in some topics similar issues being caused by optimization plugins or settings from them. Let us know.
Thanks
I have the same problem…
it seems there is a compatibility problem with js composer that add line
<noscript><style type=”text/css”>.wpb_animate_when_almost_visible { opacity: 1; }</style></noscript>
With amp test gives a problem…
How can we resolve that?
Thanks
@Bintmusic Looks alright now, I checked one of your posts – http://prntscr.com/mzdgap
Where are you seeing the problem? I will test again.
Hi Simon
Thanks for your help. The problem is caused by js_composer (wp Bakery plugin). When I deactivate my optimization plugins, the Amp error is still there (until I deactivate the WP Bakery plugin).
Kind regards,
Jens
Simion,
now is ok because I have turned off ‘SHOW ON AMP’ in the mobile plugin…
to avoid penalisation by google…
in this way however the page amp is without css
The problem is caused by js_composer (wp Bakery plugin).
I’ve been writing the problem for over a week.
Please solve
Thanks!
-
This reply was modified 7 years by
Bintmusic.
Hi Simon,
Thank you for your message. Do you have any idea how long it will take for the coming theme update?
Regards,
Jens
What exactly did you edit in the WPBakery plugin? If possible please let me know.
Seems the menu is working in the AMP version http://prntscr.com/n0ipno
But not working in the simple mobile version. We have seen this issue before, but in the AMP version and mobile theme. Also it happened only in pages. Do you use any optimization plugins or methods? Try if possible to test without them.
Hi Simon
I get more than 30 issues (before 2) with the new theme update:
The mandatory attribute ‘⚡’ is missing in tag ‘html’. MANDATORY_AMP_TAG_MISSING_OR_INCORRECT
line 1, column 151
The attribute ‘onload’ may not appear in tag ‘link rel=preload’. DISALLOWED_HTML
line 1, column 407
The attribute ‘href’ in tag ‘link rel=stylesheet for fonts’ is set to the invalid value ‘https://www.ikwilgoedkoopreizen.be/wp-includes/css/dist/block-library/style.min.css’. AUTHOR_STYLESHEET_PROBLEM
line 1, column 3267
The attribute ‘href’ in tag ‘link rel=stylesheet for fonts’ is set to the invalid value ‘https://www.ikwilgoedkoopreizen.be/wp-content/plugins/contact-form-7/includes/css/contact-form-7.min.css’. AUTHOR_STYLESHEET_PROBLEM
line 1, column 3437
The attribute ‘href’ in tag ‘link rel=stylesheet for fonts’ is set to the invalid value ‘https://www.ikwilgoedkoopreizen.be/wp-content/plugins/official-mailerlite-sign-up-forms/assets/css/mailerlite_forms.css.min.css’. AUTHOR_STYLESHEET_PROBLEM
line 1, column 3626
The attribute ‘href’ in tag ‘link rel=stylesheet for fonts’ is set to the invalid value ‘https://www.ikwilgoedkoopreizen.be/wp-content/plugins/revslider/public/assets/css/rs-plugin-settings.min.css’. AUTHOR_STYLESHEET_PROBLEM
line 1, column 3844
The mandatory attribute ‘amp-custom’ is missing in tag ‘style amp-custom’. DISALLOWED_HTML
line 1, column 4041
The attribute ‘href’ in tag ‘link rel=stylesheet for fonts’ is set to the invalid value ‘https://www.ikwilgoedkoopreizen.be/wp-content/plugins/wp-coupons-and-deals-premium/assets/css/wpcd-style.min.css’. AUTHOR_STYLESHEET_PROBLEM
line 1, column 4121
The mandatory attribute ‘amp-custom’ is missing in tag ‘style amp-custom’. DISALLOWED_HTML
line 1, column 4314
The attribute ‘href’ in tag ‘link rel=stylesheet for fonts’ is set to the invalid value ‘https://www.ikwilgoedkoopreizen.be/wp-content/plugins/js_composer/assets/css/js_composer.min.css’. AUTHOR_STYLESHEET_PROBLEM
line 1, column 4497
The attribute ‘href’ in tag ‘link rel=stylesheet for fonts’ is set to the invalid value ‘https://www.ikwilgoedkoopreizen.be/wp-content/plugins/wp-gdpr-compliance/assets/css/wpgdprc.css.min.css’. AUTHOR_STYLESHEET_PROBLEM
line 1, column 4681
The mandatory attribute ‘amp-custom’ is missing in tag ‘style amp-custom’. DISALLOWED_HTML
line 1, column 4866
The attribute ‘href’ in tag ‘link rel=stylesheet for fonts’ is set to the invalid value ‘https://www.ikwilgoedkoopreizen.be/wp-content/themes/Newspaper1/td-theme.min.css’. AUTHOR_STYLESHEET_PROBLEM
line 2, column 94
The attribute ‘href’ in tag ‘link rel=stylesheet for fonts’ is set to the invalid value ‘https://www.ikwilgoedkoopreizen.be/wp-content/themes/Newspaper1/includes/demos/lifestyle/td-theme-demo-style.min.css’. AUTHOR_STYLESHEET_PROBLEM
line 2, column 253
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 2, column 460
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 2, column 574
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 2, column 1483
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 21, column 674
The mandatory attribute ‘amp-custom’ is missing in tag ‘style amp-custom’. DISALLOWED_HTML
line 143, column 47
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 814, column 11
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 814, column 99
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 818, column 43
The mandatory attribute ‘amp-custom’ is missing in tag ‘style amp-custom’. DISALLOWED_HTML
line 822, column 17
The parent tag of tag ‘style amp-custom’ is ‘noscript’, but it can only be ‘head’. DISALLOWED_HTML
line 822, column 152
The mandatory attribute ‘target’ is missing in tag ‘FORM [method=GET]’. DISALLOWED_HTML
line 822, column 4116
The tag ‘FORM [method=GET]’ requires including the ‘amp-form’ extension JavaScript. MANDATORY_AMP_TAG_MISSING_OR_INCORRECT
line 822, column 4116
The parent tag of tag ‘style amp-custom’ is ‘body’, but it can only be ‘head’. DISALLOWED_HTML
line 822, column 4495
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 831, column 287
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 831, column 1115
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 831, column 1339
The mandatory attribute ‘target’ is missing in tag ‘FORM [method=GET]’. DISALLOWED_HTML
line 831, column 3051
The tag ‘FORM [method=GET]’ requires including the ‘amp-form’ extension JavaScript. MANDATORY_AMP_TAG_MISSING_OR_INCORRECT
line 831, column 3051
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 831, column 4951
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 831, column 6841
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 831, column 8740
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 831, column 10665
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 831, column 12593
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 831, column 13863
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 838, column 109
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 845, column 15
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 944, column 46
The attribute ‘style’ in tag ‘span’ is set to the invalid value ‘color:#0096ed !important’. DISALLOWED_HTML
line 953, column 849
The attribute ‘style’ in tag ‘span’ is set to the invalid value ‘color:#0096ed !important’. DISALLOWED_HTML
line 953, column 1496
The attribute ‘style’ in tag ‘span’ is set to the invalid value ‘color:#0096ed !important’. DISALLOWED_HTML
line 953, column 2151
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 953, column 2867
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 953, column 3687
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 963, column 717
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 963, column 1832
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 963, column 2971
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 963, column 4144
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 963, column 5291
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 963, column 6385
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 963, column 7626
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 973, column 534
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 973, column 2050
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 975, column 342
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 975, column 1892
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 975, column 3450
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 975, column 5082
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 975, column 6372
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 985, column 585
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 985, column 1580
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 985, column 2686
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 985, column 3786
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 985, column 4944
The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-img’? DISALLOWED_HTML_WITH_AMP_EQUIVALENT
line 985, column 5983
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 985, column 6930
The parent tag of tag ‘style amp-custom’ is ‘body’, but it can only be ‘head’. DISALLOWED_HTML
line 985, column 8080
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 997, column 10
The parent tag of tag ‘link rel=stylesheet for fonts’ is ‘body’, but it can only be ‘head’. DISALLOWED_HTML
line 1004, column 15
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 1004, column 219
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 1004, column 398
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 1005, column 363
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 1005, column 609
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 1044, column 17
Custom JavaScript is not allowed. CUSTOM_JAVASCRIPT_DISALLOWED
line 1044, column 184
The mandatory tag ‘head > style[amp-boilerplate]’ is missing or incorrect. MANDATORY_AMP_TAG_MISSING_OR_INCORRECT
line 1044, column 1297
The mandatory tag ‘noscript > style[amp-boilerplate]’ is missing or incorrect. MANDATORY_AMP_TAG_MISSING_OR_INCORRECT
line 1044, column 1297
The mandatory tag ‘amphtml engine v0.js script’ is missing or incorrect. MANDATORY_AMP_TAG_MISSING_OR_INCORRECT
line 1044, column 1297
Can you help me?
Thanks
To solve proble with js composer I comment this line in
plugins/js_composer/include/classes/core/class-vc-base.php
public function addNoScript() {
//echo ‘<noscript>’;
echo ‘<style type=”text/css”>’;
echo ‘ .wpb_animate_when_almost_visible { opacity: 1; }’;
echo ‘</style>’;
//echo ‘</noscript>’;
}
I tried to rule out optimization from javascript but the mobile theme menu still doesn’t work on mobile visualisation… works instead on the page amp
Do you have solutions to propose?
Thanks!
@jensgrabble So many errors would appear if there is no AMP whatsoever for the link you are testing. If this is your website https://www.ikwilgoedkoopreizen.be from what I can see AMP is not active. Please see this guide if you want to activate AMP
– https://tagdiv.com/amp-newspaper-theme/
@Bintmusic I have seen something similar with Woocommerce, this plugin also adds a noscript with a class and opacity – https://wordpress.org/support/topic/amp-paired-two-errors/ which can cause the same problem. I made some brief testing with a default theme and the same happens. It could be a problem with the AMP plugin itself or caused by a different plugin in.
While testing with WPBakery active and only theme plugins on our end the AMP posts are valid, no such errors.
The menu on mobile issue (not AMP) could be caused by minification, optimization or such plugins. The respective class that make the menu and search modals visible is not being added to the body when the icon is pressed – http://prntscr.com/n0yaz1
There are also some CSS regularities.
Maybe consider using the mobile theme just for AMP for the moment, and make a copy of the website on a testing sub-domain and set it exactly as the main one. There you can test and try to identify the problem plugin or configuration.
@mazougagh, you are welcome… but for you menu mobile view is ok?
@Simion Thanks for suggestion…
But is the menu on the mobile only my problem or is it common to all with version 9.6? For me everything was ok with version 9.5
Do you have a test site where I can check the operation of both mobile and amp versions?
The problems in the menu to me were not there with version 9.5
Thanks
@Simion Thank you, there was a wrong setting, but the 2 issues stays. I edited the code like @bintmusic said and it worked :D. Thanks @bintmusic for this suggestion.
Regards
Jens
Hi,
Please make update to v9.6.1 follow our documentation for How to Update the Newspaper Theme for WordPress -> https://tagdiv.com/update-newspaper-theme/
In Newspaper c9.6.1 you have 3 options, one for only mobile, one for mobile and AMP( this option is working only with the AMP that we provide ), and AMP ( this option allow you on which page/post to make AMP, also this option is available only with provided AMP plugin )
Please make sure that you do not have a plugin conflict, please deactivate all non theme plugins, also if you are using child theme please deactivate it, clear all cache and try again.
Thank you!