View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0036855 | mantisbt | bugtracker | public | 2026-01-28 10:19 | 2026-01-30 16:01 |
| Reporter | raspopov | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | new | Resolution | open | ||
| OS | Windows | ||||
| Product Version | 2.28.0 | ||||
| Summary | 0036855: Application error on bug_relationship_graph.php page | ||||
| Description | The following error is displayed when the
This occurs in Windows when a web server does not load environment variables. For example, this happens with the built-in web server in PHP. | ||||
| Additional Information | This is due to the following code:
in the | ||||
| Tags | No tags attached. | ||||
| related to | 0036859 | new | Optimization of Graphviz calls |
|
PR: https://github.com/mantisbt/mantisbt/pull/2173 It's interesting to note that the way the |
|
Considering that this is really old code (2009-ish, MantisBT master 0c323ef6), before I even joined the project, and that I don't use Mantis on Windows myself, I have absolutely no idea why it was implemented like that... Are you saying that on Windows it would be better not to set fontpath at all and let GraphViz do its thing with its default instead ? |
|
|
After doing some research, I found that the old version of Graphviz did not use the built-in fontconfig. It required the font folder to be specified explicitly. Furthermore, the new version of Graphviz does not support the method used in MantisBT to set the user font directory via the "fontpath" configuration option (a separate fontconfig configuration file is required). |
|
|
Not sure what you mean by old version, new version... Can you be more specific ? |
|
|
I tried (under Process Monitor) configuring fonts on Windows the same way I would with fontconfig on Linux, but nothing worked. The only option seems to be installing the font the standard Windows way, either in C:\Windows\Fonts or a similar folder in the user profile. Fontconfig only searches for fonts in these locations and the registry. Therefore, the API changes are probably unnecessary, except for possibly adding a comment to the configuration (config_defaults_inc.php etc.). |
|
|
Thanks for the clarification. Indeed an update to documentation (config_defaults_inc.php / admin guide) seems the appropriate way to address this. As a side note, I have no idea why $g_system_font_folder is documented in the Signup and Lost Password section, that makes absolutely no sense. I would suggest moving it to Bug Relationships / Relationship Graphs. Interestingly, on my dev box (MacOS, GraphViz 14.1.1), I just realized that I had an invalid $g_system_font_folder set in config_inc.php (left over from the days I was developing under Linux), and it works flawlessly even so; it also works fine with an empty config, which is interesting considering that none of the paths checked by get_font_path() exist on this system. I also tested on an Ubuntu server with GraphViz 2.43.0, where $g_system_font_folder is not set and get_font_path() resolves to So maybe $g_system_font_folder, get_font_path() and dependent code is no longer needed with recent versions of GraphViz. If that's indeed the case, we could remove the whole thing, and just document that GraphViz >= 2.14 (or whatever the actual version is, as I did not find a match for the one you referenced at https://www2.graphviz.org/Archive/stable/SOURCES/, 2.14 is from 2007, 2.40 from 2016)... |
|
|
Honestly, I didn't understand the history of FontConfig development myself. :-( I quoted an excerpt from somewhere, but now I've looked through old versions of GraphViz, and FontConfig is used everywhere. Clearly, it developed in parallel, capturing distributions and absorbing technologies. However, we are interested in when it "lost" the ability to load fonts from arbitrary directories in conjunction with GraphViz... In any case, this setting does not work with Windows. Under Linux, the provided directory list is outdated; fonts are now located in different directories. |
|