View Issue Details

IDProjectCategoryView StatusLast Update
0023707mantisbtbugtrackerpublic2018-02-04 07:02
ReporterHaplo Assigned Toatrol  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version2.9.0 
Summary0023707: Version 2.9.0 broke the Image view/download of attachments
Description

I've tried to update from version 2.8.0 to 2.9.0 but found out that attachments (all kinds) can no longer be viewed or downloaded.
If I view the same issue with the old version (2.8.0) it works without problems --> See attached images

Additional Information

The system configuration I have here:
IIS + MS SQL Server

TagsNo tags attached.
Attached Files
MantisBT_Problem_290.png (2,474 bytes)   
MantisBT_Problem_290.png (2,474 bytes)   
MantisBT_Problem_280.png (38,013 bytes)   
MantisBT_Problem_280.png (38,013 bytes)   

Relationships

related to 0023639 closedatrol Unneeded code for non supported old PHP versions 
has duplicate 0023791 closedatrol Cannot download or view attachments (bis) 
related to 0023930 closedatrol Make Fileinfo a mandatory PHP extension 

Activities

Haplo

Haplo

2017-12-07 04:29

reporter   ~0058334

It is not only for images, but also for all kinds of other documents.
For example is also the download of attached Word files no longer possible in 2.9.0.

atrol

atrol

2017-12-07 04:47

developer   ~0058337

Which PHP version do you use?
Do you store attachments in database or on file system? (check setting $g_file_upload_method for it)
What's your setting of $g_db_type?
Do you get any errors or warnings when running <YourMantisUrl>/admin/check/index.php ?

Haplo

Haplo

2017-12-07 05:46

reporter   ~0058340

Here are your requested Infos:

MBT_admin_check.png (32,469 bytes)   
MBT_admin_check.png (32,469 bytes)   
MBT_config.png (13,570 bytes)   
MBT_config.png (13,570 bytes)   
MBT_SiteInfos.png (8,530 bytes)   
MBT_SiteInfos.png (8,530 bytes)   
Haplo

Haplo

2017-12-07 05:50

reporter   ~0058341

FYI: The problem is most likely not the upload but the download.
My reasoning for this is that I uploaded the attachment with the 290, viewed it with 290 and then viewed the SAME entry with the 280 (parallel installation with same db settings).
-> Viewing, downloading does not work in 290
-> Viewing, downloading does work in 280

atrol

atrol

2017-12-07 06:14

developer   ~0058343

admin/check/index.php stops after getting errors.
You have to fix the errors and after that run again the script to run some more checks.
I recommend to decrease upload_max_size for it.

Do sou see any errors or warnings in your browser console or web server / PHP logs when viewing the issues with attachments?

Haplo

Haplo

2017-12-07 06:51

reporter   ~0058345

So, I've modified the php for the two errors.. Now there are only warnings left.

For the Errors: I only got a warning in the console when I try to download the file: Invalid HTML5 DOCTYPE.
Viewing the entry only shows a warning about :visited and :link can only have different colors. (SEC7115)

atrol

atrol

2017-12-07 07:16

developer   ~0058346

Isn't the warning concerning attachments exactly what you are seeing?
Enabling the fileinfo extension might fix the issue.

atrol

atrol

2017-12-07 07:19

developer   ~0058347

Last edited: 2017-12-07 07:23

Some more information concerning the change in 2.9.0
https://github.com/mantisbt/mantisbt/commit/5f6292fbabea4de238cb10cb28e3449f71fa8679

Should help http://php.net/manual/en/fileinfo.installation.php

Haplo

Haplo

2017-12-08 02:12

reporter   ~0058355

Yes, you're right. The fileinfo extension wasn't active.
Now that I've activated it, the images are available again. :)

Thank you very much for your help :)

atrol

atrol

2017-12-08 02:20

developer   ~0058356

Thanks for confirming the solution.