Edgewall Software
Modify

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#7205 closed defect (fixed)

Error Opening Microsoft Word Attachment

Reported by: khinners Owned by: Christian Boos
Priority: normal Milestone: 0.11.2
Component: attachment Version: 0.11rc1
Severity: normal Keywords: documentation
Cc: justin.judd@…, jhn@…, kevin.hinners@… Branch:
Release Notes:
API Changes:

Description

I have Trac 0.11b2 setup on Windows running Python 2.5.2. When I attach a Microsoft Word document, it uploads fine. I can open the attachment on the Trac server fine and the file size is identical. I can also open the file over a network connection without problems. However, when I try to open the attachment or download to my local computer to open the file, I get a "Word experienced an error trying to open the file" message in Microsoft Word.

Attachments (1)

New Microsoft Office Word Document.docx (9.7 KB ) - added by anonymous 11 years ago.

Download all attachments as: .zip

Change History (23)

comment:1 by Christian Boos, 11 years ago

Upgrade to rc1, this has probably been fixed by r6935.

comment:2 by khinner, 11 years ago

I am attempting the upgrade to 0.11rc1. However, when I run the easy_install script I get the following error:

C:\>easy_install Trac==0.11rc1 Searching for Trac==0.11rc1 Reading http://pypi.python.org/simple/Trac/ Reading http://trac.edgewall.com/ Reading http://projects.edgewall.com/trac Reading http://projects.edgewall.com/trac/wiki/TracDownload Best match: Trac 0.11rc1 Downloading ftp://ftp.edgewall.com/pub/trac/Trac-0.11rc1.win32.exe error: Download error for ftp://ftp.edgewall.com/pub/trac/Trac-0.11rc1.win32.exe: (11001, 'getaddrinfo failed')

Please assist.

comment:3 by Christian Boos, 11 years ago

Keywords: needinfo added
Version: 0.11b2

Download that file directly then execute it?

comment:4 by khinner, 11 years ago

I manually downloaded the executable identified above and ran it without errors. I then restarted my web server. Then I performed the steps listed at TracUpgrade, which ran fine.

However, when I run my upgraded project site, I still see Trac 0.11b2 listed in both the footer of my Wiki pages and in the Trac about page.

What am I missing?

comment:5 by Christian Boos, 11 years ago

You need to stop your webserver before running the installer, otherwise the Trac…/EGG-INFO folder won't be updated by the installer.

It's easy to fix. Uninstall the package, stop the webserver, re-install, restart the webserver. I'll update the TracOnWindows doc later on.

comment:6 by anonymous, 11 years ago

I was able to upgrade my Trac installation using the following command:

easy_install -f http://ftp.edgewall.com/pub/trac Trac==0.11rc1

Apparently the default easy_install selection of FTP doesn't work behind a firewall even though I have a proxy defined.

Anyway, I have now successfully upgraded my site to use 0.11rc1. I will now attempt to recreate the original reported problem.

comment:7 by khinner, 11 years ago

Version: 0.11b20.11rc1

Unfortunately, I am still experiencing the same problem. Now that I am on 0.11rc1, I went to the Sandbox page and successfully uploaded a new Microsoft Word attachment. However, when I try to open the attachment or download to my local computer to open the file, I get a "Word experienced an error trying to open the file" message in Microsoft Word.

comment:8 by anonymous, 11 years ago

i've experienced this problem. it seems that trac wiki features truncates some file which corupts them

i get this with xls, doc, ppt files that I want to attach to wiki pages. I've got the same version of each components as the bug reporter

for instance, when perform and upload-download roundtrip with a 372 Ko (380 928 octets)i get my file scaled down to 232 Ko (237 568 bytes)

i checked that my file is fine : correctly sized ans openable on the server filesystem

comment:9 by khinner, 11 years ago

Keywords: needinfo removed
Priority: normalhigh
Severity: normalmajor

Bumping up severity due to impact on my implementation.

comment:10 by anonymous, 11 years ago

Keywords: needinfo added
Priority: highnormal
Severity: majornormal

I can understand if you're frustrated, but please be fair with priorities, etc. And more info is needed here. I can't reproduce this at all on 0.11b2 or 0.11rc1. Do other binary files have this problem? It would be odd if there was a bug that just affected MS Office files, as Trac shouldn't treat them any differently. Do you have any plugins installed?

comment:11 by khinner, 11 years ago

I tried some additional binary files. Some files work and some don't. I believe this may have to do with the size of the file. For example, an 8 kb zip file works, but a 42 kb zip file comes down corrupted. Does this help?

comment:12 by justin.judd@…, 11 years ago

Cc: justin.judd@… added

We are also experiencing the same issue with binary attachments only (simple text files are fine). Size doesn't seem to make a difference in our case. I have verified that the attachment files are fine (by browsing the server filesystem), but downloading via Trac corrupts the file.

comment:13 by jhn@…, 11 years ago

Cc: jhn@… added

we are on 0.11b1 on windows/apache/mod_wsgi, and recently started having this problem. it seemed that it started when we upgraded mod_wsgi from 1.3 to 2.0 using the windows binaries from http://adal.chiriliuc.com/mod_wsgi/. downgrading mod_wsgi back to 1.3 resolved the issue. i would like to upgrade to the latest mod_wsgi at some point though.

comment:14 by kevin.hinners@…, 11 years ago

Cc: kevin.hinners@… added

comment:15 by khinner, 11 years ago

I followed the advice of jhn@… and downgraded mod_wsgi to version 1.3. This did resolve the problem with attachments for me. Since my install of Trac was a new install, I had just used the latest versions of the dependencies.

comment:16 by anonymous, 11 years ago

I had a problem similar to this some time ago that was caused by a bug in mod_python. It's possible mod_wsgi could have a similar bug.

comment:17 by anonymous, 11 years ago

This was an issue in mod_wsgi introduced in version 2.0 whereby null character at next character after send block size would cause response to be truncated. Upgrade to mod_wsgi version 2.3. See:

http://code.google.com/p/modwsgi/issues/detail?id=100 http://code.google.com/p/modwsgi/wiki/ChangesInVersion0203 http://code.google.com/p/modwsgi/wiki/ChangesInVersion0202

This issue should likely be closed.

comment:18 by jhn@…, 11 years ago

Keywords: needinfo removed
Resolution: fixed
Status: newclosed

tested mod_wsgi 2.3 and it fixed the problem which i had while using mod_wsgi 1.3.

comment:19 by Christian Boos, 11 years ago

Keywords: documentation added
Milestone: 0.11.2
Resolution: fixed
Status: closedreopened

We need to fix the documentation (TracModWSGI), to mention that either 1.3 or 2.3 works, but not 2.0.

in reply to:  18 comment:20 by jhn@…, 11 years ago

Replying to jhn@…:

tested mod_wsgi 2.3 and it fixed the problem which i had while using mod_wsgi 1.3.

excuse me, 1.3 was fine, the problem was with mod_wsgi 2.0, don't want to confuse anyone

in reply to:  19 comment:21 by Remy Blank, 11 years ago

Resolution: fixed
Status: reopenedclosed

Replying to cboos:

We need to fix the documentation (TracModWSGI), to mention that either 1.3 or 2.3 works, but not 2.0.

Done.

comment:22 by fermulator, 11 years ago

confirmed.

Just upgraded my version of mod_wsgi.so to the latest and it fixed the issue. The attachments themselves, even those that might have been uploaded using the older version of mod_wsgi, are not corrupt, they just couldn't be downloaded via trac.

Simply stopping the web server, upgrading mod_wsgi, and restarting teh webserver, allowed all attachments to be downloaded without a hitch!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.