Topic: [Error RepGen] function add_domain() in repgen_const.inc

Hello all..
After installing Report Generator, and want to open the Report Generator,
all I got was a blank screen..

When I changed the $go_debug = 1 in the config.php, the error that i got was this :

Undefined index: get_text in file: C:\wamp\www\frontaccounting\modules\repgen\includes\repgen_const.inc at line 9
Call to a member function add_domain() on a non-object in C:\wamp\www\frontaccounting\modules\repgen\includes\repgen_const.inc on line 9

( ! )
Call Stack
#    Time    Memory    Function    Location
1    0.0014    830920    {main}( )    ..\repgen_select.php:0
2    0.0938    12029224    require_once( 'C:\wamp\www\frontaccounting\modules\repgen\includes\repgen_const.inc' )    ..\repgen_select.php:38

Line 9 in repgen_const.inc was this :
$_SESSION['get_text']->add_domain($_SESSION['language']->code, $path_to_root.'/modules/repgen/lang');

So, what should I do?
Any recommendation would be a great help..
Thx..

Re: [Error RepGen] function add_domain() in repgen_const.inc

Please change the line 9
$_SESSION['get_text']->add_domain($_SESSION['language']->code, $path_to_root.'/modules/repgen/lang');
to
$Gettext->add_domain($_SESSION['language']->code, $path_to_root.'/modules/repgen/lang');

The session gettext has been changed to global $Gettext.

/Joe

Re: [Error RepGen] function add_domain() in repgen_const.inc

Hi Joe, thanks for the reply..

I did what you suggested, but I still got errors,
here were the errors :

Undefined variable: Gettext in file: C:\wamp\www\frontaccounting\modules\repgen\includes\repgen_const.inc at line 9
Call to a member function add_domain() on a non-object in C:\wamp\www\frontaccounting\modules\repgen\includes\repgen_const.inc on line 9

( ! )
Call Stack
#    Time    Memory    Function    Location
1    0.0013    830216    {main}( )    ..\repgen_select.php:0
2    0.1140    13027680    require_once( 'C:\wamp\www\frontaccounting\modules\repgen\includes\repgen_const.inc' )    ..\repgen_select.php:38

When I see the error log, it shows this line :
[20-Feb-2012 09:30:53] 4 Domain file "../../modules/repgen/lang/en_US/LC_MESSAGES/en_US.po" not found.

Hmm.. my guess is that I have to make new language template..
Is it true? or am i looking at the wrong direction here?


Any recommendation would be a great help..
Thx..

Re: [Error RepGen] function add_domain() in repgen_const.inc

I am sorry, the variable should be $GetText and NOT $Gettext. Please change that.

/Joe

Re: [Error RepGen] function add_domain() in repgen_const.inc

Hey Joe, thanks for the quick reply..
After I changed it to $GetText, it works like a charm..
Thanks..

But I found another error, when I made a new report and want to place an item on the report, I can't seem to get the "store item" button to work..
There was no error message that occurred..

When I searched for the forum, I found others had the same problem
https://frontaccounting.com/punbb/viewtopic.php?id=2086
I already tried his suggestion, but that didn't work also..

So, what should I do?
Any suggestion would be a great help..
Thanks..

Re: [Error RepGen] function add_domain() in repgen_const.inc

I am not sure about this. This report generator was taken from another project. Normally we don't give support on the modules. Most of them we didn't create.
I know that the repgen should work, but minor problems may arrive. Please try to find the problem. If you find something useful, please share it with us.

/Joe

Re: [Error RepGen] function add_domain() in repgen_const.inc

Okay, hopefully this is just a minor bug..
*finger crossed

Re: [Error RepGen] function add_domain() in repgen_const.inc

HI , I had the same problem, just commented out line 9, works fine, but not yet seen the end result