silvalayout example broken in trunk

Bug #184252 reported by Andy Altepeter
2
Affects Status Importance Assigned to Milestone
Silva
Fix Released
Low
Unassigned

Bug Description

I'm trying to reproduce the error reported in https://bugs.launchpad.net/silva/+bug/128518 and wanted a second layout to test with. So, I copied the SilvaLayout/examples/SilvaLayoutTemplate to my products directory. I get the following error when I start up:
This is in Zope-2.10, Silva trunk, SilvaLayout trunk:

<brunt of traceback>
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/home/aaltepet/infrae/Zope-1/etc/site.zcml", line 15.2-15.23
    ZopeXMLConfigurationError: File "/home/aaltepet/infrae/Zope-1/Products/SilvaLayoutTemplate/configure.zcml", line 17.2-19.4
    ZopeXMLConfigurationError: File "/home/aaltepet/infrae/Zope-1/Products/SilvaLayoutTemplate/browser/configure.zcml", line 11.2-13.4
    ZopeXMLConfigurationError: File "/home/aaltepet/infrae/Zope-1/Products/SilvaLayoutTemplate/browser/silvalayouttemplate/configure.zcml", line 45.2-48.4
    ConfigurationError: ('Invalid value for', 'layers', "ImportError: Couldn't import silvadefault, No module named silvadefault in silvalayouttemplate silvadefault default")

I tracked this down by comparing the SilvaLayout/browser/silvadefault/configure.zcml between the 1.6 branch and the trunk. The trunk is missing the following line:
  <browser:layer name="silvalayouttemplate"/>

When I add this, I get deprecation warnings during Zope startup:
/home/aaltepet/infrae/Zope-1/Products/SilvaLayout/browser/silvadefault/configure.zcml:11: DeprecationWarning: Creating layers via ZCML has been deprecated. The browser:layer directive will be removed in Zope 3.5. Layers are now interfaces extending zope.publisher.interfaces.browser.IBrowserRequest. They do not need further registration.
  <browser:layer name="silvadefault"/>
/home/aaltepet/infrae/Zope-1/Products/SilvaLayoutTemplate/browser/silvalayouttemplate/configure.zcml:11: DeprecationWarning: Creating layers via ZCML has been deprecated. The browser:layer directive will be removed in Zope 3.5. Layers are now interfaces extending zope.publisher.interfaces.browser.IBrowserRequest. They do not need further registration.
  <browser:layer name="silvalayouttemplate"/>
/home/aaltepet/infrae/Zope-1/Products/SilvaLayoutTemplate/browser/silvalayouttemplate/configure.zcml:45: DeprecationWarning: Creating skins via ZCML has been deprecated. The browser:skin directive will be removed in Zope 3.5. Skins are now interfaces extending zope.publisher.interfaces.browser.IBrowserRequest. They are registered using the 'interface' directive.
  <browser:skin

The SilvaLayout trunk has been updated to work with the new version of Five in Zope 2.10. BUT, the silvalayouttemplate wasn't upgraded to work with this, and it seems all layouts based off of silvadefault will need to be updated to work with Zope 2.10.

Changed in silva:
assignee: nobody → kitblake
importance: Undecided → Low
Revision history for this message
Kit Blake (kitblake) wrote :

How about we delete the examples dir? There's only one example anyway, and its failure is guaranteed to happen again - the example code falling behind the technological edge - because Five/Z3 is such a moving target right now.

Revision history for this message
Andy Altepeter (aaltepet) wrote :

OK, I was hoping for a fix, as it'd be nice to have a working example in order to increase adoption of SilvaLayout. But you're right; it's going to break again...and so will SilvaLayout. BUT, if the example is fixed with SilvaLayout is fixed, it wouldn't be problem. The documentation in SilvaLayout/README.txt is old, too.

I'll let you comment on this, and depending on whether the above comment changes your mind, either fix the example layout and documentation or nix the example.

Revision history for this message
Kit Blake (kitblake) wrote :

That's an accurate point, that if we don't provide something working adoption is less likely. I'd really prefer to get rid of the maintenance burden, but let's fix in order to promote SilvaLayout. We should take the time and update the README too.

IIRC the example looks horrible. Maybe we should reduce it to utterly default style so it doesn't look like we attempted any design, just show: here is a page rendered with a template (with a breadcrumb and content), referencing a stylesheet (with one selector).

Changed in silva:
assignee: kitblake → aaltepet
Revision history for this message
Andy Altepeter (aaltepet) wrote :

The layout example is now working without warning during zope startup.

Revision history for this message
Andy Altepeter (aaltepet) wrote :

finished touching up the layout template example.

Changed in silva:
milestone: none → 2.1
status: New → Fix Committed
Changed in silva:
assignee: aaltepet → nobody
Changed in silva:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.