WordPress.org

Ready to get started?Download WordPress

Forums

AG Custom Admin
[resolved] Activated AGCA = Login Screen Disappears (15 posts)

  1. Ansel Taft
    Member
    Posted 1 year ago #

    I filled out the bug report form on your site but couldn't tell if our report actually went through so I am reposting here. I apologize if you received duplicate entries.

    Hi Argonius,

    I just updated to the latest version of AG Custom Admin and when I activated the plugin the login screen disappeared with the following errors in console (see below). To troubleshoot, I disabled all the other plugins and the problem persisted.

    "
    ReferenceError: jQuery is not defined
    http://dev.xmh.com/wp-includes/js/jquery/ui/jquery.ui.core.min.js?ver=1.9.2
    Line 5

    ReferenceError: jQuery is not defined
    http://dev.xmh.com/wp-includes/js/jquery/ui/jquery.ui.widget.min.js?ver=1.9.2
    Line 5

    ReferenceError: jQuery is not defined
    http://dev.xmh.com/wp-includes/js/jquery/ui/jquery.ui.position.min.js?ver=1.9.2
    Line 5

    ReferenceError: jQuery is not defined
    http://dev.xmh.com/wp-content/plugins/wp-fullcalendar/includes/js/main.js?ver=3.5.1
    Line 114

    ReferenceError: jQuery is not defined
    http://dev.xmh.com/wp-content/plugins/ag-custom-admin/script/ag_script.js?ver=1.2.7.1
    Line 382

    ReferenceError: jQuery is not defined
    http://dev.xmh.com/wp-login.php
    Line 51

    ReferenceError: jQuery is not defined
    http://dev.xmh.com/wp-login.php
    Line 126
    "

    Please let me know how I may clear up this issue. My team prefers your plugin over the other admin area customizers and would love to get it working for us again. I would be happy to donate if we can find the source of the issue.

    Perhaps our theme is missing something in the header or footer that AG Custom Admin is expecting to hook into? Our theme is the following:

    http://320press.com/wpbs/

    Best Regards,

    Ansel Taft

    http://wordpress.org/extend/plugins/ag-custom-admin/

  2. argonius
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Please check for errors in browser's console on your login page. It could be that theme is throwing a JavaScript error or is somehow incompatible with AGCA.

    You can send me your login page URL if it's publicly accessible.

    Thanks,
    Argonius

  3. Ansel Taft
    Member
    Posted 1 year ago #

    The errors referenced above are from the console.

    I do not have a public-facing URL to send as this issue has persisted for two releases (since 1.2.6); we stripped it from our production sites until we can clear it up.

    Is there anything else we can provide?

  4. argonius
    Member
    Plugin Author

    Posted 1 year ago #

    Can you paste here a content of the HEAD tag inside your login page? Or if you want you could send it to me privately. jQuery script is not loaded for some reason, we should see the order of the included scripts.

  5. Ansel Taft
    Member
    Posted 1 year ago #

    Sure thing, it's:

    <head>
    	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    	<title>Cross-Media Hub › Log In</title>
    	<link rel="stylesheet" id="wp-admin-css" href="http://dev.xmh.com/wp-admin/css/wp-admin.min.css?ver=3.5.1" type="text/css" media="all">
    <link rel="stylesheet" id="buttons-css" href="http://dev.xmh.com/wp-includes/css/buttons.min.css?ver=3.5.1" type="text/css" media="all">
    <link rel="stylesheet" id="colors-fresh-css" href="http://dev.xmh.com/wp-admin/css/colors-fresh.min.css?ver=3.5.1" type="text/css" media="all">
    <script type="text/javascript" src="http://dev.xmh.com/wp-includes/js/jquery/ui/jquery.ui.core.min.js?ver=1.9.2"></script>
    <script type="text/javascript" src="http://dev.xmh.com/wp-includes/js/jquery/ui/jquery.ui.widget.min.js?ver=1.9.2"></script>
    <script type="text/javascript" src="http://dev.xmh.com/wp-includes/js/jquery/ui/jquery.ui.position.min.js?ver=1.9.2"></script>
    <script type="text/javascript">
    /* <![CDATA[ */
    var WPFC = {"ajaxurl":"http:\/\/dev.xmh.com\/wp-admin\/admin-ajax.php","firstDay":"1","wpfc_theme":"1","wpfc_limit":"30","wpfc_limit_txt":"more ...","wpfc_theme_css":"http:\/\/dev.xmh.com\/wp-content\/plugins\/wp-fullcalendar\/includes\/css\/ui-themes\/le-frog.css","wpfc_qtips":"1","wpfc_qtips_classes":"ui-tooltip-light","wpfc_qtips_my":"top center","wpfc_qtips_at":"bottom center"};
    /* ]]> */
    </script>
    <script type="text/javascript" src="http://dev.xmh.com/wp-content/plugins/wp-fullcalendar/includes/js/main.js?ver=3.5.1"></script>
    
                            <script type="text/javascript">
                                var agca_global_plugin_url = 'http://dev.xmh.com/wp-content/plugins/ag-custom-admin/';                        </script>
    			<link rel="stylesheet" type="text/css" href="http://dev.xmh.com/wp-content/plugins/ag-custom-admin/style/ag_style.css?ver=1.2.7.1">
    			<script type="text/javascript" src="http://dev.xmh.com/wp-content/plugins/ag-custom-admin/script/ag_script.js?ver=1.2.7.1"></script>	                        	
    
                                                        <style type="text/css">
                                                                  </style>
                                 <script type="text/javascript">
                                                                  </script>
    
    	     <script type="text/javascript">
    		 document.write('<style type="text/css">html{visibility:hidden;}</style>');
    		 		function AGCAErrorPage(){
    			if(document.getElementsByTagName('html')[0].style.visibility == ""){
    			var txt = "";
    				txt += 'AG Custom Admin Error\n\n\n';
    				txt += 'AG Custom Admin is unable to correctly process this page. Probably there are some errors thrown from some of the installed plugins or templates.\n\n\n';
    				txt += 'To resolve this issue please:\n\n';
    				txt += '* Check browser\'s console for errors. Analyse .js script location which throws the error. Location of the script can give you more information about where is the source of the problem. Usualy it is a location of a plugin or a template. If there are more than one error, usualy the first one is the one which caused this problem.\n\n';
    				txt += '* If you can\'t access your login page, please disable JavaScript in your browser. After you log in, you can remove or fix problematic plugin, and re-enable JavaScript again.\n\n';
    				txt += '* If you can\'t find the source of the problem by yourself, please post this error to AGCA WordPress.org support page(http://wordpress.org/extend/plugins/ag-custom-admin/) or to AGCA support page(http://agca.argonius.com/ag-custom-admin/)';
    				txt += '\n\nThank you.';
    				alert(txt);
    			}
    		}
    		window.setTimeout(AGCAErrorPage,4000);
    				 var agca_version = "1.2.7.1";
    		 var wpversion = "3.5.1";
                     var isSettingsImport = false;
                     var agca_context = "login";
            /* <![CDATA[ */
                jQuery(document).ready(function() {
    				try{ 
    
    						jQuery("#login h1 a").attr("title","");	
    
    			 }catch(err){
    				alert("AGCA - LOGIN ERROR: " + err.name + " / " + err.message);
    			 }finally{				
    
    				jQuery('html').show();
    				jQuery('html').css('visibility','visible');	
    
    			 }
                });
            /* ]]> */
    
            </script><style type="text/css">html{visibility:hidden;}</style>
    	<meta name="robots" content="noindex,nofollow">
    	</head>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

  6. Ansel Taft
    Member
    Posted 1 year ago #

    Strangely, on the actual pages jQuery is there:

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

    Any idea why it's omitted from the login page?

  7. argonius
    Member
    Plugin Author

    Posted 1 year ago #

    Is there any chance that you renamed default WP login page name?
    Please open AGCA plugin.php and search for "reloadScript"

    Try changing this:

    if(in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')) || WP_ADMIN == 1){
                    wp_enqueue_script('jquery');
                }

    to this:

    wp_enqueue_script('jquery');
    if(in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')) || WP_ADMIN == 1){              
    
                }

    and see if it works after that.

  8. Ansel Taft
    Member
    Posted 1 year ago #

    "Is there any chance that you renamed default WP login page name?"

    We don't mettle in stuff like that.

    I'll try your code fix and report back.

  9. Ansel Taft
    Member
    Posted 1 year ago #

    Regarding the code tweak, no luck. I do not see jQuery in the header still.

    The code looked like this following your post:

    function reloadScript(){
                wp_enqueue_script('jquery');
    if(in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')) || WP_ADMIN == 1){
                }
    	}
  10. argonius
    Member
    Plugin Author

    Posted 1 year ago #

    What happens if you disable that theme? Might be that someting else is de-registering jQuery (wp_deregister_script( 'jquery' );)

    What happens if you remove the line:
    wp_enqueue_script('jquery');
    in AGCA?

    Please try some of the combinations from this post:
    http://stackoverflow.com/questions/14606823/wordpress-wp-enqueue-script-not-working

  11. Ansel Taft
    Member
    Posted 1 year ago #

    Looks like it's hard coded into the theme's header.php file:

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

    Is there a better way to call jQuery?

  12. argonius
    Member
    Plugin Author

    Posted 1 year ago #

    That is bad. That line should be replaced with this:

    wp_enqueue_script('jquery');

    where WordPress should decide which script to include. Try replacing or removing that line to test. Theme's author should fix that anyway.

  13. Ansel Taft
    Member
    Posted 1 year ago #

    Argonius, as I dig deeper into how our theme is currently coded I think it's more our problem than anything to do with AGCA. I'm going to send a donation and thank you for your time.

  14. argonius
    Member
    Plugin Author

    Posted 1 year ago #

    I'm glad that you found the source of the problem. Thanks!

  15. ylluminate
    Member
    Posted 1 year ago #

    I'm having the same kind of error here, however there is NO inclusion of jQuery on the login page. We are using Headway 3.5, however that should not have bearing on this login page since there are no customizations involved on our theme's end in this regard. When I disable AG Custom Admin and reload likewise there is no jQuery being included in this page.

    Here is my console output: http://cl.ly/image/2K2A0L3G2Y21

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.