Page 1 of 1

old attachement not work after upgrade to 2.10

Posted: 08 Feb 2018, 10:37
by htaouaou
Hello,
I upgraded Mantis version 1.2.19 to 2.10 with the following:
mysql 5.7.20 /php version 7.0.27 installed ok , I can open matis application; upload files, view files uploded, but when i try to open attached files & after download them I recieve message error file corrupte,domaged...(see attached file).
I checked my mantis installation with /admin/check/index.php (see attached file), I've 2 environment prod & test, I installes new mantis version on test, I migrated data from old enviroment to the new one by using mysql import data.
the new attachement created with the new mantis 2.10 work, but the old one created with the old version not work after migration to the new mantis version,my impression is that the attachments work in general but only for the new tickets like, did anything go wrong with the migration of the attachments along with the tickets?

Re: old attachement not work after upgrade to 2.10

Posted: 08 Feb 2018, 15:08
by htaouaou
help please? :D

Re: old attachement not work after upgrade to 2.10

Posted: 08 Feb 2018, 15:36
by atrol
htaouaou wrote: 08 Feb 2018, 10:37 them I recieve message error file corrupte,domaged...(see attached file).
I don't see attached file with this message.

Re: old attachement not work after upgrade to 2.10

Posted: 19 Feb 2018, 18:39
by htaouaou
please find the screenshot

Re: old attachement not work after upgrade to 2.10

Posted: 19 Feb 2018, 18:44
by htaouaou
Hello,
the old ticket with attachment created with the old version not work after migration to the new mantis version,my impression is that the attachments work in general but only for the new tickets, did anything go wrong with the migration of the attachments along with the tickets?
can you help me please?

Re: old attachement not work after upgrade to 2.10

Posted: 19 Feb 2018, 18:48
by atrol
Are your attachments stored in database or on filesystem?

Re: old attachement not work after upgrade to 2.10

Posted: 20 Feb 2018, 16:55
by htaouaou
thank you for your feedback...the attachment stored in database

Re: old attachement not work after upgrade to 2.10

Posted: 20 Feb 2018, 18:15
by atrol
Have a look at database table mantis_bug_file_table and check if there is any obvious difference between old and new attachments.

Re: old attachement not work after upgrade to 2.10

Posted: 20 Feb 2018, 18:53
by htaouaou
They are stored in mantis_bug_file_table

Re: old attachement not work after upgrade to 2.10

Posted: 21 Feb 2018, 06:57
by atrol
The question was, if there is any difference between old and new ones.

You could also an attachment from your old installation, attach it on the new installation and check any columns of the table for differences.

Re: old attachement not work after upgrade to 2.10

Posted: 27 Apr 2018, 10:06
by Barnabe42
Were you able to find a solution, I have exactly the same problem I did a migration from Mantis 1.2.20 to Mantis 2.10.0.

My backup datatase have a different collation latin1_swedish_ci. I tried to update the database to UTF8 using the following query but it did not help
ALTER DATABASE bugtracker CHARACTER SET utf8 COLLATE utf8_unicode_ci;

I tried to compare the old and new attachement and the only difference if the file type "image/png;" for the old attachement and ""image/png; charset = binary".
The attachment mantis issue.png is no longer available
The page looks like this:
https://mantisbt.org/forums/download/fi ... ew&id=1345

/Eric

Re: old attachement not work after upgrade to 2.10

Posted: 17 May 2018, 10:21
by vinay
Hi Friends,

Am also facing same issue after upgrading to 2.14.
I have migrated all files from DB to DISK.
Old Excel, Word attachments are working. but image/png attachments are not displaying.
Newly uploaded images are working.
Please help

Re: old attachement not work after upgrade to 2.10

Posted: 17 May 2018, 11:35
by vinay
vinay wrote: 17 May 2018, 10:21 Hi Friends,

Am also facing same issue after upgrading to 2.14.
I have migrated all files from DB to DISK.
Old Excel, Word attachments are working. but image/png attachments are not displaying.
Newly uploaded images are working.
Please help
Hi Guys,

I solved this issue.
My issue was Images, PDF was not downloading (Old).
Problem was old files were transferred from my local to server using filezilla with transfer mode as "Auto".
After researching, I transferred again the attachment files only using transfer mode as "Binary".
Now images and Pdf's are downloading.

Thanks all.
Vinay

Re: old attachement not work after upgrade to 2.10

Posted: 02 May 2019, 09:37
by Tsjakka
I had this problem when upgrading from 2.8 to 2.21. For me the solution was to add the following line to php.ini under the section [ExtensionList]:

extension=php_fileinfo.dll

Some more info https://www.php.net/manual/en/fileinfo.installation.php.