[z3-five] Strange problems with Five 1.2.5 and Zope 2.8.6, addform issue?
Philipp von Weitershausen
philipp at weitershausen.de
Thu Jul 13 23:06:22 CEST 2006
Maciej Wiśniowski wrote:
> Hi
>
> I have clean instance of Zope 2.8.6 and with just one
> product in Products - Five (1.2.5). I've written simple
> product with use of five directives but this product causes
> zope to report strange errors... why? Here is the description:
>
> Using ZMI I've created folder structure:
>
> mytest/ # Folder with one additional
> property: myattr:string = myvalue
> index_html # Python Script with one line: return
> context.body()
> /subfolder # Folder
> body # Page template with line: <h2
> tal:content="context/myattr"></h2>
>
> When I'm visiting http://localhost:8080/mytest/subfolder I see:
>
> myvalue
>
> at output page and I think it is correct.
> Strange things happen when I add one more product.
> It's definition is below. After putting it to Products/
> folder and restarting zope visiting
>
> http://localhost:8080/mytest/subfolder
>
> causes:
>
> Error Type: Unauthorized
> Error Value: You are not allowed to access 'myattr' in this context
>
> Maybe something is wrong in my product, or it's a bug in Five?
Perhaps. It's hard to judge from your code. If you can produce a failing
unit test for Five, demonstrating a particular bug in Five, then we can
start debugging. At this point it's hard to see what you're doing where
etc. Of course, this mandates that you can find a very small set of
circumstances where this occurs -- simply turning your product into a
test will hardly make it more understandable ;).
> Another thing - it is not possible to access:
>
> http://localhost:8080/++resource++tm_icon.gif
>
> but
>
> http://localhost:8080/mytest/++resource++tm_icon.gif
>
> works correctly.
The root folder (OFS.Application.Application) is not traversable by
default. Hence you won't be able to look up Zope3y things there.
> Is browser:addform supported correctly in this version of Five?
No idea what "correctly" means. It's supported, albeit in an awkward way
regarding the content_factory. The tests demonstrate its behaviour well,
though.
Philipp
More information about the z3-five
mailing list