From: Sean K <se...@ho...> - 2008-12-02 19:41:09
|
I have a content type that uses PhotoField on Plone 2.5.x. I want to change the field type to ImageField to be able resize images and set the max_size with PIL (it does not seem to work with PhotoField) I tried a test simply swapping the PhotoField for ImageField in my custom content's .py file but I recieved an error when trying to view an existing content item. Is it possible to change? Is there something that needs to be done that I am missing? Traceback (innermost last): Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module Products.CMFFormController.FSControllerPageTemplate, line 90, in __call__ Module Products.CMFFormController.BaseControllerPageTemplate, line 31, in _call Module Shared.DC.Scripts.Bindings, line 311, in __call__ Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec Module Products.CMFCore.FSPageTemplate, line 195, in _exec Module Products.CacheSetup.patch_cmf, line 28, in FSPT_pt_render Module Products.CacheSetup.patch_utils, line 9, in call_pattern Module Products.CMFCore.FSPageTemplate, line 134, in pt_render Module Products.CacheSetup.patch_cmf, line 74, in PT_pt_render Module Products.CacheSetup.patch_utils, line 9, in call_pattern Module Products.PageTemplates.PageTemplate, line 104, in pt_render - <FSControllerPageTemplate at /myportal/atct_edit used for /myportal/Members/halfpass/a-stunning-imported-black-hannoverian> Module TAL.TALInterpreter, line 238, in __call__ Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 749, in do_useMacro Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 457, in do_optTag_tal Module TAL.TALInterpreter, line 442, in do_optTag Module TAL.TALInterpreter, line 437, in no_tag Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 749, in do_useMacro Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 457, in do_optTag_tal Module TAL.TALInterpreter, line 442, in do_optTag Module TAL.TALInterpreter, line 437, in no_tag Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 780, in do_defineSlot Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 457, in do_optTag_tal Module TAL.TALInterpreter, line 442, in do_optTag Module TAL.TALInterpreter, line 437, in no_tag Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 728, in do_defineMacro Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 772, in do_defineSlot Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 457, in do_optTag_tal Module TAL.TALInterpreter, line 442, in do_optTag Module TAL.TALInterpreter, line 437, in no_tag Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 728, in do_defineMacro Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 457, in do_optTag_tal Module TAL.TALInterpreter, line 442, in do_optTag Module TAL.TALInterpreter, line 437, in no_tag Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 749, in do_useMacro Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 780, in do_defineSlot Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 457, in do_optTag_tal Module TAL.TALInterpreter, line 442, in do_optTag Module TAL.TALInterpreter, line 437, in no_tag Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 691, in do_loop_tal Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 457, in do_optTag_tal Module TAL.TALInterpreter, line 442, in do_optTag Module TAL.TALInterpreter, line 437, in no_tag Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 749, in do_useMacro Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 457, in do_optTag_tal Module TAL.TALInterpreter, line 442, in do_optTag Module TAL.TALInterpreter, line 437, in no_tag Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 749, in do_useMacro Module TAL.TALInterpreter, line 281, in interpret Module TAL.TALInterpreter, line 507, in do_setLocal_tal Module Products.PageTemplates.TALES, line 221, in evaluate - URL: file:Archetypes/skins/archetypes/widgets/field.pt - Line 53, Column 6 - Expression: <PythonExpr getMethod and getMethod()> - Names: {'container': <PloneSite at /myportal>, 'context': <Premium_Photo_Ad at /myportal/Members/halfpass/a-stunning-imported-black-hannoverian>, 'default': <Products.PageTemplates.TALES.Default instance at 0x8f3702c>, 'here': <Premium_Photo_Ad at /myportal/Members/halfpass/a-stunning-imported-black-hannoverian>, 'loop': <Products.PageTemplates.TALES.SafeMapping object at 0xf37ed2c>, 'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0x8f7828c>, 'nothing': None, 'options': {'args': (), 'state': <Products.CMFFormController.ControllerState.ControllerState object at 0x1086e2ec>}, 'repeat': <Products.PageTemplates.TALES.SafeMapping object at 0xf37ed2c>, 'request': <HTTPRequest, URL=http://www.myportal.com/Members/halfpass/a-stunning-imported-black-hannoverian/atct_edit>, 'root': <Application at >, 'template': <FSControllerPageTemplate at /myportal/atct_edit used for /myportal/Members/halfpass/a-stunning-imported-black-hannoverian>, 'traverse_subpath': [], 'user': <PloneUser 'sean>} Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__ - __traceback_info__: getMethod and getMethod() Module Python expression "getMethod and getMethod()", line 1, in <expression> Module Products.Archetypes.ClassGen, line 68, in generatedEditAccessor Module Products.Archetypes.Field, line 693, in getRaw Module Products.Archetypes.utils, line 159, in mapply Module Products.Archetypes.ClassGen, line 58, in generatedAccessor Module Products.Archetypes.Field, line 961, in get Module Products.Archetypes.Field, line 1035, in _wrapValue Module Products.Archetypes.Field, line 955, in _make_file Module OFS.Image, line 125, in __init__ Module OFS.Image, line 504, in _read_data AttributeError: seek |