#669 ✓ staged

Plugins passing in functions as definitions need to also pass in their manifests

Reported by cadecairos | July 28th, 2011 @ 05:22 PM | in 0.8 (closed)

The Popcorn.plugin() method takes 3 arguments: name, definition, and manifest.

Virtually every (if not all) plugins only make use of the first two parameters. This is not a problem as long as the definition parameter is an object literal. There are some plug-ins that pass in anonymous functions to definition, which do not get resolved into objects. This is causing problems in butter, because these plug-ins are not getting a manifest attached to their trackEvents.

We need to move the manifest declarations in the plug-ins passing anonymous functions so that they are the third parameter.

The plugins that need changes are:

  • attribution
  • code
  • flickr
  • googlefeed
  • googlemap
  • lastfm
  • mustache
  • openmap
  • processing
  • tagthisperson
  • timeline

Comments and changes to this ticket

  • cadecairos

    cadecairos July 28th, 2011 @ 06:10 PM

    • State changed from “assigned” to “peer-review-requested”
    • Assigned user changed from “cadecairos” to “David Seifried”

    Alright, I've fixed all the plug-ins that were declaring manifests incorrectly. Several of the ones listed above were not in error so they remained untouched.

    see my t669 branch for the changes.

    The plug-ins should pass lint and I tested the unit tests for each plug-in I touched, they were al passing.

  • Rick

    Rick July 28th, 2011 @ 06:38 PM

    Nice work identifying this issue and nailing down the solution!


    plugins/attribution/popcorn.attribution.js plugins/code/popcorn.code.js

    Passing in:

    • FF 5.x (stable), 7.x (Nightly)

    • Chrome 12 (stable)

    Lint Passes

  • Rick

    Rick July 28th, 2011 @ 06:38 PM

    • State changed from “peer-review-requested” to “super-review-requested”
  • David Seifried

    David Seifried July 29th, 2011 @ 11:11 AM

    • Assigned user changed from “David Seifried” to “Jon Buckley”
    • State changed from “super-review-requested” to “review-looks-good”

    Yeap everything looks good to me. Tested in FF 4 and Chrome 12, unit tests all still pass, as well as the demos.


  • Jon Buckley

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Popcorn.js is an HTML5 video framework that lets you bring elements of the web into your videos.

Popcorn.js is a project of Web Made Movies, Mozilla's Open Video Lab.

Shared Ticket Bins