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

breaks when cooking resources #37

Open
pbauer opened this issue Jan 14, 2017 · 2 comments
Open

breaks when cooking resources #37

pbauer opened this issue Jan 14, 2017 · 2 comments

Comments

@pbauer
Copy link
Member

pbauer commented Jan 14, 2017

This applies to the current master-branch when upgrading from the the last release (after the changes in b234fe2 by @rnixx:

Plone tries to cook the resources but that fails because of the resource-name collective.js.jqueryui.custom.min.js. The resource-registry of Plone 5 expects the resource-path in jscompilation to be something like ++plone++static/collective.js.jqueryui.custom.min.js and csscompilation to be ++plone++static/collective.js.jqueryui.custom.min.css.

Traceback (most recent call last):
  File "/Users/philip/.cache/buildout/eggs/plone.app.viewletmanager-2.0.10-py2.7.egg/plone/app/viewletmanager/manager.py", line 112, in render
    html.append(viewlet.render())
  File "/Users/philip/.cache/buildout/eggs/plone.app.layout-2.5.20-py2.7.egg/plone/app/layout/viewlets/common.py", line 60, in render
    return self.index()
  File "/Users/philip/.cache/buildout/eggs/Zope2-2.13.24-py2.7.egg/Products/Five/browser/pagetemplatefile.py", line 125, in __call__
    return self.im_func(im_self, *args, **kw)
  File "/Users/philip/.cache/buildout/eggs/Zope2-2.13.24-py2.7.egg/Products/Five/browser/pagetemplatefile.py", line 59, in __call__
    sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
  File "/Users/philip/.cache/buildout/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 132, in pt_render
    strictinsert=0, sourceAnnotations=sourceAnnotations
  File "/Users/philip/.cache/buildout/eggs/five.pt-2.2.4-py2.7.egg/five/pt/engine.py", line 98, in __call__
    return self.template.render(**kwargs)
  File "/Users/philip/.cache/buildout/eggs/z3c.pt-3.0.0a1-py2.7.egg/z3c/pt/pagetemplate.py", line 163, in render
    return base_renderer(**context)
  File "/Users/philip/.cache/buildout/eggs/Chameleon-2.24-py2.7.egg/chameleon/zpt/template.py", line 261, in render
    return super(PageTemplate, self).render(**vars)
  File "/Users/philip/.cache/buildout/eggs/Chameleon-2.24-py2.7.egg/chameleon/template.py", line 191, in render
    raise_with_traceback(exc, tb)
  File "/Users/philip/.cache/buildout/eggs/Chameleon-2.24-py2.7.egg/chameleon/template.py", line 171, in render
    self._render(stream, econtext, rcontext)
  File "3ba054ea5812eebd030a7c64b339e647.py", line 148, in render
  File "/Users/philip/.cache/buildout/eggs/five.pt-2.2.4-py2.7.egg/five/pt/expressions.py", line 161, in __call__
    return base()
  File "/Users/philip/.cache/buildout/eggs/Products.CMFPlone-5.0.6-py2.7.egg/Products/CMFPlone/resources/browser/scripts.py", line 123, in scripts
    result.extend(self.ordered_bundles_result())
  File "/Users/philip/.cache/buildout/eggs/Products.CMFPlone-5.0.6-py2.7.egg/Products/CMFPlone/resources/browser/resource.py", line 203, in ordered_bundles_result
    self.get_data(bundle, result)
  File "/Users/philip/.cache/buildout/eggs/Products.CMFPlone-5.0.6-py2.7.egg/Products/CMFPlone/resources/browser/scripts.py", line 42, in get_data
    cookWhenChangingSettings(self.context, bundle)
  File "/Users/philip/.cache/buildout/eggs/Products.CMFPlone-5.0.6-py2.7.egg/Products/CMFPlone/resources/browser/cook.py", line 106, in cookWhenChangingSettings
    resource_name, resource_filepath = resource_path.split('/', 1)
ValueError: need more than 1 value to unpack
@pbauer
Copy link
Member Author

pbauer commented Jan 15, 2017

I wonder if there is a right way to provide dynamically combinded resources (like collective.js.jqueryui does) as a bundle. collective.js.jqueryui.custom.min.js and collective.js.jqueryui.custom.min.css are browser-views returning js and css and thus cannot have the expected prefix ++plone++<something>.

@agitator
Copy link
Member

agitator commented May 1, 2018

@pbauer #38 should fix this?

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

2 participants