View Issue Details

IDProjectCategoryView StatusLast Update
0033214mantisbtcustomizationpublic2023-11-19 10:46
Reporterjut Assigned To 
Status feedbackResolutionopen 
Summary0033214: Status Icons Black After Update to

I was wondering if anyone could guide me to help resolve why all my status icons turned black. Any help would be appreciated. I recently did switch over to a different webhost but I had a 1:1 copy as well as I upgraded my mantis version forward. I tried different version of PHP but older versions make mantis not function.

Previous articles I looked into didn't really provide much insight so I am hoping someone can guide me correctly.

$g_status_colors = array(
'submitted' => '#fff494', # yellow (scarlet red #ef2929)
'pending review' => '#ffcd85', # orange (plum #75507b)
'pending hearing' => '#e3b7eb', # purple (orango #f57900)
'active' => '#c2dfff', # blue (butter #fce94f) '#fff494' (sky blue
'suspended' => '#fcbdbd', #red
'inactive' => '#c9ccc4' # grey (aluminum #babdb6) '#c9ccc4'

Version of Mantis : 2.26.0
Php Version : 8.2.12
Self Hosted Linux Web Server
8.0.35 - MySQL Community Server - GPL

Originally Posted on the forum

TagsNo tags attached.




2023-11-13 11:08

developer   ~0068318

Problem could be caused by a caching issue, or maybe your custom statuses are not consistently defined globally... Did you search this tracker ? There's been several reports of similar issues in the past, maybe this will help.

Note that styles for status colors is dynamically generated. Try to access the CSS file directly, and see if the colors match. If not maybe you can debug/troubleshoot from there.



2023-11-18 10:54

reporter   ~0068324

Well I do not believe the issue is with how the custom statuses are defined because there was no issue prior to the update i.e the colors displayed, furthermore when I omit the custom status, the issue persist with the defaults.

When I go to inspect the page, I cannot find reference to where status color is defined in the css / it's not defined like it should be, the line is missing all together.



2023-11-19 07:17

developer   ~0068325


  • what's your setting of $g_status_enum_string?
  • are all status icons black, or just the ones of some status values?
  • which MantisBT version did you use before the upgrade?


2023-11-19 08:09

developer   ~0068327

@dregad while looking at some code around the status colors, I found that the cache_key we use for that is questionable (based on MantisBT version and user).
So the key will not change if someone changes a color.
I am wondering if the cache_key should just be based on the colors.
e. g. instead of

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

have something like

'cache_key=' . md5( serialize( config_get( 'status_colors' ) ) )


2023-11-19 10:23

developer   ~0068328

@atrol as you pointed out yourself in 0023324:0057631, status config can be user / project specific.

This means that in a situation where this is actually the case, I guess your suggestion would effectively force the cache to be refreshed every time a user switches to another project and/or logs in with a different account, kind of defeating the purpose of the cache don't you think ?



2023-11-19 10:41

developer   ~0068329

Last edited: 2023-11-19 10:46


I guess your suggestion would effectively force the cache to be refreshed every time a user
switches to another project and/or logs in with a different account

It will just be refreshed, if the colors for a project or a user are different.
I guess that's not that typical for most of the installations, as they typically set the colors in config_inc.php.

Won't you get wrong colors (or not set black) if you don't change the cache key after someone changed colors (in general, or for a certain project)?

As a side note: Our current approach does not work if issue status from mutiple projects are displayed on a single page (e. g. "View Issues" page if "All Projects" is selected) and the colors are set on a project level.