Unchecking javascript redirect in plugin settings resolved this issue.
Thanks,
Hi, In which Plugin, did you uncheck?
Thanks
Plugin Author
Mark
(@markwolters)
Hi,
unchecking the Javascript redirect in Really Simple SSL will solve this error. After disabling the Javascript redirect option you can enable the WordPress 301 or .htaccess redirect in the plugin settings to add a redirect to https://.
Mark
Plugin Author
Mark
(@markwolters)
The script that’s responsible for the AMP error on your site is this:
<script async src=”//static.punchtab.com/js/pg.js” class=”pt-giveaway” data-uuid=”2ad88e63-1bfc-4929-8dce-a273e3d37283″>
which seems to be used by PunchTab (Giveaway). I’d suggest to contact them about this issue.
Mark
Plugin Author
Mark
(@markwolters)
AMP doesn’t allow Javascript, AMP is made to make pages load fast and Javascript is often a slowing factor. To fix this you need to remove all Javascript scripts from the AMP pages. There are some workarounds like loading the Javascript in an AMP iframe. See https://stackoverflow.com/questions/36035733/google-amp-best-way-to-write-js-script-tag for more information.
Mark
Hi, can’t Figure out how that AMp is giving me this error: Custom JavaScript is not allowed.
This is this JS that the AMP is referring to:
<script type=”text/javascript”>var _cf = _cf || []; _cf.push([‘_setBm’, true]);</script><script type=”text/javascript” src=”/_bm/bd-1-30″></script>
And it is affecting all my posts. Any help, I will be grateful
https://search.google.com/test/amp?url=https%3A%2F%2Fwww.studentuniverse.com%2Fnews%2F2017%2F05%2Froyal-air-maroc-offers-discount-flights-to-all-travelers-via-studentuniverse%2F&skip_amp_follow=true
Plugin Author
Mark
(@markwolters)
Hi,
the easiest solution is to disable the Javascript redirect in the Really Simple SSL settings (Settings->SSL->Settings) and activate one of the other redirect options, either the WordPress 301 or .htaccess redirect. This will remove the Javascript from the pages and fix the AMP error.
Is the Really Simple SSL a plugin that I have to install?, bc i can’t find nothing related to it on the wordpress settings. Thanks
This thread is about an error that can occur if you have Really Simple SSL activated, and javascript redirect enabled. If you don’t have Really Simple SSL activate, this does not apply to you, and you have another plugin or theme which is causing this error.
Yes, that is the problem, i can’t find out which plugin is causing the error, i deactivated all of them one by one, but the error is still there.
I have the same issue.
I uncheck the option “Enable Javascript redirection to SSL” in configuration of Really Simpl SSL, but the issue still occurs.
Please help me check it with the sample link below:
https://chandat.net/triet-hoc/vien-duong-lao-va-nguoi-gia-2-thai-cuc-van-hoa-dong-tay/amp/
Best Regards,
Tom Tran
The javascript redirect is currently not included in your html, so unchecking this option seems to have done what it should do. If you still have a javascript problem, it might be caused by another javascript.
i am facing the same problem in my site https://socialclu.com plz sir help . The problem is
1 User-authored JavaScript found on page Critical 62
2 Prohibited or invalid use of HTML Tag Critical 1
any one advice me