[Zope] A man with a sore head (seriously)

John E. Vincent john@lusis.org
Wed, 2 Feb 2000 01:29:27 -0500 (EST)


Hello all,

First off my head cannot take anymore punishment from being beaten against
a wall.

I found a similar answer to this issue in an email from last year sometime
but since it still doesn't seem to work, I thought I would subscribe to
the list and see if I could get help and maybe help others as I learn.
From what I've seen in the month that i've been using Zope, the current
documentation and level of support is wonderful.

I have a product I've created that I will be using to allow site managers
to easily create templates for a web site by simply giving the name of the
template and uploading the 4 images that build the templates. I followed
the walkthrough of creating a product in the from the Content Guide
online. It was what actually prompted me to move from several scripts to
creating products and making things a ton easier to manage.

Here is my method for the form:

<form method=post action=templateCreate name=templateAdd
Enctype="multipart/form-data">
Template Name: <input type=text name=new_templateName length=25
maxlength=25><br>
Background: <input type=file name=background length=25><br>
Top Left: <input type=file name=topleft length=25><br>
Top Right: <input type=file name=topright length=25><br>
Navigation Bar: <input type=file name=navbar length=25><br>
<input type=submit value="Add Template">
</form>

Here is a copy of the method to do the clone of the Sample folder:

dtml-with "manage_clone(Sample,REQUEST['new_templateName'],REQUEST)">

<dtml-call "manage_changeProperties(

title=REQUEST['new_templateName'],

)">

<dtml-call "background.manage_upload(REQUEST['background'])">
<dtml-call "topleft.manage_upload(REQUEST['topleft'])">
<dtml-call "topright.manage_upload(REQUEST['topright'])">
<dtml-call "navbar.manage_upload(REQUEST['navbar'])">

</dtml-with>

<dtml-call "RESPONSE.redirect('manage_main?update_menu=1')">

Congratulations!


/end samples

Now both of these of course are wrapped with standard headers and
footers. Here is the lovely traceback I get:

Traceback (innermost last):
  File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 214,
in publish_module
  File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 179,
in publish
  File /usr/share/zope/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
    (Object: RoleManager)
  File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 165,
in publish
  File /usr/lib/python1.5/site-packages/ZPublisher/mapply.py, line 160, in
mapply
    (Object: templateCreate)
  File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 102,
in call_object
    (Object: templateCreate)
  File /usr/share/zope/lib/python/OFS/DTMLMethod.py, line 145, in __call__
    (Object: templateCreate)
  File /usr/lib/python1.5/site-packages/DocumentTemplate/DT_String.py,
line 502, in __call__
    (Object: templateCreate)
  File /usr/lib/python1.5/site-packages/DocumentTemplate/DT_With.py, line
148, in render
    (Object: manage_clone(Sample,REQUEST['new_templateName'],REQUEST))
  File /usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py, line
335, in eval
    (Object: background.manage_upload(REQUEST['background']))
    (Info: REQUEST)
  File <string>, line 0, in ?
  File /usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py, line
127, in careful_getattr
AttributeError: (see above)

/end traceback

I've seen the "File <string>, line 0, in ?" error in several emails from
the archive but none have been able to help with this situation. If I
haven't provided enough information or have provided too much, please let
me know. Thanks for any help you may be able to provide for this great
product.


 -- 
John E. Vincent
http://www.lusis.org - opensource(libre) webhosting
http://www.jyradelix.com - Jyradelix Designs
http://www.lusis-integrations.com - Lusis Network Integration Consultants
---------------
"Some people call me crazy but I prefer to think of myself as a freelance
lunatic" - me