View Issue Details

IDProjectCategoryView StatusLast Update
0013848mantisbtattachmentspublic2023-06-16 11:55
Reporterbrahms Assigned Todregad  
Status closedResolutionno change required 
Product Version1.2.8 
Summary0013848: when I changed project path, all attachments before change was missing

v1.1.18, in mantis_bug_table the field 'diskfile' includes the path, but in v2.1.8, in mantis_bug_table the field 'diskfile' does not includes the path.

thus, in 2.1.8, when I changed project path, all attachments before change was missing, wow, see attachment.

Steps To Reproduce
  1. you set your project path = upload/a/
  2. upload an image mypic.jpg, it's ok.
  3. then you set your project path = upload/b/
  4. in view.php, you will find 'attachment missing'

in 1.1.8, Changed project path, you can still see the attachments before change.

TagsNo tags attached.
Attached Files
attachment missing.JPG (7,637 bytes)   
attachment missing.JPG (7,637 bytes)   




2012-02-06 03:46

reporter   ~0031167

I debuged the problem, in core/file_api.php, line 750, I added a line, and changed $query, used $c_disk_file_name instead of $c_unique_name.

$c_disk_file_name = db_prepare_string($t_disk_file_name);
$query = "INSERT INTO $t_file_table
                    (" . $p_table . "_id, title, description, diskfile, filename, folder, filesize, file_type, date_added, content, user_id)
                    ($c_id, '$c_title', '$c_desc', '$c_disk_file_name', '$c_new_file_name', '$c_file_path', $c_file_size, '$c_file_type', '" . db_now() . "', $c_content, $c_user_id)";


2023-06-06 11:52

developer   ~0067831

We are resolving this issue as "no change required", because it was reported against an old version of MantisBT which is no longer supported.

We recommend that you upgrade to the latest stable version [1]; if after doing so the problem still exists, do not hesitate to reopen the issue.