Mantis 2.0 Attachments not Downloading
Moderators: Developer, Contributor
Mantis 2.0 Attachments not Downloading
I've upgraded from 1.3.0 to 2.0.0. Barring a few hiccups, it went smoothly (had some issues with g_crypto) and everything seems to work except for attachment download. When you view an issue with an attachment, the link is clearly visible in the "Activities" section, and when you click the link a download is initiated in the browser. After a few seconds it appears the download is complete, however the downloaded file is empty (0K size). I have read through the forums but have not been able to find a solution. A couple things I tried based on some similar issues reported:
1. I added the 'g_absolute_path_default_upload_folder' path in the 'config_defaults_inc.php' page. I did not think we were supposed to directly edit this page, but it is the only place I could find this reference. No change was seen.
2. I found a reference check to 'enable_project_documentation' in the file_download.php file where it was checking to see if it was OFF. Again, this was in the config_defaults_inc.php page so I enabled it (set to ON), but it made no difference.
I have also checked the permissions on both the uploads folder and the uploaded files themselves. All appear OK, meaning that the file permissions are the same as on the 1.3.0 version file permissions. Has anyone experienced this problem with Mantis 2.0? Any help is appreciated. We are testing it now hoping to go live next week and this is the only issue we've found so far. 2.0 looks amazing and everyone testing it is very excited to switch!
Thanks in advance.
1. I added the 'g_absolute_path_default_upload_folder' path in the 'config_defaults_inc.php' page. I did not think we were supposed to directly edit this page, but it is the only place I could find this reference. No change was seen.
2. I found a reference check to 'enable_project_documentation' in the file_download.php file where it was checking to see if it was OFF. Again, this was in the config_defaults_inc.php page so I enabled it (set to ON), but it made no difference.
I have also checked the permissions on both the uploads folder and the uploaded files themselves. All appear OK, meaning that the file permissions are the same as on the 1.3.0 version file permissions. Has anyone experienced this problem with Mantis 2.0? Any help is appreciated. We are testing it now hoping to go live next week and this is the only issue we've found so far. 2.0 looks amazing and everyone testing it is very excited to switch!
Thanks in advance.
Re: Mantis 2.0 Attachments not Downloading
Sorry to answer my own post, but maybe it will be of benefit to anyone upgrading that runs into this problem. When I upgraded I had to use the new config_defaults_inc.php file (the one from my 1.3.0 installation would not work) and I had missed changing the default setting of $g_file_upload_method from DATABASE to DISK. I store all uploads to a disk directory since some are quite large. I hope this helps someone else out!
Re: Mantis 2.0 Attachments not Downloading
Yeah that is what I was thinking, but I am apparently doing something wrong. When I modify the config_inc.php file in the /config folder, the changes do not have an effect. An example is the crypto key: it would not work until I added it to the config_defaults_inc.php file. Any direction that would help correct this is appreciated!
Re: Mantis 2.0 Attachments not Downloading
Add the following line to config_inc.php
After that, open any MantisBT page in your browser.
You should see nothing more than a page that displays "Hello from config".
You changed the wrong config_inc.php if you get the "normal" MantisBT page.
Double check, that you are in the right folder and there is no typo in the name of the file.
Code: Select all
die ("Hello from config");
You should see nothing more than a page that displays "Hello from config".
You changed the wrong config_inc.php if you get the "normal" MantisBT page.
Double check, that you are in the right folder and there is no typo in the name of the file.
Re: Mantis 2.0 Attachments not Downloading
No, I saw it. The page displayed "Hello from config".
Re: Mantis 2.0 Attachments not Downloading
I have no idea how it could be possible that you are able to fix an issue by changing a setting in config_defaults_inc.php, but changing the same setting in config_inc.php does not fix the issue.
Re: Mantis 2.0 Attachments not Downloading
Nor do I. I tried it again by removing the crypto from the config_defaults_inc.php file and leaving it in the config_inc.php file located in the /config directory, but it error's out.
Re: Mantis 2.0 Attachments not Downloading
Are you complete sure that there was no typo in the option name $g_crypto_master_salt?sirbanks wrote:I tried it again by removing the crypto from the config_defaults_inc.php file and leaving it in the config_inc.php file
Re: Mantis 2.0 Attachments not Downloading
Absolutely. Just checked it again, but it was a 'copy/paste' procedure between the two documents.
Re: Mantis 2.0 Attachments not Downloading
Very strange.
This is the code we are talking about
We read config_defaults_inc.php, after that custom_constants_inc.php if it exists (maybe true in your case, but doesn't matter) and after that config_inc.php if it exists (true in your case)
Could you please upload your config_inc.php? (don't forget to remove database password)
This is the code we are talking about
Code: Select all
# Include default configuration settings
require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'config_defaults_inc.php' );
# Load user-defined constants (if required)
if( file_exists( $g_config_path . 'custom_constants_inc.php' ) ) {
require_once( $g_config_path . 'custom_constants_inc.php' );
}
# config_inc may not be present if this is a new install
$t_config_inc_found = file_exists( $g_config_path . 'config_inc.php' );
if( $t_config_inc_found ) {
require_once( $g_config_path . 'config_inc.php' );
}
Could you please upload your config_inc.php? (don't forget to remove database password)