View Issue Details

IDProjectCategoryView StatusLast Update
0024189mantisbtbugtrackerpublic2019-05-13 14:16
ReporterTomRAssigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status acknowledgedResolutionopen 
Product Version2.12.0 
Target VersionFixed in Version 
Summary0024189: Some statusses become 'Black'
Description

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.

Relationships

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 
related to 0024563 closedatrol Status button always black 
related to 0025755 new Status icons change to black 

Activities

atrol

atrol

2018-03-30 04:25

developer   ~0059357

Which version do you use?

atrol

atrol

2018-03-30 05:35

developer   ~0059358

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

atrol

atrol

2018-03-30 05:45

developer   ~0059359

For the record, I saw a similar behavior (all squares black on `My View" page) on www.mantisbt.org/bugs 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' ) )
            );
        }
TomR

TomR

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? )

atrol

atrol

2018-03-30 06:43

developer   ~0059364

Last edited: 2018-06-25 03:30

View 2 revisions

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' ) )

to

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

fixes the issue?

TomR

TomR

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

TomR

TomR

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!

atrol

atrol

2018-03-30 06:57

developer   ~0059367

Last edited: 2018-03-30 06:58

View 2 revisions

Sorry, it's in core/html_api.php

Edit: Crossed post.

cproensa

cproensa

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.

Issue History

Date Modified Username Field Change
2018-03-30 03:50 TomR New Issue
2018-03-30 04:25 atrol Relationship added related to 0020079
2018-03-30 04:25 atrol Status new => feedback
2018-03-30 04:25 atrol Note Added: 0059357
2018-03-30 05:32 atrol Relationship added related to 0023324
2018-03-30 05:35 atrol Note Added: 0059358
2018-03-30 05:45 atrol Note Added: 0059359
2018-03-30 06:09 TomR Note Added: 0059361
2018-03-30 06:09 TomR Status feedback => new
2018-03-30 06:43 atrol Status new => feedback
2018-03-30 06:43 atrol Note Added: 0059364
2018-03-30 06:43 atrol Product Version => 2.12.0
2018-03-30 06:52 TomR Note Added: 0059365
2018-03-30 06:52 TomR Status feedback => new
2018-03-30 06:57 TomR Note Added: 0059366
2018-03-30 06:57 atrol Note Added: 0059367
2018-03-30 06:57 atrol Status new => feedback
2018-03-30 06:58 atrol Note Edited: 0059367 View Revisions
2018-03-30 06:58 atrol Status feedback => acknowledged
2018-03-30 06:59 cproensa Note Added: 0059368
2018-06-25 03:28 atrol Relationship added related to 0024563
2018-06-25 03:30 atrol Note Edited: 0059364 View Revisions
2019-05-13 14:16 atrol Relationship added related to 0025755