Implement the HelloWorld module

Hello Community, I'm new with OTRS but I find it great. I was trying to setup my first module but I have some problems. It is not clear to me if I have to create new directories for the developed modules or I can use the dir already present. Can someone give me a first help? Moreover I tried to create the files in already existing directories and I was successfully to have the new module in my control board but I have this error code: Software error: Can't call method "FatalError" on an undefined value at ../..//Kernel/Modules/AgentHelloWorld.pm line 29. For help, please send mail to the webmaster (webmaster@localhost), giving this error message and the time and date of the error. Thanks for support, Valerio

Hello, Recently I had this problem with Hello World example and a solved it by adding this code to AgentHelloWorld.pd (in your case before line 29.) for ( qw(ParamObject DBObject, TicketObject LayoutObject LogObject QueueObject ConfigObject EncodeObject MainObject) ) { $Self->{$_} = $Param{$_} || dio "Got no $_"; } Best regards Stevan On 24.1.2010 16:27, valerio cacciatore wrote:
Hello Community, I'm new with OTRS but I find it great. I was trying to setup my first module but I have some problems.
It is not clear to me if I have to create new directories for the developed modules or I can use the dir already present. Can someone give me a first help? Moreover I tried to create the files in already existing directories and I was successfully to have the new module in my control board but I have this error code:
Software error:
Can't call method"FatalError" on an undefined value at ../..//Kernel/Modules/AgentHelloWorld.pm line 29.
For help, please send mail to the webmaster (webmaster@localhost mailto:webmaster@localhost), giving this error message and the time and date of the error.
Thanks for support,
Valerio

Hi Stevan, On 25.01.2010, at 08:38, Stevan Bogdanovic wrote:
for ( qw(ParamObject DBObject, TicketObject LayoutObject LogObject QueueObject ConfigObject EncodeObject MainObject) ) { $Self->{$_} = $Param{$_} || dio "Got no $_"; } you may use 'die' instead of 'dio' in your code ;)
hth Markus -- Markus Esche Customer Development OTRS AG Europaring 4 94315 Straubing Deutschland T: +49 (0) 9421 56818 0 F: +49 (0) 9421 56818 18 I: http://www.otrs.com/ Geschäftssitz: Bad Homburg Amtsgericht: Bad Homburg, HRB 10751 Steuernummer: 003 240 97505 Aufsichtsratsvorsitzender: Burchard Steinbild Vorstand: André Mindermann (Vorsitzender), Martin Edenhofer Treffen Sie uns auf der CeBIT 2010 in Hannover und erfahren Sie vom 02.-06. März 2010 mehr über OTRS an Stand C37 in Halle 2!

On 25.1.2010 8:47, Markus Esche wrote:
Hi Stevan,
On 25.01.2010, at 08:38, Stevan Bogdanovic wrote:
for ( qw(ParamObject DBObject, TicketObject LayoutObject LogObject QueueObject ConfigObject EncodeObject MainObject) ) { $Self->{$_} = $Param{$_} || dio "Got no $_"; } you may use 'die' instead of 'dio' in your code ;)
hth Markus --
Sorry, typo error. There is one more - I wrote AgentHelloWorld.pd it should be AgentHelloWorld.pm :) Best regards Stevan

Hi, On 25.01.2010, at 08:56, Stevan Bogdanovic wrote:
for ( qw(ParamObject DBObject, TicketObject LayoutObject LogObject QueueObject ConfigObject EncodeObject MainObject) ) { $Self->{$_} = $Param{$_} || dio "Got no $_"; } you may use 'die' instead of 'dio' in your code ;)
Sorry, typo error. There is one more - I wrote AgentHelloWorld.pd it should be AgentHelloWorld.pm :)
Many thanks for the hint. There was a typo in the documentation. It's fixed now: http://doc.otrs.org/developer/2.4/en/html/x1205.html "my $Self = {%Param};" was msissing. Any more problems? :) -Martin Edenhofer
participants (4)
-
Markus Esche
-
Martin Edenhofer
-
Stevan Bogdanovic
-
valerio cacciatore