Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in galleria.py(261)galleriajs() #11

Closed
cleberjsantos opened this issue May 19, 2012 · 1 comment
Closed

Bug in galleria.py(261)galleriajs() #11

cleberjsantos opened this issue May 19, 2012 · 1 comment

Comments

@cleberjsantos
Copy link
Contributor

The bug occurs when you insert a link object with to url of flickr or picasa.

TraceBack:


   - URL: .../src/sc.galleria.support/src/sc/galleria/support/browser/templates/galleria_view.pt
   - Line 108, Column 7
   - Expression: <PathExpr standard:u'view/galleriajs'>
   - Names:
      {'args': (),
       'container': <ATLink at /galleria/testando-a-galeria>,
       'context': <ATLink at /galleria/testando-a-galeria>,
       'default': <object object at 0xb776d6a0>,
       'here': <ATLink at /galleria/testando-a-galeria>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xb473dbbc>,
       'request': <HTTPRequest, URL=http://localhost:8080/galleria/testando-a-galeria/galleria_view>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0xb51797cc>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>,
       'view': <Products.Five.metaclass.SimpleViewClass from /home/cleber/zope/develope/buildouts_255_317_336/src/sc.galleria.support/src/sc/galleria/support/browser/templates/galleria_view.pt object at 0xb479b12c>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0xb479b44c>}
  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 sc.galleria.support.browser.galleria, line 261, in galleriajs
AttributeError: 'SimpleViewClass from /home/cleber/zope/develope/bu' object has no attribute 'galleria_flickrid'
@cleberjsantos
Copy link
Contributor Author

Solution is to pass the "plname" in the load Flickr and Picasa Plugin.

@@ -258,7 +262,7 @@ class Galleria(BrowserView):

                           })
                       }) """ % (str(self.settings.selector),
-                               str(self.galleria_flickrid()),
+                               str(self.plugins(plname='flickr')),
                                int(self.flickrplugin.flickr_max),
                                str(self.flickrplugin.flickr_desc).lower(),
                                int(self.settings.gallery_width),
@@ -293,8 +297,8 @@ class Galleria(BrowserView):
                       }) """ % (str(self.settings.selector),
                                int(self.picasaplugin.picasa_max),
                                str(self.picasaplugin.picasa_desc).lower(),
-                               str(self.galleria_picasauserandid()[0]),
-                               str(self.galleria_picasauserandid()[1]),
+                               str(self.plugins(plname='picasaweb')[0]),
+                               str(self.plugins(plname='picasaweb')[1]),
                                int(self.settings.gallery_width),
                                int(self.settings.gallery_height),
                                str(self.settings.autoplay).lower())

cleberjsantos added a commit that referenced this issue May 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant