• Resolved gbengard

    (@gbengard)


    I received an error message from Google today.

    “Search Console has identified that your site is affected by 1 AMP issues:
    Top Errors

    Errors can prevent your page or feature from appearing in Search results. The following errors were found on your site:

    Custom JavaScript is not allowed.

    We recommend that you fix these issues when possible to enable the best experience and coverage in Google Search.”

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

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

    (@westonruter)

    There is some code being injected into your site:

    <div style='display:none' id='sbbhscc'></div>
              <script type="text/javascript">
                var sbbvscc='';
                var sbbgscc='';
                function genPid() {return String.fromCharCode(118)+String.fromCharCode(66) ; };
              </script>
            <div id='sbbfrcc' style='position: absolute; top: -10px; left: 30px; font-size:1px'></div>
      <script type="text/javascript">...

    This looks suspicious, perhaps malicious. You may need to investigate for a possible site hack. Contacting your host may be the best resolution to fix this.

    Thread Starter gbengard

    (@gbengard)

    Thank you for your response @westonruter.

    I have contact namecheap but they couldn’t offer any help.

    Please what can I do as the error affects 44 pages on my website.

    Plugin Author Weston Ruter

    (@westonruter)

    That same code is also being injected in the non-AMP version of your site: https://www.techidence.com/lenovo-yoga-s740-arrives-with-4k-screen-and-alexa/

    It will certainly also be there if you turn off the AMP plugin. But you can try to deactivate other plugins to see if it goes away. The code looks malicious because it seems to be doing some complicated obfuscation to hide its true purpose.

    To identify where the bad code is coming from, you should do a search across all files for some unchanging part of the code, like perhaps “sbbhscc”. If it is in a plugin, then deactivate the plugin. If it is in WordPress core file, you’ll need to re-install WordPress.

    Ultimately, it’s not something the AMP plugin can help with. However, here are some next steps to take: https://www.ads-software.com/support/article/faq-my-site-was-hacked/

    Hi @gbengard and @westonruter

    I’m facing exactly the same issue that you faced. I also see these kind of strange (id=’sbbhscc’) stuff having injected into my code.

    How did you fix it? Can you help me?

    Regards,
    Goutham

    • This reply was modified 4 years, 6 months ago by goutham93.
    • This reply was modified 4 years, 6 months ago by goutham93.
    • This reply was modified 4 years, 6 months ago by goutham93.
    Thread Starter gbengard

    (@gbengard)

    Hi @goutham93

    In my own case, it was as a result of free CDN I used, after deactivating it everything works fine.

    Regards,
    Gbengard

    @gbengard Thanks for your response. I’m assuming you use “Namecheap” server too!
    Have you deactivated free CDN permanently?
    And how long did it take to fix itself after you deactivated your CDN?

    @gbengard Thanks for your response. I’m assuming you use “Namecheap” server too!
    Have you deactivated free CDN permanently?
    And how long did it take to fix itself after you deactivated your CDN?

    Thread Starter gbengard

    (@gbengard)

    I’m so sorry for late response @goutham93

    Yes, I’m using Namecheap server and I have deactivated the CDN permanently.

    It depends on the number of pages currently affected. You don’t have to worry about it, just deactivate and monitor through Google Search Console.

    Thank you

    Ok @gbengard. I understand. Let me monitor it! I really appreciate your time. Thanks a lot for your response again.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘AMP Custom JavaScript is not allowed’ is closed to new replies.