View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0030773||mantisbt||performance||public||2022-07-10 14:26||2022-08-04 05:00|
|Target Version||2.26.0||Fixed in Version||2.26.0|
|Summary||0030773: Only load dynamic CSS status_config.php when necessary|
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.
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
|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
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
- Solution: add `require_css( 'status_config.php' );` to the relevant
plugin pages or in the EVENT_LAYOUT_RESOURCES hook, as appropriate.
|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
|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
Signed-off-by: Damien Regad <firstname.lastname@example.org>
|mod - css/status_config.php||Diff File|
MantisBT: master 8777e43f
|Add missing pages where dynamic CSS is not loaded
|mod - bug_change_status_page.php||Diff File|
|mod - bug_reminder_page.php||Diff File|