WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Javascript Not Functioning On Admin Pages after 3.3 Upgrade (25 posts)

  1. pmcmillan3698
    Member
    Posted 2 years ago #

    Just upgraded to 3.3 - site still runs fine, but admin pages broken. No Javascript - can't upload media, screen options doesn't pull down, etc. Also no admin bar when browsing site when logged in. No apparent errors.

    Followed master list, installed Hotfix 0.8, no dice. Switched to twenty-eleven, and that immediately fixed it, so i know it is a theme issue. Can't see anything in the CSS that could cause problem - any tips? Assuming it must be a javascript issue, but I don't even know where to begin.

    Thanks to all who try to help, it is much appreciated. Fortunately site is not down, but I have updates scheduled and can't do them (no upload capability).

  2. pmcmillan3698
    Member
    Posted 2 years ago #

    BTW - also disabled plugins, that didn't change anything, only seems to be theme-related. Also tried manual install.

  3. esmi
    Forum Moderator
    Posted 2 years ago #

    Do you intend to give us some sort of clue as to which theme you are using?

  4. pmcmillan3698
    Member
    Posted 2 years ago #

    sorry, it's completely custom. what can i post that would help?

  5. esmi
    Forum Moderator
    Posted 2 years ago #

    Mentioning that it was a custom/bespoke theme would have helped. Try removing all javascript from your theme. If that doesn't work, start emptying out the function.php file. Also turn debug on and enable error logging.

  6. pmcmillan3698
    Member
    Posted 2 years ago #

    Thanks for your help. Will try that first. I'm trying to figure out, though, why the theme javascript would affect the admin pages. As far as I can tell no code from the theme is pulled in the admin, is it?

  7. esmi
    Forum Moderator
    Posted 2 years ago #

    Oh... yes...

  8. pmcmillan3698
    Member
    Posted 2 years ago #

    ok, tried removing the entire contents of main.js, as well as emptying functions.php, to no avail. I'm looking at the header of the dashboard admin page, and I don't see it loading anything theme-specific. Will work on debugging next, but I'm having a hard time seeing where my theme is messing up my dashboard as I don't see anything being loaded from the theme....thanks again

    [Code moderated as per the Forum Rules. Please use the pastebin]

  9. pmcmillan3698
    Member
    Posted 2 years ago #

    When I enable debug I get the following errors (never messed with debug before, so trying to sort out which are critical and which are not)...

    Notice: Undefined index: aiosp_google_analytics_id in /var/www/domain/htdocs/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php on line 693
    
    Notice: Undefined index: aiosp_enabled in /var/www/domain/htdocs/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php on line 717
    
    Notice: Undefined index: aiosp_enabled in /var/www/domain/htdocs/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php on line 717
    
    Notice: Undefined index: page in /var/www/domain/htdocs/wp-content/plugins/custom-contact-forms/custom-contact-forms.php on line 91
    
    Notice: Undefined property: CustomContactFormsAdmin::$getAdminOptionsName in /var/www/domain/htdocs/wp-content/plugins/custom-contact-forms/custom-contact-forms.php on line 62
    
    Notice: automatic_feed_links is deprecated since version 3.0! Use add_theme_support( 'automatic-feed-links' ) instead. in /var/www/domain/htdocs/wp-includes/functions.php on line 3458
    
    Notice: Undefined index: ccf_export in /var/www/domain/htdocs/wp-content/plugins/custom-contact-forms/custom-contact-forms-admin.php on line 40
    
    Notice: Undefined index: ccf_clear_import in /var/www/domain/htdocs/wp-content/plugins/custom-contact-forms/custom-contact-forms-admin.php on line 51
    
    Notice: Undefined index: ccf_merge_import in /var/www/domain/htdocs/wp-content/plugins/custom-contact-forms/custom-contact-forms-admin.php on line 51
    
    Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /var/www/domain/htdocs/wp-includes/functions.php on line 3542
    
    Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /var/www/domain/htdocs/wp-includes/functions.php on line 3542
    
    Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /var/www/domain/htdocs/wp-includes/functions.php on line 3542
    
    Notice: add_contextual_help is deprecated since version 3.3! Use get_current_screen()->add_help_tab() instead. in /var/www/domain/htdocs/wp-includes/functions.php on line 3458
    
    Notice: Undefined property: CustomContactFormsDashboard::$getAdminOptionsName in /var/www/domain/htdocs/wp-content/plugins/custom-contact-forms/custom-contact-forms.php on line 62
    
    Notice: Undefined property: CustomContactFormsDashboard::$getAdminOptionsName in /var/www/domain/htdocs/wp-content/plugins/custom-contact-forms/custom-contact-forms.php on line 62
    
    Notice: Undefined property: CustomContactFormsDashboard::$getAdminOptionsName in /var/www/domain/htdocs/wp-content/plugins/custom-contact-forms/custom-contact-forms.php on line 62
  10. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    Can you post (via Pastebin) your header.php and functions.php files?

  11. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    Thanks for your help. Will try that first. I'm trying to figure out, though, why the theme javascript would affect the admin pages. As far as I can tell no code from the theme is pulled in the admin, is it?

    That depends entirely on the Theme, and how you're linking/including/enqueueing scripts. If done properly, front-end scripts will not be loaded in the back end. But, we need to see the actual code, in order to sort it out.

  12. pmcmillan3698
    Member
    Posted 2 years ago #

  13. pmcmillan3698
    Member
    Posted 2 years ago #

    Chip - not sure if it is done properly, I didn't personally build the theme. would appear it is not - but everything did work perfectly on 3.2.1

  14. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    Hmm, okay... can you also post pastebins for the following files?

    include( TEMPLATEPATH.'/constants.php' );
    include( TEMPLATEPATH.'/classes.php' );
    include( TEMPLATEPATH.'/widgets.php' );
  15. pmcmillan3698
    Member
    Posted 2 years ago #

    classes.php > http://pastebin.com/H2PuzzE3
    widgets.php > http://pastebin.com/aVbK58dM

    there is no constants.php.

  16. pmcmillan3698
    Member
    Posted 2 years ago #

    disregard the last post, those were from wrong site, sorry!!!!!

    here are the correct links:

    constants.php > http://pastebin.com/P7QujqzB
    classes.php > http://pastebin.com/xVmUM7WJ
    widgets.php > http://pastebin.com/y08as99N

  17. pmcmillan3698
    Member
    Posted 2 years ago #

    just upgraded another site, same exact issue (from same theme developer). at least this time I have a backup ready to roll out.

  18. Mikko Saari
    Member
    Posted 2 years ago #

    I have the same problem, and my blog is straight from box WP 3.3 with Twenty Eleven 1.3. The problem is caused by wp-admin/load-scripts.php returning 500 Internal Server Error instead of jQuery.

    The code fails here:

    $wp_scripts = new WP_Scripts();
    wp_default_scripts($wp_scripts);

    The first line is where it all breaks down, the program won't run beyond it. No idea what's going on here.

  19. jeremycherfas
    Member
    Posted 2 years ago #

    May I ask what tool you used to discover that? I have some extensions in my browser, but wasn't sure which ones to use.

    Jeremy

  20. Mikko Saari
    Member
    Posted 2 years ago #

    Loaded the file directly with the browser... Firebug can also show it.

  21. jeremycherfas
    Member
    Posted 2 years ago #

    Thanks. I get exactly the same error on my site at http://jeremycherfas.net/wp but not at two other sites that I also upgraded automatically.

  22. jeremycherfas
    Member
    Posted 2 years ago #

    Update to 3.3.1 fixed this for me.

  23. pmcmillan3698
    Member
    Posted 2 years ago #

    my original theme developer ended up fixing the issue at no charge for us. I haven't had a chance to follow up to see what fixes were implemented, but thanks to all for their help on the forum.

  24. webfanatic
    Member
    Posted 2 years ago #

    pmcmillan3698 did you ever get a chance to look at the changes your developer made? I'm struggling with the same issue.

  25. webfanatic
    Member
    Posted 2 years ago #

    I found another thread that had the solution for me. I commented out the Custom_Admin_Bar class in classes.php in my custom theme. I also noticed a deprecation warning for automatic_feed_links( false ) which I changed to add_theme_support( 'automatic-feed-links' ) in functions.php. Now error logs and UI are clean.

Topic Closed

This topic has been closed to new replies.

About this Topic