collective / wildcard.media

13 stars 12 forks source link

version 1.0a3.dev0: can create a video content #2

Closed keul closed 10 years ago

keul commented 10 years ago

Just installed the latest version from github, activated the product, created a video content the saved.

I get:

  Module zope.tal.talinterpreter, line 742, in do_insertStructure_tal
  Module Products.PageTemplates.Expressions, line 218, in evaluateStructure
  Module zope.tales.tales, line 696, in evaluate
   - URL: /Applications/buildout/test4.3/src/wildcard.media/wildcard/media/templates/video_view.pt
   - Line 21, Column 8
   - Expression: <PathExpr standard:u'context/@@wildcard_video_macro'>
   - Names:
      {'args': (),
       'container': <Audio at /Plone/test-un-bel-file>,
       'context': <Audio at /Plone/test-un-bel-file>,
       'default': <object object at 0x1002c5b70>,
       'here': <Audio at /Plone/test-un-bel-file>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x10baccfc8>,
       'request': <HTTPRequest, URL=http://localhost:8080/Plone/test-un-bel-file/wildcard_video_view>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x108f46f10>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>,
       'view': <Products.Five.metaclass.SimpleViewClass from /Applications/buildout/test4.3/src/wildcard.media/wildcard/media/templates/video_view.pt object at 0x10bad6e50>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x10badf490>}
  Module zope.tales.expressions, line 217, in __call__
  Module Products.PageTemplates.Expressions, line 155, in _eval
  Module Products.PageTemplates.Expressions, line 117, in render
  Module wildcard.media.browser, line 61, in __call__
AttributeError: image

In the file https://github.com/collective/wildcard.media/blob/772ee9261e49722a3850b8ebe7a4077bbb5ca06e/wildcard/media/browser.py#L61 there's a reference to an image attribute that is not part of the video content.

vangheem commented 10 years ago

huh, image should be there: https://github.com/collective/wildcard.media/blob/772ee9261e49722a3850b8ebe7a4077bbb5ca06e/wildcard/media/behavior.py#L34

keul commented 10 years ago

Update: putting a pdb there and calling self.context it says <Audio at /Plone/video>

from folder contents is says it's a video! I created the video again and it's still saying it's an audio.

vangheem commented 10 years ago

hmmm, not sure that is the problem you're having: https://github.com/collective/wildcard.media/blob/master/wildcard/media/profiles/default/types/WildcardVideo.xml#L20

because it should still grab the correct behavior.

keul commented 10 years ago

Seems not. I changed to content.Video, reinstalled the product, created a new video, but I get the same error (but now self.context is a Video, so you probably must fix this also)

vangheem commented 10 years ago

You on master? You mind testing latest? Hopefully that helps.

keul commented 10 years ago

I was on master! I saw you made an update some minutes ago, then I pulled. After running the upgrade step all is working. Thanks!