View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0030773 | mantisbt | performance | public | 2022-07-10 14:26 | 2023-10-31 16:32 |
Reporter | dregad | Assigned To | dregad | ||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 2.26.0 | Fixed in Version | 2.26.0 | ||
Summary | 0030773: Only load dynamic CSS status_config.php when necessary | ||||
Description | The dynamic CSS for status colors is systematically included on all MantisBT pages, even when the styles it defines are not used. This is because of an unconditional To avoid unnecessarily load of the stylesheet, the require_css() call should be moved to the individual files that do require the specific color classes. | ||||
Additional Information | NOTE: This change could introduce regression issues for Plugins relying on the status_config.php CSS to be loaded by MantisBT core.
The Source Integration plugin <= 2.5.2 is affected (View Changeset page). | ||||
Tags | No tags attached. | ||||
MantisBT: master e296eb4a 2022-07-11 02:18 Details Diff |
Only load status_config.php CSS when necessary The dynamic CSS for status colors was included in relationship_api.php and bug_group_action_api.php, which caused status_config.php to be loaded for every MantisBT page even though it is not needed for many of them. This moves the require_css() call to the individual files that require the specific color classes. NOTE: This could introduce regression issues for Plugins relying on the status_config.php CSS to be loaded by MantisBT core. - Affected plugins: relying on html_get_status_css_* functions - Symptoms: The status indicators are displayed in black instead of the expected color - Solution: add `require_css( 'status_config.php' );` to the relevant plugin pages or in the EVENT_LAYOUT_RESOURCES hook, as appropriate. Fixes 0030773 |
Affected Issues 0030773 |
|
mod - bug_actiongroup.php | Diff File | ||
mod - bug_actiongroup_ext.php | Diff File | ||
mod - bug_actiongroup_ext_page.php | Diff File | ||
mod - bug_actiongroup_page.php | Diff File | ||
mod - changelog_page.php | Diff File | ||
mod - core/bug_group_action_api.php | Diff File | ||
mod - core/relationship_api.php | Diff File | ||
mod - print_all_bug_page.php | Diff File | ||
mod - roadmap_page.php | Diff File | ||
MantisBT: master aed33fbc 2022-07-20 11:51 Details Diff |
Remove unneeded code in status_config.php The logic to load the dynamic CSS only for certain pages based on HTTP_REFERER is no longer needed, as the script is only called when it is actually needed Issue 0030773 Signed-off-by: Damien Regad <dregad@mantisbt.org> |
Affected Issues 0030773 |
|
mod - css/status_config.php | Diff File | ||
MantisBT: master 8777e43f 2022-07-30 11:03 Details Diff |
Add missing pages where dynamic CSS is not loaded Issue 0030773 |
Affected Issues 0030773 |
|
mod - bug_change_status_page.php | Diff File | ||
mod - bug_reminder_page.php | Diff File |