Ticket #8094 (new Bug)

Opened 4 years ago

Last modified 3 years ago

Arbitrary skin selection leads to widespread Site Errors with NuPlone and other themes: KeyError: 'main_template' (and/or 'Zope has encountered a problem publishing your object(s)')

Reported by: grahamperrin Owned by:
Priority: major Milestone: 3.3.x
Component: Infrastructure Keywords: NuPlone
Cc: grahamperrin, Duke

Description (last modified by hannosch) (diff)

I'm not sure whether this is a manifestation of ticket:7357

  1. install, non-root, ZEO using Plone-3.1.1-UnifiedInstaller
  1. install the included NuPlone trunk
  1. at  http://localhost:8080/Plone/portal_skins/manage_propertiesForm
  • [√] Allow arbitrary skins to be selected
  1. after a short while, for various pages,

An error was encountered while publishing this resource.

Examples

 http://localhost:8080/Plone results in

Site Error

An error was encountered while publishing this resource.

Debugging Notice
Zope has encountered a problem publishing your object.

Cannot locate object at: http://localhost:8080/Plone/front-page/document_view

— without additional debug information.

 http://localhost:8080/Plone/dashboard results in

2008-05-01 04:26:21 ERROR Zope.SiteErrorLog http://localhost:8080/Plone/dashboard
Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Products.Five.browser.metaconfigure, line 417, in __call__
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.PageTemplates.PageTemplateFile, line 129, in _exec
  Module Products.PageTemplates.PageTemplate, line 89, in pt_render
  Module zope.pagetemplate.pagetemplate, line 117, in pt_render
   - Warning: Macro expansion failed
   - Warning: exceptions.KeyError: 'main_template'
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 870, in do_useMacro
  Module zope.tales.tales, line 696, in evaluate
   - URL: index
   - Line 1, Column 0
   - Expression: <PathExpr standard:'context/main_template/macros/master'>
   - Names:
      {'container': <PloneSite at /Plone>,
       'context': <PloneSite at /Plone>,
       'default': <object object at 0x1a2528>,
       'here': <PloneSite at /Plone>,
       'loop': {},
       'nothing': None,
       'options': {'args': (<Products.Five.metaclass.SimpleViewClass from /Users/gjp22/Plone-3.1/buildout-cache/eggs/plone.app.layout-1.1.0-py2.4.egg/plone/app/layout/dashboard/dashboard.pt object at 0x6491f30>,)},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x6a18f58>,
       'request': <HTTPRequest, URL=http://localhost:8080/Plone/dashboard>,
       'root': <Application at >,
       'template': <ImplicitAcquirerWrapper object at 0x6717110>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>,
       'view': <Products.Five.metaclass.SimpleViewClass from /Users/gjp22/Plone-3.1/buildout-cache/eggs/plone.app.layout-1.1.0-py2.4.egg/plone/app/layout/dashboard/dashboard.pt object at 0x6491f30>,
       'views': <zope.app.pagetemplate.viewpagetemplatefile.ViewMapper object at 0x6c34810>}
  Module zope.tales.expressions, line 217, in __call__
  Module Products.PageTemplates.Expressions, line 153, in _eval
  Module zope.tales.expressions, line 124, in _eval
  Module Products.PageTemplates.Expressions, line 100, in trustedBoboAwareZopeTraverse
  Module OFS.Traversable, line 284, in unrestrictedTraverse
   - __traceback_info__: ([], 'main_template')
KeyError: 'main_template'

Symptoms were:

  • first noted whilst using a third party add-on product theme
  • then reproduced in a clean site with NuPlone.

Change History

comment:1 in reply to: ↑ description Changed 4 years ago by grahamperrin

  • Keywords NuPlone added
  • Owner changed from limi to somebody
  • Component changed from NuPlone Theme to Unknown
  • Priority changed from minor to major

Replying to grahamperrin:

… after a short while, for various pages,

An error was encountered while publishing this resource.

Symptoms were:

  • first noted whilst using a third party add-on product theme.

Previously, I wasn't sure whether this is a manifestation of ticket:7357, in which

If a skin set as default is removed

Now: I see a difference, and I should treat this ticket:8094 as a major issue, because the errors occur even when

  • an installed theme is left in place (not un-installed).

Steps to reproduce

Beyond step (3) above:

  1. launch a different browser
  1. pay a second visit to  http://localhost:8080/Plone/portal_skins/manage_properties
  1. log in as admin

Error A

[ ] Allow arbitrary skins to be selected

  • note that the allowance has been lost.

Error B

From that point onwards:

  • most (all?) site objects are no longer published

Zope has encountered a problem publishing your object.

Cannot locate object at: …

  • for (at least) /dashboard the traceback occurs, ending with

KeyError: 'main_template'

Priority

For me, major:

  • I do prefer the Plone Default theme in lieu of the site default, and I can't re-gain Plone's.

comment:2 Changed 4 years ago by hannosch

  • Component changed from Unknown to Infrastructure
  • Description modified (diff)

comment:3 Changed 3 years ago by grahamperrin

Noting the message in r23493,

Removed NuPlone

Note: See TracTickets for help on using tickets.