Description
There is a problem about attachment action. When I want to upload the attach file, its page will jump to the original page and the file dosen't upload. Its problem dosen't show error message.
Steps to reproduce
- I create a page name CCC
Perform the AttachFile action. So, the page is ccc?action=AttachFile
- Upload the 測試test.txt file. File size of 測試test.txt is 337KB.
This AttachFile page will jump to CCC page, and no file can upload.
Details
MoinMoin Version |
1.5.0rc |
OS and Version |
Windows2000 |
Python Version |
2.4 |
Server Setup |
apache |
Server Details |
|
Workaround
I maybe have found the problem. Please try this: win32binary.patch and report back if it solved the problem.
Discussion
Obviously this bug report intermixes multiple problems:
- a broken installation (converter for gui editor failing to import), see traceback
- a problem with uploading binary file attachments - we need more info about that from a non-broken installation, if there is a traceback, too, please give it to us.
- and probably show us the log entries of the webserver log I suppose there is a lot of wanted information
Please provide more details, e.g. about browser and version you use.
Please try with same browser in this wiki.
- Used both Firefox 1.5 and IE 6.0 and they work on this site.
Please try with a file with ASCII-only filename.
- Works with uploading text file, not with png file.
- Uploading files worked in version 1.3.4, not within upgrade.
- I'm having this problem also. The difference with me is that I'm using Windows XP/Apache 2, and CGI.
I think this is related to DownloadingAttachmentsFromStandaloneServerWithFirefox, something with the CGI HEADER handling.
Rene Aguirre, Jan-13-05
The traceback reveals that your installation is broken, please rerun setup.py install.
- Can we assume that you were using the GUI editor when it failed? What if you try text editor instead?
The line that is failing in wikiaction.py is:
from MoinMoin.converter.text_html_text_x_moin import convert
This would seem to indicate that the install is broken. You could try running Python interactively, and then type just that same line in and see if it works. Also I've noticed that none of the moin __init__.py files define an __all__ variable. This could cause import problems in some python setups, especially since in this case MoinMoin.converter has not been previously imported first. -- DeronMeranda 2006-01-13 18:08:28
I had the same problem on a machine running the wiki (1.5.0) with windows 2000 and could'nt find the problem. Finally, I decided to reinstall the wiki on a linux system (Suse 10) and the problem was gone. I think it has something to do with the python interpreter for the windows system. I've installed version 2.4.2 from http://www.python.org/download/ I will try another python interpreter the next few days an post the result here. This is very unlikely. I have/had no problems on Windows XP Pro, Windows Server 2003, Win XP Home with cgi/Apache 2.0.55 or modpy/Apache setups with Python 2.3.5, 2.4.1 and 2.4.2 for moin 1.3.4, 1.3.5, 1.5.0, 1.5.1. Web-Clients: Firefox 1.5, Mozilla 1.7.x, IE 6.0 and Opera. May it be a permission problem? Where do you install the wiki-instance? May the problem be caused by anti-virus software?
- Hi, I can report similar problems. Server-Environment: Apache 2.0.54, Moin 1.5.1 as CGI with Python 2.4.2 on Windows2003-Server. As Web-Client I use Firefox 1.5, or IE 6.0. I can upload everything that looks like a text-file. Uploading of binary-files like zip or pdf fails as reported above.
I just tried Python 2.3.5 and still have the same problems. --- Jonatan Antoni 2006-01-25 10:13:28
Now I tried moin-1.3.5, there are the problems as well! --- Jonatan Antoni 2006-01-25 10:32:28
Please show the log file entries of the web server log -- ReimarBauer 2006-01-25 09:50:10
The patch for request.py works fine, thx --- Jonatan Antoni 2006-01-30 10:30:28
I also had the same problem...this is my system spec : python 2.4, moin 1.5 XP pro SP 1, and both apache 2.053 & 2.055....
note : i am using ApacheOnWin32 installation Guide..no other guide... 2006-01-25 09:50:10
After a bit of experimenting (with 1.5.0/1.5.1, Apache 2.0.55, XP Prof.) I found that the bug is specific for Apache/cgi setups. There is no such problem with Apache/modpython. The Python version (2.3.5/2.4.2) or the browser (IE/Mozilla) do not matter. There are no errors logged to Apache-log or moin's log. The upload just does not happen. -- DavidLinke
The patch above solved the problem for my test installation too. -- DavidLinke 2006-01-30 09:09:35
I have been having this same issue where uploading binary files would silently fail. I am using Apache/2.0.54 (Win32) on Windows 2000 using CGI with Python 2.3.5. This has been happening since 1.5rc1 or so. The above patch fixed the problem for me. -- DavidHogue
Use the Win32Binary.patch to solve the patch, 100% successful. that help me easily...thank you...
This is really an old bug, but i still found it in MoinMoin v1.9.1, under Windows/Python v2.5/Apache v2.2.14! As far as i know, in MoinMoin v1.9.1, the request.py has been moved to MoinMoin/web/request.py, and the statements to call msvcrt.setmode cannot be found. Now i have to add msvcrt.setmode by myself. But what i wondering is that why don't you apply the Win32Binary.patch into very new version? Each time if I install or upgrade to a newer version, i have to apply this patch (and also some other patches) manually. What a terrible thing -- -- JiZhou 2010-02-19 17:40:46
MoinMoin has no code dealing on that low level any more, it is just a wsgi application. BTW, status below says this was fixed in 1.5, so maybe you should file a new bug for what you see. We can forward it to the werkzeug / mod_wsgi / whatever developers, if necessary. Please give lots of details about how to reproduce and what the problem exactly is. -- ThomasWaldmann
I'm experiencing the same issue with moin 1.9.3, Apache 2.2 w/ OpenSSL 0.9.8 and a Windows 7 32Bit box. -- AlejandroSaenz
The patch also works on 1.9.3, here are the details:
- Edit the MoinMoin/web/request.py file and add the following imports:
- import sys
- import os
In the MoinMoin/web/request.py file edit the init method of the Request class as follows:
1 def __init__(self, environ, populate_request=True, shallow=False):
2 try:
3
4 if sys.platform == "win32":
5 import msvcrt
6 msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
7 msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
8
9 ResponseBase.__init__(self)
10 RequestBase.__init__(self, environ, populate_request, shallow)
11 self.href = Href(self.script_root or '/', self.charset)
12 self.abs_href = Href(self.url_root, self.charset)
13 self.headers = Headers([('Content-Type', 'text/html')])
14 self.response = []
15 self.status_code = 200
16
17 except Exception, err:
18 self.fail(err)
With this modifications I can now upload and embed attachments. -- AlejandroSaenz
Plan
- Priority:
Assigned to: ThomasWaldmann
- Status: fixed in 1.5 branch at about patch-402 +/-5