View Issue Details

IDProjectCategoryView StatusLast Update
0024189mantisbtbugtrackerpublic2021-01-24 06:28
ReporterTomR Assigned Tocproensa  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version2.12.0 
Target Version2.22.0Fixed in Version2.22.0 
Summary0024189: Status color squares become black

Some statusses become 'Black',

I saw some issue here before which were closed, however I find this is still actual.
After some testing i notice it only occurs when switching between projects with different statusses defined in status_enum_string in database ( per project ).

In my config_inc.php I have $g_status_enum_string defined with all possible statusses in all projects. ( Added some constants into custom_constants_inc.php ).
In configuration in database I have different subsets per project.

Steps To Reproduce

Change between projects with different statusses.
De status which is used in both projects show with the correct color, the others not.

Ctrl-F5 is retrieving status colors.

Additional Information

I guess it has something to do with 'caching' in css/status_config.php?

TagsNo tags attached.


related to 0020079 new Custom status colors not working when displaying issues from another project 
related to 0023324 closedcproensa Generated css, js code should be cached by browser 
has duplicate 0025892 closeddregad Incorrect operation of the helper_generate_cache_key() function. 
has duplicate 0025934 closedatrol Status icons are black 
related to 0024563 closedatrol Status button always black 
related to 0025755 closedatrol Status icons change to black 
related to 0025969 closedcproensa bug_report_page is forced to be cached 
related to 0027907 closedatrol Status Colors all Black 




2018-03-30 04:25

developer   ~0059357

Which version do you use?



2018-03-30 05:35

developer   ~0059358

Some discussion related to different stats enums in different projects 0023324:0057633



2018-03-30 05:45

developer   ~0059359

For the record, I saw a similar behavior (all squares black on `My View" page) on some days ago.
We don't have different status values per project.

My impression was, that I got it just when using anonymous access.

@cproensa do you think we should add project to the cache key?

        if( $t_stylesheet_path == 'status_config.php' ) {
            $t_stylesheet_path = helper_url_combine(
                helper_mantis_url( 'css/status_config.php' ),
                'cache_key=' . helper_generate_cache_key( array( 'user' ) )


2018-03-30 06:09

reporter   ~0059361

Sorry @atrol: Version 2.12.0
Forgot with reporting bug. ( Why is it not possible to edit your own report bug / and or comments/activities on mantisbt butracker? )



2018-03-30 06:43

developer   ~0059364

Last edited: 2018-06-25 03:30

Why is it not possible to edit your own report bug / and or comments/activities on mantisbt butracker?

I don't know. Someone configured this before I started to contribute to Mantis.
I assume there have been reporters that changed/deleted information, so that it became hard to understand the whole history of the issue after the changes.

I have no time to reproduce/fix at the moment
@TomR could you please try if changing core/html_api.php from

'cache_key=' . helper_generate_cache_key( array( 'user' ) )


'cache_key=' . helper_generate_cache_key( array( 'user', 'project' ) )

fixes the issue?



2018-03-30 06:52

reporter   ~0059365

Hi @atrol, would like to try, but the line

'cache_key=' . helper_generate_cache_key( array( 'user' ) )

is not available in source code css/status_config.php?

I checked in freshly downloaded source MantisBT 2.12.0



2018-03-30 06:57

reporter   ~0059366

Hi @atrol,

Sorry for the quick comment.

I found out hat to change line 224 of core/html_api.php

And YES, this seems to fix the issue!



2018-03-30 06:57

developer   ~0059367

Last edited: 2018-03-30 06:58

Sorry, it's in core/html_api.php

Edit: Crossed post.



2018-03-30 06:59

developer   ~0059368

My impression was, that I got it just when using anonymous access.

I have experienced that too, after anonymous access, but in my system the status enum is unique for global config, so this may not be the same issue as reported here.

@cproensa do you think we should add project to the cache key?

Let's clarify if status enum can be changed per project.
I fear it may create a problem with filters.



2019-06-25 02:43

reporter   ~0062313

Last edited: 2019-06-25 04:52

I also noticed a long time ago that sometimes there is a situation with a black status.
I managed to achieve a stable reproduction of this situation.
Here is a sequence of actions that will lead to a black status:

  1. Wait until the TOKEN_AUTHENTICATED expires under your user;
  2. Go to account settings;
  3. On the password entry page (login_password_page.php) of the current user, you need to completely update the page in any way (in google chrome it is Shift + F5);
  4. Enter the password of the current user.

After that, all statuses will be displayed as black squares.



2019-06-25 03:02

reporter   ~0062314

It is also possible that this behavior will be reproduced if the user for some reason remains on the login_password_page.php page during the reauthorization process until the page cache lifetime expires.
But so far I have not tried to reproduce this script.



2019-06-28 04:09

reporter   ~0062331

I created a related issue in which I presented my solution. ( )

Related Changesets

MantisBT: master aff0ea90

2019-07-09 09:18:00


Committer: dregad Details Diff
Don't cache status_config.php when it's not populated

When the dynamic css file `status_config.php` can't be generated, force
a no-caching header to avoid the client caching a wrong version of this

Fixes 0024189
Affected Issues
mod - css/status_config.php Diff File

MantisBT: master 97b745dc

2019-07-12 08:39:35


Committer: dregad Details Diff
Allow explicit behavior for cache headers

Use an explicit true/false value for the parameter to force the caching
behavior. Otherwise, use null or omit the parameter to use default
Affected Issues
mod - core/http_api.php Diff File

MantisBT: master 98080bb6

2019-07-15 08:27:58


Details Diff
Merge PR 1526
Affected Issues
mod - core/http_api.php Diff File
mod - css/status_config.php Diff File
mod - javascript_config.php Diff File
mod - javascript_translations.php Diff File
mod - plugin.php Diff File