Title: AGCA plugin caught a JavaScript on your site&#8230;
Last modified: September 20, 2018

---

# AGCA plugin caught a JavaScript on your site…

 *  Resolved [Gary](https://wordpress.org/support/users/glogan/)
 * (@glogan)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/agca-plugin-caught-a-javascript-on-your-site/)
 * When I navigate to (load) my site login page with AGCA plugin (free version) 
   installed, I get the following log messages in my browser console:
 *     ```
        ___________________________________________________  [[wp-login.php:23:21]]
       AGCA plugin caught a JavaScript on your site:         [[wp-login.php:24:21]]
       ___________________________________________________
   
       SyntaxError: expected expression, got '<'
       source:https://tf-sandy.org/prophetic-blog/wp-content/plugins/
       ag-custom-admin/require/dynamic.php?type=js&context=login
       &ver=changed_theme line:1 [[wp-login.php:25:21]]
       ```
   
 * I didn’t pay attention to the console log until I did 2 changes recently. I added
   a Child Theme, and I changed the site from HTTP to HTTPS. So the error may have
   been popping up prior, but I just didn’t see it.
 * I’m on the lastest WP & AGCA (v4.9.8 & v6.4.1) and this occurs on my Mac with
   Firefox, Chrome, and Safari, and also on Windows.
 * On Windows 8.1 in Chrome I also get the following console message (before the
   other msgs):
 *     ```
       Resource interpreted as Stylesheet but transferred with 
       MIME type text/html:
       "https://tf-sandy.org/prophetic-blog/wp-login.php?redirect_to=
       https%3A%2F%2Ftf-sandy.org%2Fprophetic-blog%2Fwp-content%2F
       plugins%2Fag-custom-admin%2Frequire%2Fdynamic.php%3Ftype%3Dcss%26
       context%3Dlogin%26ver%3Dchanged_theme".
   
       [[wp-login.php?redirect_to=http%3A%2F%2Ftf-sandy.org%2Fprophetic-blog%2F:45]]
       ```
   
 * I can’t tell that there is anything actually breaking at runtime, although a 
   couple of the menu customizations didn’t seem to work. But haven’t looked closely
   yet (or read all the instructions), as I’m focusing on the HTTP/S issues for 
   the site. Speaking of which, there are a few images on your admin page which 
   quit loading, since they are HTTP on my HTTPS site (i.e. the mixed content error).
 * Update – more info: In the below line in the login page HTML:
 *     ```
       <link rel="stylesheet" type="text/css" 
        href="https://tf-sandy.org/prophetic-blog/wp-content/plugins/ag-custom-admin/require/dynamic.php?type=css&context=login&ver=changed_theme" />
       ```
   
 * … the reference to:
 *  /dynamic.php?type=css&context=login&ver=changed_theme
 * … does not return CSS as expected. Instead, nothing is returned.
    -  This topic was modified 7 years, 7 months ago by [Gary](https://wordpress.org/support/users/glogan/).
    -  This topic was modified 7 years, 7 months ago by [Gary](https://wordpress.org/support/users/glogan/).
    -  This topic was modified 7 years, 7 months ago by [Gary](https://wordpress.org/support/users/glogan/).
      Reason: added debugging hint
    -  This topic was modified 7 years, 7 months ago by [Gary](https://wordpress.org/support/users/glogan/).
      Reason: clarifying debugging info
    -  This topic was modified 7 years, 7 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fagca-plugin-caught-a-javascript-on-your-site%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [cusmin](https://wordpress.org/support/users/cusmin/)
 * (@cusmin)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/agca-plugin-caught-a-javascript-on-your-site/#post-10735046)
 * Hi!
 * Thanks for using AGCA. This is the error behind it.
 * Not Acceptable!
    An appropriate representation of the requested resource could
   not be found on this server. This error was generated by Mod_Security.
 * Your server is probably blocking this request.
 * Please check these links:
    [https://stackoverflow.com/questions/28090737/not-acceptable-an-appropriate-representation-of-the-requested-resource-could-no](https://stackoverflow.com/questions/28090737/not-acceptable-an-appropriate-representation-of-the-requested-resource-could-no)
 * [https://www.tipsandtricks-hq.com/apache-mod-security-update-how-to-fix-error-406-or-not-acceptable-issue-259](https://www.tipsandtricks-hq.com/apache-mod-security-update-how-to-fix-error-406-or-not-acceptable-issue-259)
 * [https://forums.modx.com/thread/35041/solved-an-appropriate-representation-of-the-requested-resource-manager-ind](https://forums.modx.com/thread/35041/solved-an-appropriate-representation-of-the-requested-resource-manager-ind)
 *  Thread Starter [Gary](https://wordpress.org/support/users/glogan/)
 * (@glogan)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/agca-plugin-caught-a-javascript-on-your-site/#post-10740196)
 * Thanks for the response.
 * The error has disappeared now. It was occurring at every request when I posted
   the issue. I will follow on your suggestion if it returns.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘AGCA plugin caught a JavaScript on your site…’ is closed to new replies.

 * ![](https://ps.w.org/ag-custom-admin/assets/icon.svg?rev=2928712)
 * [AGCA - Custom Dashboard & Login Page](https://wordpress.org/plugins/ag-custom-admin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ag-custom-admin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ag-custom-admin/)
 * [Active Topics](https://wordpress.org/support/plugin/ag-custom-admin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ag-custom-admin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ag-custom-admin/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Gary](https://wordpress.org/support/users/glogan/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/agca-plugin-caught-a-javascript-on-your-site/#post-10740196)
 * Status: resolved