Title: Backbone Collision
Last modified: August 20, 2016

---

# Backbone Collision

 *  [Collin Donahue-Oponski](https://wordpress.org/support/users/collindo/)
 * (@collindo)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/backbone-collision/)
 * Hi,
 * I develop a plugin that also uses Backbone. I’ve never had a library collision
   related to backbone before, and the collision is my fault (I was concatenating
   several JS files and enqueuing as one file), but once I fix it on my end, I think
   there will still be a potential problem on your end.
 * In jetpack/modules/notes.php, when you guys are calling `wp_enqueue_script`, 
   you’re specifying the script version as `JETPACK_NOTES__CACHE_BUSTER` instead
   of the actual version of the script, where `JETPACK_NOTES__CACHE_BUSTER` is defined
   as `JETPACK__VERSION . '-' . gmdate( 'oW' )`.
 * Won’t that create problems for everyone else trying to use backbone? Won’t we
   be forced to support the same version of backbone that Jetpack supports? The 
   same goes for underscore and possibly other scripts enqueued in that file.
 * [http://wordpress.org/extend/plugins/jetpack/](http://wordpress.org/extend/plugins/jetpack/)

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

 *  Plugin Contributor [Sheri Grey](https://wordpress.org/support/users/designsimply/)
 * (@designsimply)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/backbone-collision/#post-3165638)
 * Thanks very much for the feedback. It’s a good point, and I’ve passed it along
   to the Jetpack developers.
 *  Plugin Contributor [Jeff Bowen](https://wordpress.org/support/users/jblz/)
 * (@jblz)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/backbone-collision/#post-3165639)
 * Hi, Collin:
 * The potential library conflicts should be averted as of [http://plugins.trac.wordpress.org/changeset/627800](http://plugins.trac.wordpress.org/changeset/627800)
 * This will be included in next Jetpack release.
 * Thanks again for your report.
    ~Jeff
 *  Thread Starter [Collin Donahue-Oponski](https://wordpress.org/support/users/collindo/)
 * (@collindo)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/backbone-collision/#post-3165640)
 * Hi,
 * Thank you so much for tending to this issue.
 * I’m a little embarrassed right now — I might have been thinking incorrectly when
   I sent this issue over (about how script versions are handled), and I’m afraid
   I’ve caused you to make a change that doesn’t significantly affect the end result.
 * Your changes include:
    – Checking for a pre-registered version of the script 
   before registering your own – Changing the priority of your action hook to 120
 * The first change is a nice touch. Regarding changing the priority:
    A developer
   who notices a version conflict can “solve” the problem by enqueuing their version
   of backbone before jetpack’s version. So when you change the priority of your
   action hook to 120, what you’ve really done is made it so that, by default, JetPack
   will defer to someone else’s version of backbone. Is that what you want to do?
   I’m thinking that, if anything, you would want to change the priority to 99 so
   that only someone who wants to intentially override JetPack’s version could do
   so. At least that way, it’s more likely that the conflicting plugin will break
   instead of JetPack. If the developer even notices, then they will be aware of
   the potential conflict, they can still find a way around it if needed (enqueue
   with priority < 99), and they will probably be more careful to test against JetPack
   in the future.
 * Any thoughts? Am I understanding this correctly?
 * Thanks again for your time.
 *  Plugin Contributor [Jeff Bowen](https://wordpress.org/support/users/jblz/)
 * (@jblz)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/backbone-collision/#post-3165645)
 * Howdy,
    Since the Notifications feature is primarily a publisher-facing feature(
   unless someone is showing the toolbar to logged-out users via the ‘show_admin_bar’
   filter), My rationale was: any conflicts will simply cause the Notifications 
   feature to not work (as opposed to breaking the other plugin’s functionality).
 * Since Backbone.js is included with WordPress core as of 3.5, I’m thinking most
   plugin devs will have to test against the included version and this won’t be 
   an issue.
 * Please let me know if you have any further concerns or notice any issues.
    Again,
   thanks for your note.
 * Best,
    ~Jeff

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

The topic ‘Backbone Collision’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

## Tags

 * [backbone](https://wordpress.org/support/topic-tag/backbone/)
 * [conflict](https://wordpress.org/support/topic-tag/conflict/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [underscore](https://wordpress.org/support/topic-tag/underscore/)

 * 4 replies
 * 3 participants
 * Last reply from: [Jeff Bowen](https://wordpress.org/support/users/jblz/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/backbone-collision/#post-3165645)
 * Status: not resolved