#18 — Broken field editor with multiple registered objects

by Lukas Zdych last modified Apr 15, 2010 09:24 AM
State Confirmed
Version: 0.5.0
Area Functionality
Issue type Bug
Severity Important
Submitted by Lukas Zdych
Submitted on Dec 22, 2008
Responsible Simon Pamies
Target release:
All it is because field editor is loosing "schema_id" parameter at the field changes submit process. Yes the parameter is in the schema editor template as hidden field but not used. Other interesting thing is that the form should be using POST method but in this case the GET method is used.

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 Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.CMFCore.FSPageTemplate, line 216, in _exec
  Module Products.CMFCore.FSPageTemplate, line 155, in pt_render
  Module Products.PageTemplates.PageTemplate, line 89, in pt_render
  Module zope.pagetemplate.pagetemplate, line 117, in pt_render
   - Warning: Macro expansion failed
   - Warning: exceptions.NameError: name 'field_info' is not defined
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 891, in do_useMacro
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 891, in do_useMacro
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 949, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 957, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 891, in do_useMacro
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 957, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 534, in do_optTag_tal
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 949, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 949, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 891, in do_useMacro
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 891, in do_useMacro
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 855, in do_condition
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 586, in do_setLocal_tal
  Module zope.tales.tales, line 696, in evaluate
   - URL: file:/Users/lzdych/Zope/inventory/parts/productdistros/ATSchemaEditorNG/skins/atse_templates/atse_macros.pt
   - Line 542, Column 8
   - Expression: <PythonExpr here.atse_getField(SCHEMA_ID, request['field'])>
   - Names:
      {'container': <PloneSite at /portal>,
       'context': <iFolder at /portal/my-documents>,
       'default': <object object at 0x1a1528>,
       'here': <iFolder at /portal/my-documents>,
       'loop': {},
       'nothing': None,
       'options': {'args': ()},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x6a9a1e8>,
       'request': <HTTPRequest, URL=http://localhost:8080/portal/my-documents/atse_editor>,
       'root': <Application at >,
       'template': <FSPageTemplate at /portal/atse_editor used for /portal/my-documents>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>}
  Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
   - __traceback_info__: here.atse_getField(SCHEMA_ID, request['field'])
  Module PythonExpr, line 1, in <expression>
  Module Products.ATSchemaEditorNG.SchemaEditor, line 1763, in atse_getField
  Module Products.Archetypes.Schema, line 233, in __getitem__
KeyError: 'my_field'

Steps to reproduce:
1. Register more then one custom ParentManagedBased content types with the SchemaEditor object.
2. Select other then the first object in the "Registered Objects" dropdown and click the "select" button
3. Add new field to the objects's schemata and try to change its properties (widget, visibility etc.)

Added by Simon Pamies on Mar 30, 2009 04:11 PM
Issue state: UnconfirmedConfirmed
Severity: MediumImportant
Responsible manager: (UNASSIGNED)spamsch
Added by Simon Pamies on Apr 15, 2010 09:24 AM
Should be fixed in 0.6 - please try

No responses can be added.