View Issue Details

IDProjectCategoryView StatusLast Update
0027122mantisbtplug-inspublic2021-03-07 18:29
Reporterdregad Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.8.0 
Target Version2.25.0Fixed in Version2.25.0 
Summary0027122: 3rd-party plugins cannot use chart.js library bundled with MantisGraph
Description

When the MantisGraph plugin was modified to rely on chart.js as part of 2.0 release, the library was loaded on every single page.

While not very efficient, this allowed 3rd-party plugins to use the chart.js library to display their own graphs.

From MantisBT 2.8.0, the MantisGraph Plugin only loads chart.js for its own pages (see 0023446), which broke the above-mentioned plugins, as they could no longer access chart.js resources, unless they bundled the library themselves, which is also inefficient and could lead to compatibility conflicts due to version mismatch.

TagsNo tags attached.

Relationships

related to 0023446 closedatrol Unneeded files delivered if Mantis Graphs plugin is enabled 

Activities

dregad

dregad

2020-08-03 12:38

developer   ~0064223

To avoid the problem and restore the ability for 3rd-party plugins to use the same chart.js as the MantisGraph plugin, the latter should provide a way to include the library separately from the plugin's standard resources() function.

Related Changesets

MantisBT: master a1453788

2020-05-25 08:42

dregad


Details Diff
MantisGraph: new method to load chart.js resources

Since MantisBT 2.8.0, MantisGraph only loads chart.js for its own pages.

This prevents other plugins from accessing these resources to publish
their own charts, unless they bundle chart.js themselves.

This commit exposes a dedicated public method include_chartjs() to
include the library, separately from the plugin's standard resources()
function.

Fixes 0027122
Affected Issues
0027122
mod - plugins/MantisGraph/MantisGraph.php Diff File