The same attachments are not visible in some issues in the same project (resolved)

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Michal67
Posts: 5
Joined: 30 Apr 2026, 08:37

The same attachments are not visible in some issues in the same project (resolved)

Post by Michal67 »

Issues in the same project. When I attach file to issue X, the attachment is visible. When I attach file to issue Y, the attachment is not visible. No error, attaching is correcttly logged in issue history, the file is stored in DB, the blob has correct size, bug_id and bugnote_id are correct, but it is not visible in the issue. It is unvisible for all users, including administrators of the project. I do not see any difference between the issues.

Any ideas?

Thanks, Michal
Last edited by Michal67 on 14 May 2026, 08:37, edited 1 time in total.
--
MantisBT Version 2.28.1
Database Schema Version 213
PHP Version 8.2.30
Database Driver mysqli
Database Version, Description 10.3.39, 10.3.39-MariaDB
atrol
Site Admin
Posts: 8573
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: The same attachments are not visible in some issues in the same project

Post by atrol »

MantisBT Version 2.26.1
PHP Version 8.2.30
The first MantisBT version where all known PHP 8.2 related issues are fixed is version 2.27.2.
I recommend to upgrade to latest stable version (2.28.1 as of this writing), also because of major security issues in older versions, see viewtopic.php?t=40432
In best case, your issues is fixed after that.
Investing time in investigating outdated versions makes not that much sense.
Please use Search before posting and read the Manual
Michal67
Posts: 5
Joined: 30 Apr 2026, 08:37

Re: The same attachments are not visible in some issues in the same project

Post by Michal67 »

Ok, we upgraded to 2.28.1.
The problem remains :-(
--
MantisBT Version 2.28.1
Database Schema Version 213
PHP Version 8.2.30
Database Driver mysqli
Database Version, Description 10.3.39, 10.3.39-MariaDB
Michal67
Posts: 5
Joined: 30 Apr 2026, 08:37

Re: The same attachments are not visible in some issues in the same project

Post by Michal67 »

Well, it seems when an issue is created without attachment, no attachments (added in issue comments) are visible. When an issue is created with any attachment, all attachments are visible.
The existing attachments also appear after connecting one of the files to the header, like "UPDATE bug_file SET bugnote_id = 0 WHERE id = 56;"

I can not log into bug tracker (I forgot the combination of username and email and email alone is not enough for password reset; and account for this forum does not work there).


Michal
--
MantisBT Version 2.28.1
Database Schema Version 213
PHP Version 8.2.30
Database Driver mysqli
Database Version, Description 10.3.39, 10.3.39-MariaDB
Michal67
Posts: 5
Joined: 30 Apr 2026, 08:37

Re: The same attachments are not visible in some issues in the same project

Post by Michal67 »

OK, the problem was in customized config, including:

$g_bug_view_page_fields = array(
'id',
'project',
'category_id',
'view_state',
'date_submitted',
'last_updated',
'reporter_id',
'handler_id',
'priority',
'severity',
'status',
'resolution',
'summary',
'description',
);

without 'attachments'. So the whole problem was local misconfiguration.
Thanks for your attention.
--
MantisBT Version 2.28.1
Database Schema Version 213
PHP Version 8.2.30
Database Driver mysqli
Database Version, Description 10.3.39, 10.3.39-MariaDB
atrol
Site Admin
Posts: 8573
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: The same attachments are not visible in some issues in the same project

Post by atrol »

Thanks for providing the solution.
I checked the source code and was not able to reproduce.
Michal67 wrote: 14 May 2026, 05:54 I can not log into bug tracker (I forgot the combination of username and email and email alone is not enough for password reset; and account for this forum does not work there).
I reset your account. You should have received email for that.
Please use Search before posting and read the Manual
Michal67
Posts: 5
Joined: 30 Apr 2026, 08:37

Re: The same attachments are not visible in some issues in the same project (resolved)

Post by Michal67 »

Thanks for sending password reset link :-)

The problematic config was

$g_bug_report_page_fields = array(
'category_id',
'view_state',
'handler_id',
'priority',
'severity',
// 'reproducibility',
'summary',
'description',
// 'steps_to_reproduce', <-- toto jsme vynechali
// 'additional_info', <-- toto jsme vynechali
'attachments',
);

// Skryje pole při prohlížení a editaci (View/Update page)
$g_bug_view_page_fields = array(
'id',
'project',
'category_id',
'view_state',
'date_submitted',
'last_updated',
'reporter_id',
'handler_id',
'priority',
'severity',
// 'reproducibility',
'status',
'resolution',
'summary',
'description',
// 'steps_to_reproduce',
// 'additional_info',
);
--
MantisBT Version 2.28.1
Database Schema Version 213
PHP Version 8.2.30
Database Driver mysqli
Database Version, Description 10.3.39, 10.3.39-MariaDB
Post Reply