View Issue Details

IDProjectCategoryView StatusLast Update
0024189mantisbtbugtrackerpublic2019-08-25 12:36
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
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 
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 

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.

123

123

2019-06-25 02:43

reporter   ~0062313

Last edited: 2019-06-25 04:52

View 3 revisions

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.

123

123

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.

123

123

2019-06-28 04:09

reporter   ~0062331

I created a related issue in which I presented my solution. ( https://mantisbt.org/bugs/view.php?id=25892 )

Related Changesets

MantisBT: master aff0ea90

2019-07-09 09:18:00

cproensa


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
file.

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

MantisBT: master 97b745dc

2019-07-12 08:39:35

cproensa


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
behavior.
Affected Issues
0024189
mod - core/http_api.php Diff File

MantisBT: master 98080bb6

2019-07-15 08:27:58

dregad

Details Diff
Merge PR 1526

https://github.com/mantisbt/mantisbt/pull/1526
Affected Issues
0024189
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

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
2019-06-25 02:43 123 Note Added: 0062313
2019-06-25 02:50 123 Note Edited: 0062313 View Revisions
2019-06-25 03:02 123 Note Added: 0062314
2019-06-25 04:52 123 Note Edited: 0062313 View Revisions
2019-06-28 03:46 123 Issue cloned: 0025892
2019-06-28 03:46 123 Relationship added related to 0025892
2019-06-28 04:09 123 Note Added: 0062331
2019-07-15 08:42 dregad Changeset attached => MantisBT master aff0ea90
2019-07-15 08:42 cproensa Assigned To => cproensa
2019-07-15 08:42 cproensa Status acknowledged => resolved
2019-07-15 08:42 cproensa Resolution open => fixed
2019-07-15 08:42 cproensa Fixed in Version => 2.21.2
2019-07-15 10:26 dregad Fixed in Version 2.21.2 => 2.22.0
2019-07-15 10:26 dregad Target Version => 2.22.0
2019-07-15 10:27 dregad Summary Some statusses become 'Black' => Status color squares become black
2019-07-15 10:29 dregad Relationship replaced has duplicate 0025892
2019-07-15 10:30 dregad Changeset attached => MantisBT master 98080bb6
2019-07-15 10:31 dregad Changeset attached => MantisBT master 97b745dc
2019-07-18 05:23 atrol Relationship added has duplicate 0025934
2019-08-25 12:36 vboctor Status resolved => closed