[Zope] Size limit on Zclass text property???

Chris McDonough chrism@digicool.com
Wed, 25 Jul 2001 14:21:55 -0400


The problem seems to be in metAddIdxTurRJ.  There is no conteudo variable
set.  Additionally, setting the 'conteudo' variable in the request is sort
of pointless if it already existed in the namespace.

- C

----- Original Message -----
From: "Rogerio Atem de Carvalho" <ratem@censa.com.br>
To: "Chris McDonough" <chrism@digicool.com>
Cc: <zope@zope.org>
Sent: Wednesday, July 25, 2001 1:45 PM
Subject: Re: [Zope] Size limit on Zclass text property???


> OK, a traceback has line numbers and method names in them.  You got
> the
> error header part right, but not the traceback part.  ;-)  If
> possible,
> please view the source of an error page and send the traceback.
>
Sorry...

below the traceback are the form and method codes I used. Some coments and
variable names are in portuguese...

Here it goes:

Zope Error
Zope has encountered an error while publishing this resource.

Error Type: NameError
Error Value: conteudo

----------------------------------------------------------------------------
----

Troubleshooting Suggestions

This resource may be trying to reference a nonexistent object or variable
conteudo.
The URL may be incorrect.
The parameters passed to this resource may be incorrect.
A resource that this resource relies on may be encountering an error.
For more detailed information about the error, please refer to the HTML
source
for this page.

If the error persists please contact the site maintainer. Thank you for your
patience.

Traceback (innermost last):
  File C:\WebSite\lib\python\ZPublisher\Publish.py, line 223, in
publish_module
  File C:\WebSite\lib\python\ZPublisher\Publish.py, line 187, in publish
  File C:\WebSite\lib\python\Zope\__init__.py, line 221, in
zpublisher_exception_hook
    (Object: Traversable)
  File C:\WebSite\lib\python\ZPublisher\Publish.py, line 171, in publish
  File C:\WebSite\lib\python\ZPublisher\mapply.py, line 160, in mapply
    (Object: metAddIdxTurRJ)
  File C:\WebSite\lib\python\ZPublisher\Publish.py, line 112, in call_object
    (Object: metAddIdxTurRJ)
  File C:\WebSite\lib\python\OFS\DTMLMethod.py, line 189, in __call__
    (Object: metAddIdxTurRJ)
  File C:\WebSite\lib\python\DocumentTemplate\DT_String.py, line 538, in
__call__
    (Object: metAddIdxTurRJ)
  File C:\WebSite\lib\python\DocumentTemplate\DT_Util.py, line 334, in eval
    (Object: REQUEST.set('conteudo', conteudo))
    (Info: REQUEST)
  File <string>, line 0, in ?
NameError: (see above)

_____________________________________

<dtml-var standard_html_header>
<H2>Adicionar Índice Turismo-RJ</H2>
<FORM action="metAddIdxTurRJ">
<TABLE border="0">
<TR><TH>Endereço</TH>
    <TD><input type=text name=endereco size="35" value="http://www.turismo-
rj.com.br/"></TD>
</TR>
<TR><TH>Sumário</TH>
    <TD><textarea name="sumario:text" rows="8" cols="35"></textarea></TD>
</TR>
<TR><TH>Conteúdo</TH>
    <td><textarea name="conteudo:text" rows="8" cols="35"></textarea></TD>
</TR>

<TR><TH>Município</TH>
    <TD><input type=text name=municipio size="35" value="<dtml-var
municipio>"></TD>
</TR>

<TR><TH>Categoria</TH>
    <TD><input type=text name=categoria size="35" value="<dtml-var
categoria>"></TD>
</TR>

<TR><TH>Responsável</TH>
    <TD><input type=text name=responsavel size="35"></TD>
<TR>
<TD></TD>
<TD><input type=submit value=" Adicionar "><input type=reset value=" Limpar
Campos "></TD>
</TR>
</TABLE>
</FORM>

<dtml-var standard_html_footer>


-------------------------------------------------------------
this is the metAddIdxTurRJ:


<dtml-var standard_html_header>
<dtml-comment>
 Associa os campos do formulário chamador aos atributos da classe.
</dtml-comment>
<dtml-call "REQUEST.set('endereco', endereco)">
<dtml-call "REQUEST.set('sumario', sumario)">
<dtml-call "REQUEST.set('conteudo', conteudo)">
<dtml-call "REQUEST.set('municipio', municipio)">
<dtml-call "REQUEST.set('categoria', categoria)">
<dtml-call "REQUEST.set('responsavel', responsavel)">

<dtml-comment>
 Gera título automaticamente.
</dtml-comment>
<dtml-call "REQUEST.set('title',
_.string.replace(endereco,'http://www.turismo-
rj.com.br',''))">

<dtml-comment>
 Armazena o folder de destino (categoria) em variável auxiliar, c.c.,
utiliza
categoria "Geral" do Município
 devido ao namespace do primeiro dtml-with.
</dtml-comment>
<dtml-call "REQUEST.set('fdrDestino', categoria)">
<dtml-with "_.getitem(municipio)">
 <dtml-with "_.getitem(fdrDestino).manage_addProduct['ZIdxTurRJ']">
  <dtml-call "IdxTurRJ_add(_.None, _, NoRedir=1)">
 </dtml-with>
</dtml-with>

<CENTER>
<H2>Obrigado!</H2>
O índice para o endereço <dtml-var endereco> foi criado corretamente!<br>
<a href="index_html">Voltar ao Diretório de Índices</a><br>
<a href="schBuscaGeral">Ir à página de buscas</a>
</CENTER>
<dtml-var standard_html_footer>

<dtml-comment>
<dtml-call "REQUEST.set('mun_espaco',_.string.replace(municipio,' ',''))">
</dtml-comment>