We are evaluating the use of otrs for our company and I got the development part... so I'm totaly new to otrs development and it's model.
I'm having some trouble with my modul on the customer frontend. The same module is running fine for the agents but on the customer frontend I'm getting an 500 internal server error back from apache:
Code: Select all
[Sat Feb 22 22:24:20 2014] [error] Can't locate object method "GetUserData" via package "Kernel::System::CustomerUser" at /opt/otrs//Kernel/Output/HTML/NotificationOutofOfficeCheck.pm line 32.\n
Code: Select all
use Kernel::System::User;
use Kernel::System::CustomerUser;
OTRS / Server Infos:
Code: Select all
DOCUMENT_ROOT /opt/otrs/var/httpd/htdocs/
GATEWAY_INTERFACE CGI/1.1
MOD_PERL mod_perl/2.0.7
MOD_PERL_API_VERSION 2
PATH /usr/local/bin:/usr/bin:/bin
SCRIPT_FILENAME /opt/otrs/bin/cgi-bin/index.pl
SERVER_PORT 80
SERVER_PROTOCOL HTTP/1.1
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
Linux tnlabs-webdev01 2.6.32-5-686 #1 SMP Mon Sep 23 23:00:18 UTC 2013 i686 GNU/Linux
This is perl 5, version 14, subversion 2 (v5.14.2) built for i486-linux-gnu-thread-multi-64int
(with 88 registered patches, see perl -V for more detail)
Server version: Apache/2.2.22 (Debian)
Server built: Mar 4 2013 21:32:29
This is the CustomerMonitoring frontend module:
Code: Select all
package Kernel::Modules::CustomerMonitoring;
use strict;
use warnings;
use Kernel::System::Monitoring;
sub new {
my ( $Type, %Param ) = @_;
# allocate new hash for object
my $Self = {%Param};
bless ($Self, $Type);
# check needed objects
# check all needed objects
for (qw(ParamObject DBObject QueueObject LayoutObject ConfigObject LogObject SessionObject UserObject UserID)) {
if ( !$Self->{$_} ) {
$Self->{LayoutObject}->FatalError( Message => "Got no $_!" );
}
}
# create needed objects
$Self->{MonitoringObject} = Kernel::System::Monitoring->new(%Param);
return $Self;
}
sub Run() {
my ($Self, %Param ) = @_;
my %Data = ();
$Data{MonitoringFrame} = $Self->{MonitoringObject}->GetMonitoringFrame();
# Build the output
my $Output = $Self->{LayoutObject}->Header(Title => "Monitoring Informations");
$Output .= $Self->{LayoutObject}->NavigationBar();
$Output .= $Self->{LayoutObject}->Output(
Data => \%Data,
TemplateFile => 'CustomerMonitoringFrame'
);
$Output .= $Self->{LayoutObject}->Footer();
return $Output;
}
1;
Code: Select all
package Kernel::System::Monitoring;
use strict;
use warnings;
sub new {
my ( $Type, %Param ) = @_;
# allocate new hash for object
my $Self = {};
bless ($Self, $Type);
return $Self;
}
sub GetMonitoringFrame() {
my ($Self, %Param ) = @_;
return "<iframe src=\"http://FRAME-URL/ABC/YXZ\" style=\"margin:0; padding:0; border:none; height:100%; width:100%;\"></iframe>";
}
1;
For a customer frontend module, do I need to load or create something other then in the agent frontend?
Thank you very much for your help and time!!
Best regards,
Remo
PS: just let me know if you need any more infos!