Login or Register

RSS IconRecent posts in this topic

avatar Pro
joolsr on Sep 19. 2008. 6:29 am
yes, replacing $filerelative with the real path fixed it

ie = '/activecollab/cache/'.$filename; where activecollab is your active collab install location, mine actually is web root /activecollab/activecollab ...

On another matter, I'm now down to one minor issue, ie clicking on the Gantt Chart tab, always bring up the same incorrect url ie

http://localhost/activecollab/public/index.php/projects/24/charts

where 24 is the incorrect project id.

Any idea how to make it select the correct project id, or at the very least where this is defined ?
avatar Pro
joolsr on Sep 19. 2008. 7:00 am
i just made a typo if applying the other fix of :-

# function charts_handle_on_project_tabs(&$tabs,&$logged_user,&$project) {
# if($logged_user->getProjectPermission('charts',$project) >= PROJECT_PERMISSION_ACCESS) {
# $tabs->add('charts', array(
# 'text' => lang('GanttCharts'),
# 'url' => charts_module_url($project),
# ));
# }
# } // files_handle_on_project_tabs

So my Gantt charts are now finally all ok!
avatar Pro
Paul O'Brien on Sep 20. 2008. 2:06 am
Joolsr, great to hear it's working for you now!

Overall it's a good module but the code needs a cleanup and the path issue needs to be fixed so that it works for a wider audience, hopefully Valdemar will take the suggestions in this thread and roll them back into the base package.

Will contact Valdemar and see if I can be of assistance.



avatar
dardarlt on Oct 1. 2008. 12:29 pm
I've upgraded ActiveCollab, and installed a new Charts 0.3 version. Now when I press charts tab, I'm getting 404 page not found error. Version 0.2 + AC 0.7 was running OK.
avatar Pro
joolsr on Oct 2. 2008. 3:40 am
dardarlt: Have a good look through the comments on this topic, and i think you should get it working. There are a few hacks you need to make it get it working.
avatar
dardarlt on Oct 2. 2008. 4:28 am
Actually I needed this to solve my problem (Getting 404 not found and so on).

1. Error "404 Not found"
To fix: Empty cache and compiled templates

2. Error: Fatal error: Call to a member function getProjectPermission() on a non-object in
To fix do this: http://www.activecollab.com/forums/post/14441/#post14441

3. Now I have a bad paths (nothing displayed)
TO FIX:
In activecollab\application\modules\charts\controllers\ChartsController.class.php
change
$filerelative = '/cache/'.$filename;

To this:
$filerelative = str_replace("/public", "", ROOT_URL) . '/cache/'.$filename;


4. Now we still have a no image, because there is "Deny from all" in .htaccess frin cache folder
A bad fix, but helps: comment it ... to:
#Deny from all

5. No I have encoding/bad fonts problems:
FIX IT:
simply in activecollab\application\modules\charts\helpers\jpgraph\jpg-config.inc.php
DEFINE("CACHE_DIR", ROOT . '/cache');
DEFINE("TTF_DIR", CHARTS_TTF_DIR);
// DEFINE("MBTTF_DIR","/usr/share/fonts/ja/TrueType/");


To this (this may be your font dir, also you can only define CHARTS_TTF_DIR:
DEFINE("CACHE_DIR","c:/windows/temp/jpgraph_cache/");
DEFINE("TTF_DIR","c:/windows/fonts/");
DEFINE("MBTTF_DIR","c:/windows/fonts/");



In activecollab\application\modules\charts\controllers\ChartsController.class.php
After
$activity = new GanttBar(++$bar,$this->short_name($name, $lengthlimit),$startdate,$enddate);
Add this:
$activity->title->SetFont(FF_VERDANA,FS_NORMAL,8);


6. I was still having locale problems (showing english dates instead of mine language, this will set OS locale)...
In activecollab\application\modules\charts\controllers\ChartsController.class.php
After: $graph = new GanttGraph($graphwidth);
Add: $graph->scale->SetDateLocale("");


7. Not happy with week numbers (need some dates?)
After: //$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);

Add:
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAYWNBR);
avatar Pro
markheathcote on Oct 11. 2008. 7:04 pm
This would be a nice module to use, but just cannot get it to work... sorted the incorrect url and some other stuff via these posts ,but still get the following:

From project at /public/index.php/projects/7

clicking the charts tab takes me to...

/public/index.php/projects/7/charts

but I get an error 500... cannot display to page. I am using 0.3 and AC1.1 on linux host with latest apache/php - any thoughts?

update - in Opera browser it gives a blank screen instead of error 500 (IE)
avatar Pro
joolsr on Oct 12. 2008. 4:58 am
Just a thought : have you got permissions of the files correct ?
avatar Pro
markheathcote on Oct 12. 2008. 2:59 pm
sorry, could you elaborate, do you mean permissions to execute? or permissions to write somewhere?
avatar Pro
joolsr on Oct 13. 2008. 3:15 am
I just mean permissions of the files, ie ensuring that your web server user, ie apache or www-data has read/write access to these files. having incorrect permissions can always lead to some odd errors. Also, check your we errors log , that might help, if you havent looked already .

RSS IconRecent posts in this topic