Answers.Body: <p>OK, I've got this working - I didn't use Andrew West's technique above, but I still upvoted the answer as helpful.</p>
  
  <p>The theme had this code in one of its includes:</p>
  
  <pre><code>if ( ! function_exists( 'optionsframework_media_scripts' ) ) : 
  
  add_action( 'admin_enqueue_scripts', 'optionsframework_media_scripts' );
  
  function optionsframework_media_scripts(){
    if ( function_exists( 'wp_enqueue_media' ) ) 
      wp_enqueue_media();
    wp_register_script( 'of-media-uploader', OPTIONS_FRAMEWORK_DIRECTORY .'js/media-uploader.js', array( 'jquery' ) );
    wp_enqueue_script( 'of-media-uploader' );
    wp_localize_script( 'of-media-uploader', 'optionsframework_l10n', array(
      'upload' =&gt; __( 'Upload', 'organizedthemes' ),
      'remove' =&gt; __( 'Remove', 'organizedthemes' )
    ) );
  }
  
  endif;
  </code></pre>
  
  <p>This was loading Backbone.  It also seems to be extraneous; the media uploader seems to work fine with this function commented out.</p>
  
  <p>So I created a child theme, and in the <code>functions.php</code> file in my child theme, I added this code:</p>
  
  <pre><code>//put in a blank function here to override loading this function in the parent theme.
  function optionsframework_media_scripts(){}
  </code></pre>
  
  <p>This worked great!  Ideally I'd like to copy the code from the child theme and add some conditional logic to say, "Only enqueue these scripts on a non-CiviCRM page" - but unfortunately that's beyond my Wordpress knowledge.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-28T19:58:55.730Z
Answers.Text: For a quick and easy hack I'd just check the URL for the civi basepage. 
  
  Otherwise I *think* you could check to see if Civi has been initialized: ie "if (civicrm_initialize())" - but may want to test this one as I'm not 100% sure Civi would have initialized by that point in the theme processing.
Answers.UserDisplayName: Andrew West
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-28T00:28:10.237Z
Answers.LastActivityDate: 2016-01-28T00:28:10.237Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>I <em>think</em> that when I had this it was caused by a theme loading a newer version of Backbone. Can you <a href="https://codex.wordpress.org/Function_Reference/wp_dequeue_script" rel="nofollow">dequeue</a> the script in that theme's functions.php? And try queuing the Civi version direct? Admittedly a bit of a long shot.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-27T21:53:27.843Z
Answers.Text: yes, I'd reached similar conclusions as well - and tracked it down to Backbone being enqueued by the theme.  I'm currently creating a child theme so that I can address this, and based on your help, I'll use wp_dequeue_script() to do so.  As a WP novice, I have a question though:  Is there a good way to only call this dequeueing function if we're on a CiviCRM page?
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-21T12:33:04.410Z
Answers.Text: @JonG did you get this worked out?  I THINK I worked out a tiny piece of the actual solution, but it's only half the problem and a tenth or less of the solution.  See:  http://civicrm.stackexchange.com/questions/3711/backbone-js-error-with-4-6-4-on-wp-messing-up-contribution-page-set-up/11319#11319
Answers.UserDisplayName: G H
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-21T15:20:43.783Z
Answers.Text: @GH Yes, I got this worked out - see the answer I posted to this question.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-20T19:41:47.840Z
Answers.Text: @JonG, I did see your other answer, unfortunately the Salient theme doesn't have exactly the same problem.  I was hoping that you had found the code for this workaround.  I'll ping Andrew as I'm having trouble getting my mind wrapped around the specifics here.
Answers.UserDisplayName: G H
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-27T18:32:59.347Z
Answers.LastActivityDate: 2016-01-27T18:32:59.347Z
Answers.UserDisplayName: Andrew West
Body: <p>UPDATE: Changing my theme seems to have fixed the problem - but I'm not sure how to fix the original theme.  Any advice on that issue is still welcome!</p>
  
  <p>I'm seeing symptoms identical to this question: <a href="https://civicrm.stackexchange.com/questions/3711/backbone-js-error-with-4-6-4-on-wp-messing-up-contribution-page-set-up">Backbone JS error with 4.6.4 on WP messing up contribution page set up</a></p>
  
  <p>Pages using Backbone - particularly the "Include Profile" contribution configuration page - are broken, and the JS console says: </p>
  
  <pre><code>TypeError: Backbone.Marionette is undefined
  TypeError: Backbone.CollectionSubset is not a constructor
  </code></pre>
  
  <p>However, the issue seems to be different than other folks experiencing it.  Here's what I've tried so far (including all at once):</p>
  
  <ul>
  <li>Disabling all WP plugins except CiviCRM.</li>
  <li>Disabling Summary Fields (the only CiviCRM extension in use).</li>
  <li>Clearing cache, deleting templates_c.</li>
  </ul>
  
  <p>What else can I look for regarding this Backbone error?  I assume it's a collision with WordPress's Backbone, but I don't know enough about Wordpress to troubleshoot that.</p>
  
Tags: <civicontribute><backbone>
Title: Backbone isn't loading on Civi 4.6.11/WP 4.4.1
ThreadText: # Backbone isn't loading on Civi 4.6.11/WP 4.4.1
  
  (Asked by: username_0 on 2016-01-27)
  
  UPDATE: Changing my theme seems to have fixed the problem - but I'm not sure how to fix the original theme. Any advice on that issue is still welcome!
  
  I'm seeing symptoms identical to this question: [Backbone JS error with 4.6.4 on WP messing up contribution page set up](https://civicrm.stackexchange.com/questions/3711/backbone-js-error-with-4-6-4-on-wp-messing-up-contribution-page-set-up)
  
  Pages using Backbone - particularly the "Include Profile" contribution configuration page - are broken, and the JS console says:
  
  ```
  TypeError: Backbone.Marionette is undefined
  TypeError: Backbone.CollectionSubset is not a constructor
  
  ```
  
  However, the issue seems to be different than other folks experiencing it. Here's what I've tried so far (including all at once):
  
  * Disabling all WP plugins except CiviCRM.
  * Disabling Summary Fields (the only CiviCRM extension in use).
  * Clearing cache, deleting templates\_c.
  
  What else can I look for regarding this Backbone error? I assume it's a collision with WordPress's Backbone, but I don't know enough about Wordpress to troubleshoot that.
  
  **Tags:** civicontribute, backbone
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2016-01-28. Score: 2 | Accepted answer
  
  OK, I've got this working - I didn't use username_1 username_1's technique above, but I still upvoted the answer as helpful.
  
  The theme had this code in one of its includes:
  
  ```
  if ( ! function_exists( 'optionsframework_media_scripts' ) ) : 
  
  add_action( 'admin_enqueue_scripts', 'optionsframework_media_scripts' );
  
  function optionsframework_media_scripts(){
    if ( function_exists( 'wp_enqueue_media' ) ) 
      wp_enqueue_media();
    wp_register_script( 'of-media-uploader', OPTIONS_FRAMEWORK_DIRECTORY .'js/media-uploader.js', array( 'jquery' ) );
    wp_enqueue_script( 'of-media-uploader' );
    wp_localize_script( 'of-media-uploader', 'optionsframework_l10n', array(
      'upload' => __( 'Upload', 'organizedthemes' ),
      'remove' => __( 'Remove', 'organizedthemes' )
    ) );
  }
  
  endif;
  
  ```
  
  This was loading Backbone. It also seems to be extraneous; the media uploader seems to work fine with this function commented out.
  
  So I created a child theme, and in the `functions.php` file in my child theme, I added this code:
  
  ```
  //put in a blank function here to override loading this function in the parent theme.
  function optionsframework_media_scripts(){}
  
  ```
  
  This worked great! Ideally I'd like to copy the code from the child theme and add some conditional logic to say, "Only enqueue these scripts on a non-CiviCRM page" - but unfortunately that's beyond my Wordpress knowledge.
  
  > **Comments:**
  > **username_1**: For a quick and easy hack I'd just check the URL for the civi basepage.   Otherwise I *think* you could check to see if Civi has been initialized: ie "if (civicrm_initialize())" - but may want to test this one as I'm not 100% sure Civi would have initialized by that point in the theme processing.  
  
  ---
  
  ### Answer by username_1 on 2016-01-27. Score: 3
  
  I *think* that when I had this it was caused by a theme loading a newer version of Backbone. Can you [dequeue](https://codex.wordpress.org/Function_Reference/wp_dequeue_script) the script in that theme's functions.php? And try queuing the Civi version direct? Admittedly a bit of a long shot.
  
  > **Comments:**
  > **username_0**: yes, I'd reached similar conclusions as well - and tracked it down to Backbone being enqueued by the theme.  I'm currently creating a child theme so that I can address this, and based on your help, I'll use wp_dequeue_script() to do so.  As a WP novice, I have a question though:  Is there a good way to only call this dequeueing function if we're on a CiviCRM page?  
  > **username_2**: @JonG did you get this worked out?  I THINK I worked out a tiny piece of the actual solution, but it's only half the problem and a tenth or less of the solution.  See:  http://civicrm.stackexchange.com/questions/3711/backbone-js-error-with-4-6-4-on-wp-messing-up-contribution-page-set-up/11319#11319  
  > **username_0**: @GH Yes, I got this worked out - see the answer I posted to this question.  
  > **username_2**: @JonG, I did see your other answer, unfortunately the Salient theme doesn't have exactly the same problem.  I was hoping that you had found the code for this workaround.  I'll ping username_1 as I'm having trouble getting my mind wrapped around the specifics here.  
  
  ---
  
  