[ZWeb] Help for getUserByID error
Paolo D'Aubert
pdaubert@enter.it
Fri, 20 Jul 2001 12:13:21 +0100
Messaggio in formato MIME composto da piy parti.
------=_NextPart_000_0083_01C11115.5E0AB530
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi All, I'm a newbie in Zope---
I'm using it with a SQL Database and I need to insert the input of a =
form in the db, and this works.
But, in the form I have two file input type with two images.
I have to save the image path in the Db, and the image in a Zope folder.
This seems works, but not for all the forms I have!
In fact, I use this method:
<dtml-with "lavoro.images"> // this is the directory where the images =
been saved
<dtml-if image_1> // if image 1 exists (this mean the ID =
image_1 exists but I dont know if is void)
<dtml-if "_.hasattr(lavoro.images,Imma_1_lavoro_id)"> // if =
Imma_1_lavoro_id is an image (I dont know exactly what this method do)
<dtml-call "manage_delObjects(REQUEST.form['Imma_1_lavoro_id'])"> =
//this is the method that make error
</dtml-if>
<dtml-call =
"manage_addImage(REQUEST.form['Imma_1_lavoro_id'],REQUEST.form['Imma_1_la=
voro'])"> //this method returns an error too
</dtml-if>
I mean, the manage_something methods returns an error, even if I log in =
as manager.
And the error isn't "You are not allowed to use this methods", but is =
"Attribute Error: GetUserByID Error"
What does this mean???
I use a GUF in the root folder (a subfolder of Zope) but I dont think =
this could be a problem.
Please help me!!
Thx!
----------------------------------------------------
Paolo D'Aubert
Web Application Developer
=20
Enter S.p.A.
The Net and Web Agency
http://www.enter.it - mailto:pdaubert@enter.it
=20
Via Libert=E0 56 - 90144 Palermo - Italy
Tel: ++39(091)730.30.09 - Fax: ++39(091)30.50.23
=20
Via Carducci 125/A - 20099 Sesto San Giovanni (MI) - Italy
Tel: ++39(02)24.79.101 - Fax: ++39(02)26.26.09.70
------=_NextPart_000_0083_01C11115.5E0AB530
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4616.200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi All, I'm a newbie in =
Zope---</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I'm using it with a SQL Database and I =
need to=20
insert the input of a form in the db, and this works.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>But, in the form I have two file input =
type with=20
two images.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I have to save the image path in the =
Db, and the=20
image in a Zope folder.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>This seems works, but not for all the =
forms I=20
have!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>In fact, I use this =
method:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><dtml-with "lavoro.images"> // =
this is the=20
directory where the images been saved<BR> <dtml-if=20
image_1> // if image 1 exists =
(this mean=20
the ID image_1 exists but I dont know if is =
void)<BR> <dtml-if=20
"_.hasattr(lavoro.images,Imma_1_lavoro_id)"> // if Imma_1_lavoro_id=20
is an image (I dont know exactly what this method=20
do)<BR> <dtml-call=20
"manage_delObjects(REQUEST.form['Imma_1_lavoro_id'])"> //this =
is the=20
method that make=20
error<BR> </dtml-if><BR> <dtml-call =
"manage_addImage(REQUEST.form['Imma_1_lavoro_id'],REQUEST.form['Imma_1_la=
voro'])">=20
//this method returns an error=20
too<BR> </dtml-if></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I mean, the manage_something methods =
returns an=20
error, even if I log in as manager.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>And the error isn't "You are not =
allowed to use=20
this methods", but is "Attribute Error: GetUserByID Error"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>What does this mean???</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I use a GUF in the root folder (a =
subfolder of=20
Zope) but I dont think this could be a problem.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Please help me!!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thx!</DIV>
<DIV><BR></DIV></FONT>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial=20
size=3D2><BR>----------------------------------------------------<BR>Paol=
o=20
D'Aubert<BR>Web Application Developer<BR> <BR>Enter S.p.A.<BR>The =
Net and=20
Web Agency<BR><A href=3D"http://www.enter.it">http://www.enter.it</A> - =
<A=20
href=3D"mailto:pdaubert@enter.it">mailto:pdaubert@enter.it</A><BR> <=
BR>Via=20
Libert=E0 56 - 90144 Palermo - Italy<BR>Tel: =
++39(091)730.30.09 - Fax:=20
++39(091)30.50.23<BR> <BR>Via Carducci 125/A - 20099 Sesto San =
Giovanni=20
(MI) - Italy<BR>Tel: ++39(02)24.79.101 - Fax:=20
++39(02)26.26.09.70<BR></FONT></DIV></BODY></HTML>
------=_NextPart_000_0083_01C11115.5E0AB530--