Graphs are not visible.

Get help from other users here.

Moderators: Developer, Contributor

Graphs are not visible.

Postby Xupicor » Oct 09, 2011 9:05 am

Hello there, I know there were some topics about this, and I tried to follow some of the advices, and obviously I failed.

My problem is that graphs (no matter where I look, Summary, etc) just won't show up. Firebug gives me "Image corrupt or truncated: http://bugs.example.com/plugin.php?page ... width=375' or similar message in console, for every graph I guess.
If I follow the url, I'll see blank page with similar message about corrupt image, which is probably generated by Firefox, since it's in Polish (I've got PL version of Firefox). Firebug again reports the same.

Mantis is in version 1.2.8, so last stable version AFAIK. It runs on PHP 5.2.17, linux (2.6.32.45-grsec x86_64, probably Debian, I honestly don't know, it's on shared host).
Code: Select all
gd
GD Support    enabled
GD Version    bundled (2.0.34 compatible)
FreeType Support    enabled
FreeType Linkage    with freetype
FreeType Version    2.4.4
T1Lib Support    enabled
GIF Read Support    enabled
GIF Create Support    enabled
JPG Support    enabled
PNG Support    enabled
WBMP Support    enabled
XBM Support    enabled

Mantis has only three plugins installed: MantisBT Core 1.2.8, MantisBT Formatting 1.0a and Mantis Graphs 1.0.
"Graph library to use: Bundled" is set in graph plugin settings.

Functions imagefill() and imageantialias() seem to exist (didn't check if they work though), and when I tried to put error reporting on max, not even a notice came my way.

It seems to work fine on my local machine, Windows XP, PHP 5.3.5.
Now, I'll probably inspect the differences between those setups... I see fonts are used in the graphs, maybe that's the culprit? I mean, on Windows they're probably pulled from Windows/fonts, where are they searched for if they're not found? Maybe it's a matter of copying a font file to some plugin/Mantis directory? (Arial is set in the graph plugin settings).
Xupicor
 
Posts: 1
Joined: Oct 08, 2011 4:49 pm

Re: Graphs are not visible.

Postby Coolpro21 » Dec 14, 2011 1:04 pm

I have the same problem, only my installation of Mantis is installed in a virtual machine. I use a Turnkey LAMP appliance with a manual installation of Mantis 1.2.8. I've searched high and low for some basic instructions on how to get this working and found this, which seemed to be what I needed, but alas it didn't work either. http://mantisbt.org/manual/manual.confi ... pgraph.php I've attached a screen shot of what I get. I would really like to get this going, but I am a newb to Linux.
Attachments
Mantis Graph 1.0.jpg
Mantis Graph 1.0.jpg (46.18 KiB) Viewed 2648 times
Coolpro21
 
Posts: 8
Joined: Dec 12, 2011 4:23 pm

Re: Graphs are not visible.

Postby atrol » Dec 14, 2011 3:08 pm

Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 3646
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Graphs are not visible.

Postby jop » Feb 15, 2012 3:33 pm

I had the same problem (Mantis 1.2.8) on a shared hosting environment. The area where the graph should be was blank. Not even a message of a missing font, not an errormessage in the apache log. First I tried to turn on error logging, but that didn't change the logging (no errors).
After tracing the activity by inserting some echo statements, I noticed it stopped when locating the font. I've put arial.ttf in <mantis root>/library/fonts (created the directory) and simple put return 'library/fonts/'; in the first line of the function get_font_path() - line 233 - in the file <mantis root>/core/utility_api.php. Then the graphs worked for me (only when you select 'arial' as font in the config of Mantis Graphs).

Maybe the fonts are present, but cannot be read by the PHP process?

Hope this helps!
jop
 
Posts: 1
Joined: Feb 15, 2012 3:16 pm

Re: Graphs are not visible.

Postby rmc » Mar 23, 2012 7:09 am

Having made a sufficiently large dent in the wall with my head over the last few days I've now resolved the invisible graph problem with my installation of MantisBT. I hope this helps:

My test server is in the cloud (Amazon EC2) and is using the Amazon Linux image - based on CentOS 6. I also have a local machine running Centos 6.2 with the same problem (solution not tested yet - I'll post the result once I've fixed it).

Having resolved the TTF fonts issue - thanks to Oimon's Blog - the graphs were still not appearing. After some trawling through the PHP code I decided to start up Firebug and eventually found that the URL was failing to load because "Graph depends on the default php dom extension" - see eZ Components Requirements Graph section for more information.
A quick session with 'yum' to install the php-xml package (which includes the dom extension) and a restart of the httpd service solved it ... I now have graphs using the Bundled ezclibrary rather than jpgraph.

So to summarise, check that your installation of PHP either has all the necessary extensions compiled in or add the required modules.
rmc
 
Posts: 8
Joined: Mar 23, 2012 6:47 am

Re: Graphs are not visible.

Postby rmc » Mar 29, 2012 9:09 am

This is just a quick note to say that my solution, as per my previous post for the Amazon Linux virtual machine also worked perfectly on a CentOS 6.2 physical machine.
rmc
 
Posts: 8
Joined: Mar 23, 2012 6:47 am

Re: Graphs are not visible.

Postby woser » Apr 01, 2012 4:00 am

Hi, It is possible change a font which is not specified in options, unfortunately my hosting don't support mscorefonts, but it have :

./ttf-dejavu/DejaVuSerifCondensed-Bold.ttf
./ttf-dejavu/DejaVuSerif-BoldItalic.ttf
./ttf-dejavu/DejaVuSansCondensed-BoldOblique.ttf
./ttf-dejavu/DejaVuSerifCondensed.ttf
./ttf-dejavu/DejaVuSansMono.ttf
./ttf-dejavu/DejaVuSansCondensed-Oblique.ttf
./ttf-dejavu/DejaVuSansMono-Bold.ttf
./ttf-dejavu/DejaVuSans.ttf
./ttf-dejavu/DejaVuSans-ExtraLight.ttf
./ttf-dejavu/DejaVuSerif.ttf
./ttf-dejavu/DejaVuSerif-Italic.ttf
./ttf-dejavu/DejaVuSans-Bold.ttf
./ttf-dejavu/DejaVuSerif-Bold.ttf
./ttf-dejavu/DejaVuSerifCondensed-Italic.ttf
./ttf-dejavu/DejaVuSansCondensed.ttf
./ttf-dejavu/DejaVuSansCondensed-Bold.ttf
./ttf-dejavu/DejaVuSansMono-BoldOblique.ttf
./ttf-dejavu/DejaVuSansMono-Oblique.ttf
./ttf-dejavu/DejaVuSans-BoldOblique.ttf
./ttf-dejavu/DejaVuSans-Oblique.ttf
./ttf-dejavu/DejaVuSerifCondensed-BoldItalic.ttf
./ttf-liberation/LiberationMono-BoldItalic.ttf
./ttf-liberation/LiberationSerif-BoldItalic.ttf
./ttf-liberation/LiberationSans-Bold.ttf
./ttf-liberation/LiberationSerif-Bold.ttf
./ttf-liberation/LiberationSerif-Regular.ttf
./ttf-liberation/LiberationMono-Bold.ttf
./ttf-liberation/LiberationMono-Regular.ttf
./ttf-liberation/LiberationSans-BoldItalic.ttf
./ttf-liberation/LiberationSerif-Italic.ttf
./ttf-liberation/LiberationSans-Italic.ttf
./ttf-liberation/LiberationSans-Regular.ttf
./ttf-liberation/LiberationMono-Italic.ttf

What should I change in the source ??
woser
 
Posts: 1
Joined: Apr 01, 2012 3:58 am

Re: Graphs are not visible.

Postby david_stephensen » Oct 18, 2012 12:51 am

jop wrote:I had the same problem (Mantis 1.2.8) on a shared hosting environment. The area where the graph should be was blank. Not even a message of a missing font, not an errormessage in the apache log. First I tried to turn on error logging, but that didn't change the logging (no errors).
After tracing the activity by inserting some echo statements, I noticed it stopped when locating the font. I've put arial.ttf in <mantis root>/library/fonts (created the directory) and simple put return 'library/fonts/'; in the first line of the function get_font_path() - line 233 - in the file <mantis root>/core/utility_api.php. Then the graphs worked for me (only when you select 'arial' as font in the config of Mantis Graphs).

Maybe the fonts are present, but cannot be read by the PHP process?

Hope this helps!


Thanks Jop!!!! My website host (hostgator.com) hosts Mantis for me. I tried Jop's solution here and it worked first time. Except now this function (Mantis 1.2.11) starts at line 242. I worked a little more within the code like this:

function get_font_path() {
$t_font_path = config_get_global( 'system_font_folder' );
/*
Added correct font path DJS 18/10/12
*/
$t_font_path = 'library/fonts/';
/*
End modification
*/
if( $t_font_path == '' ) {
...
david_stephensen
 
Posts: 16
Joined: Sep 04, 2012 11:37 pm


Return to Help

Who is online

Users browsing this forum: Google [Bot], MSN [Bot] and 2 guests

cron