Description
If I may be presumptuous, it looks like a code error on line 808 of PageEditor.py... see error dump. Or was _ supposed to be used as a variable name (yikes!).
807 if not got_lock: 808 raise self.CouldNotLock, _("Page could not get locked. Missing 'current' file?")
The leading underscore generates a name error.
Describe the bug...
While trying to save page after resolving an edit conflict, get an error dump.
Steps to reproduce
I doubt this will reproduce it since I think there is something else going on, but basically:
- Generate an edit confict on a page.
- Try to save the page--get error dump.
Now, it says the page doesn't exist, but if you try to create the page, it throws the same error repeatedly when you try to save it.
Example
http://www.jython.org/cgi-bin/wiki/ClarkUpdike
Here's the full dump:
NameErrorglobal name '_' is not defined Please include this information in your bug reports!: Python Python 2.3.3: /usr/bin/python Linux sc8-pr-web7.sourceforge.net 2.6.10-1.8_FC2smp #1 SMP Mon Jan 10 15:22:16 EST 2005 i686 MoinMoin Release 1.3.3 [Revision 1.3.3 release] Sat Feb 26 10:20:40 2005 A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred. /home/groups/j/jy/jython/moinmoin/lib/python2.2/site-packages/MoinMoin/request.py in run(self=<MoinMoin.request.RequestCGI instance>) 882 else: 883 try: 884 cgitb.Hook(file=self).handle(saved_exc) 885 # was: cgitb.handler() 886 except: cgitb = <module 'MoinMoin.support.cgitb' from '../moinmo...thon2.2/site-packages/MoinMoin/support/cgitb.py'>, cgitb.Hook = <class MoinMoin.support.cgitb.Hook>, file undefined, self = <MoinMoin.request.RequestCGI instance>, ).handle undefined, saved_exc = (<class exceptions.NameError>, <exceptions.NameError instance>, <traceback object>) /home/groups/j/jy/jython/moinmoin/lib/python2.2/site-packages/MoinMoin/wikiaction.py in do_savepage(pagename=u'ClarkUpdike', request=<MoinMoin.request.RequestCGI instance>) 624 except pg.SaveError, msg: 625 # msg contain a unicode string 626 savemsg = unicode(msg) 627 628 # Send new page after save or after unsuccessful conflict merge. savemsg undefined, unicode undefined, msg undefined /home/groups/j/jy/jython/moinmoin/lib/python2.2/site-packages/MoinMoin/PageEditor.py in saveText(self=<MoinMoin.PageEditor.PageEditor instance>, newtext=u'Describe ClarkUpdike here.\n', rev=0, **kw={'comment': u'', 'trivial': 0}) 933 934 # write the page file 935 mtime_usecs, rev = self._write_file(newtext, action, comment, extra) 936 self.clean_acl_cache() 937 mtime_usecs undefined, rev = 0, self = <MoinMoin.PageEditor.PageEditor instance>, self._write_file = <bound method PageEditor._write_file of <MoinMoin.PageEditor.PageEditor instance>>, newtext = u'Describe ClarkUpdike here.\n', action = 'SAVENEW', comment = u'', extra = u'' /home/groups/j/jy/jython/moinmoin/lib/python2.2/site-packages/MoinMoin/PageEditor.py in _write_file(self=<MoinMoin.PageEditor.PageEditor instance>, text=u'Describe ClarkUpdike here.\n', action='SAVENEW', comment=u'', extra=u'') 806 807 if not got_lock: 808 raise self.CouldNotLock, _("Page could not get locked. Missing 'current' file?") 809 810 # increment rev number of current(-locked) page self = <MoinMoin.PageEditor.PageEditor instance>, self.CouldNotLock = <class MoinMoin.PageEditor.CouldNotLock>, _ undefined NameError: global name '_' is not defined __doc__ = 'Name not found globally.' __getitem__ = <bound method NameError.__getitem__ of <exceptions.NameError instance>> __init__ = <bound method NameError.__init__ of <exceptions.NameError instance>> __module__ = 'exceptions' __str__ = <bound method NameError.__str__ of <exceptions.NameError instance>> args = ("global name '_' is not defined",)
Details
It's hosted on sourceforge. See also the error dump above.
MoinMoin Version |
1.3.3 |
OS and Version |
Linux sc8-pr-web7.sourceforge.net |
Python Version |
Python Python 2.3.3: /usr/bin/python |
Server Setup |
don't know |
Server Details |
don't know |
Workaround
Don't have one. May have the adminstrator delete the page from disk (if it exists there).
- Yeah, the administrator has to rename the lock file or remove the page directory.
Discussion
The NameError is known and fixed. But the bug in the locking code is not.
Interestingly, I just have seen this bug for homepages or subpages thereof.
Plan
- Priority:
- Assigned to:
- Status: was fixed some time before moin--main--1.3--patch-800, don't know when exactly