Submitted by : TomPurl at: 2005-11-30T07:59:53+00:00 (12 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

I currently can't edit files using External Editor (EE) if the use_locks setting in my ZopeEdit?.ini file is set to true.

Here's the error that I'm getting when I click on the EE icon in a wiki page:

  Lock request failed:
  405 Method Not Allowed
  Method Not Allowed: See the server error log for details

I set my Zope server to use the following settings:

...and here's the error message that comes up in Z2.log:

  127.0.0.1 - Anonymous [30/Nov/2005:09:30:43 -0500] "GET /wiki/externalEdit_/ExternalEditorProblems?
  borrow_lock=1 HTTP/1.1" 200 864 "http://localhost:8080/wiki/ExternalEditorProblems" "Mozilla/5.0
  (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5"
  127.0.0.1 - Anonymous [30/Nov/2005:09:30:46 -0500] "LOCK /wiki/ExternalEditorProblems HTTP/1.1" 405
  1709 "" "Zope External Editor/0.9.1"

I'm getting this error in both IE6 and Firefox 1.5. I don't believe that it's a security issue, since I gave every access to External Editor in my wiki. I also gave everyone access to all WebDAV permissions in my wiki as per the external editor README. Finally, I also get the exact same error when I'm logged in as the admin user.

I don't get this error when I try and edit non-wiki Zope content using EE. I therefore believe that this is a ZWiki issue and not a Zope or EE issue.

The current workaround for this issue is to set the use_locks value to 0 in your ZopeEdit?.ini or .zopeedit configuration file.


comments:

... --Simon Michael, Wed, 30 Nov 2005 08:13:14 -0800 reply
Hi Tom.. since you have verbose security on, look in /error_log - that's where you'll get most information. I think you're missing use webdav locks permission, this should be noted on QuickReference. Cheers..

error_log Stack Trace --TomPurl, Wed, 30 Nov 2005 10:20:13 -0800 reply
Here it is:

  Time          2005/11/30 12:13:37.203 US/Central
  User Name (User Id)   admin (admin)
  Request URL   http://localhost:8080/wiki/FrontPage/LOCK
  Exception Type        Method Not Allowed
  Exception Value       None

  Traceback (innermost last):

    * Module ZPublisher.Publish, line 113, in publish
    * Module ZPublisher.mapply, line 88, in mapply
    * Module ZPublisher.Publish, line 40, in call_object
    * Module webdav.Resource, line 532, in LOCK
    * Module webdav.davcmds, line 393, in apply

  Method Not Allowed

The webdav locks permission is allowed for every role in my wiki folder. I think I might try updating Zope (I'm using 2.8.1) to see if that helps.

error_log Stack Trace --Simon Michael, Wed, 30 Nov 2005 15:00:15 -0800 reply
That doesn't show the extra Verbose Security information. If it's enabled, it should be appearing in the traceback in /error_log. Maybe you need to tell /error_log not to ignore Unauthorized, though.

... --TomPurl, Fri, 02 Dec 2005 08:45:20 -0800 reply
I told error_log not to ignore Unauthorized, but I still didn't see any more debugging information. Also, I upgraded to 2.8.4, and that didn't help. I'm changing the severity of this ticket to normal since I'm the only one who seems to be having this problem.

I'm seeing exactly same error with EE -- Mon, 19 Dec 2005 09:36:27 -0800 reply
I just started using External Editor with ZWiki, and I'm getting exactly the same error as described above when trying to use WebDAV locks (Zope 2.8.4, ZWiki 0.48, EE 0.9.1). If I don't use locks, everything works fine (as does editing through the ZMI with locks enabled). I've double-checked my security settings and, just like Tom, am not seeing any additional debugging information in the error log. Any suggestions for where to look next?

BTW, when using EE through the ZMI, a .zem extension is added to the local copy of the file which is useful for linking this to the ZopeEditManager? application (i.e., to permit double-clicking). Would this be difficult to add to ZWiki's EE support, and if not, where would I find the relevant code?

... --Phil Schumm, Mon, 19 Dec 2005 12:02:03 -0800 reply
This seems to be a problem involving ZWiki and Zope 2.8; that is, the problem also occurs for me when using Zope 2.8.4 but does not occur under Zope 2.7.4 (I just checked; ZWiki 0.48 in both cases).

... --Phil Schumm, Tue, 20 Dec 2005 07:54:47 -0800 reply
Observe that adding the following to ZWikiPage.py:

    from webdav.WriteLockInterface import WriteLockInterface

and changing line 133 from:

    __implements__ = CMFAwareness.__implements__

to:

    __implements__ = (CMFAwareness.__implements__, WriteLockInterface) 

appears to restore proper WebDAV locking behavior under Zope 2.8.4. A big caution however: I have not looked carefully enough to determine whether this is the only change needed and/or if this really is an appropriate way to fix the problem. Moreover, this change is (I'm guessing) not backwards compatible with Zope 2.7. I may well look at this in more detail, and will report back here if I do.

... --Simon Michael, Thu, 19 Jan 2006 17:41:21 -0800 reply
Phil Schumm wrote:

appears to restore proper WebDAV locking behavior under Zope 2.8.4. A big caution however: I have not looked carefully enough to determine whether this is the only change needed and/or if this is really an appropriate way to fix the problem. Moreover, this change is (I'm guessing) not backwards compatible with Zope 2.7. I may well look at this in more detail, and will report back here if I do.

Thanks Phil. Any news on this ?

update --simon, Sun, 26 Feb 2006 10:27:49 -0800 reply
I'm pretty sure that is the right fix, though I don't understand why I can't reproduce it here. I'll apply it for 0.51 with a try..except for older zopes just in case. Thanks!

update --simon, Sun, 26 Feb 2006 10:48:23 -0800 reply
Something to do with CMF not being installed. Still can't reproduce it, never mind. Should be fixed in darcs now.

(property change) fixed for 0.51 --simon, Sun, 26 Feb 2006 10:49:04 -0800 reply
Status: open => closed