Error in zmi when an object is named 'URL' or 'URL1'

Bug #142874 reported by Eric Brun
2
Affects Status Importance Assigned to Milestone
Zope 2
Fix Released
Low
Unassigned

Bug Description

When I create a object (like Folder or DTMLMethod or ...) with name 'URL' or 'URL1' .... , I can't access to the content of my parent folder which contain this new folder :

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

Error Type: AttributeError
Error Value: __getslice__

I think its a conflic namespace between REQUEST object and Folder Object in the manage_main methed (OFS/dtml/main.dtml).
Note I try it on Zope.org : no problem to create but then I can't copy/paste anything in my folder : the same error happened.
In the copy / paste the problem is the same because when REQUEST is not None in manage_copyObjects and manage_cutObjects
the returned method is self.manage_main(self, REQUEST).

Tags: bug zope
Revision history for this message
Maik Jablonski (mjablonski) wrote :

Status: Pending => Accepted

 Supporters added: mjablonski

Jamie Heilman wrote on zope-dev:

"Accept, they are completely fixable.  I've probably already fixed those bugs in my fork, I'll hunt around and see if I can find the relevant files and post followups to the bugs."

Please note: This one is related to

http://zope.org/Collectors/Zope/545

Revision history for this message
Jamie Heilman (jamie-audible) wrote :

I'll mail a patch to zope-dev because this collector continues to be unable to collect patches from authenticated users.

It by no means addresses the issue in its entirety, but it gives you the general idea of what needs to be done over the entire source tree. DTML is a painful tool to use correctly, and I won't be submitting a more complete patch as I don't have the time or desire to do so.

Yes the code could be made more susinct and easy to read with appropriate use of <dtml-with> and/or <dtml-let> statements.

Revision history for this message
Jamie Heilman (jamie-audible) wrote :
Revision history for this message
Tim Peters (tim-one) wrote :

Uploaded: dtmhell.diff

Just attaching the patch (dtmhell.diff) Jamie mailed to zope-dev.

Revision history for this message
Lennart Regebro (regebro-gmail) wrote :

Zope-Pre2.8 alsmot works. the treetag fails:

    * Module ZPublisher.Publish, line 112, in publish
    * Module ZPublisher.mapply, line 88, in mapply
    * Module ZPublisher.Publish, line 39, in call_object
    * Module Shared.DC.Scripts.Bindings, line 306, in __call__
    * Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
    * Module App.special_dtml, line 175, in _exec
    * Module TreeDisplay.TreeTag, line 88, in render
    * Module TreeDisplay.TreeTag, line 193, in tpRender

Otherwise it seems fine. The related 545 issue is closed.

Changed in zope2:
assignee: Maik Jablonski (mjablonski) → Jens Vagelpohl (jens-dataflake)
milestone: none → 2.12.7
importance: Medium → Low
Revision history for this message
Jens Vagelpohl (dataflake-deactivatedaccount-deactivatedaccount) wrote :

I have applied the patch:

Zope 2.12 branch: http://svn.zope.org/?rev=112683&view=rev

Zope trunk: http://svn.zope.org/?rev=112684&view=rev

As noted in the comments there may be other places where this failure still occurs, but those should be dealt with using separate Launchpad issues that describe exactly what's failing where.

Changed in zope2:
status: Confirmed → Fix Committed
Changed in zope2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.