• Using current versions of JetPack and Autoptimize

    These scripts are added by Jetpack:

    
    <script type='text/javascript' src='http://s1.wp.com/wp-content/mu-plugins/notes/notes-common-v2.js?ver=4.3.2-201648'></script>
    <script type='text/javascript' src='http://s0.wp.com/wp-content/mu-plugins/notes/admin-bar-v2.js?ver=4.3.2-201648'></script>
    

    When logged in only, I see these errors in Chrome dev. console.

    
    Uncaught ReferenceError: Backbone is not defined
        at http://s1.wp.com/wp-content/mu-plugins/notes/notes-common-v2.js?ver=4.4.1-201648:32:44
        at http://s1.wp.com/wp-content/mu-plugins/notes/notes-common-v2.js?ver=4.4.1-201648:158:281
    
    Uncaught ReferenceError: _ is not defined
        at http://s0.wp.com/wp-content/mu-plugins/notes/admin-bar-v2.js?ver=4.4.1-201648:2:51
    

    When I turn Autoptimize off using ?ao_noptimize=1

    There are no errors.

    How do I tell Autoptimize to leave these two scripts as is? I see what to do for scripts on our server, but not external ones such as shown here.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Frank Goossens

    (@futtta)

    excluding those scripts won’t work as they are auto-excluded @swansonphotos, you’ll have to exclude the scripts the errors are referring to; backbone and _ (underscore).

    now what I don’t understand; your title says “admin dashboard errors”, but autoptimize is not active on /wp-admin/ urls? or are you referring to the adminbar for logged in users on the frontend?

    frank

    Thread Starter Pioneer Web Design

    (@swansonphotos)

    They occur for logged in admin with admin bar showing.

    They do not occur when not logged in.

    When Autoptimize is not active, they do not occur at any time.

    Plugin Author Frank Goossens

    (@futtta)

    ok, two possibilities to fix:
    * find out which js to exclude (cfr. backbone & underscore) with some trial and error (cfr. troubleshooting tips in the FAQ)
    * disable AO for logged in users by hooking into the API as shown in the FAQ in the paragraph about visual composer/ beaver builder. you could even add logic in there to only exclude for admin-users if you have non-admins logging in as well.

    hope this helps,
    frank

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

The topic ‘Jetpack and Autoptimize – Admin Dashboard Errors’ is closed to new replies.