Register Custom Libraries

Moderator: crythias

Locked
crons
Znuny newbie
Posts: 58
Joined: 17 Aug 2012, 06:11
Znuny Version: 3.3.x
Real Name: Cornelius Jackson

Register Custom Libraries

Post by crons »

I have registered the Custom Lib in Config.pm and apache2-perl-startup.pl

use lib "/opt/otrs/OTRSExtdCore";
use lib "/opt/otrs/OTRSExtd";

Moved my custom moduels to /OTRSExtd/Kernel/Modules/CustomFile.pm and also the corresponding dtl file to /OTRSExtd/Kernel/Output/Html/Standard/CustomFile.dtl.
But otrs is looking in /opt/otrs/Kernel/..
How to fix this?

Thanks in Advance
crons
OTRS 3.3.x, Ubuntu, MySql 5.5
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Register Custom Libraries

Post by reneeb »

Are they named like already existing files? Then it depends on the order of "use lib" (last one wins)...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
crons
Znuny newbie
Posts: 58
Joined: 17 Aug 2012, 06:11
Znuny Version: 3.3.x
Real Name: Cornelius Jackson

Re: Register Custom Libraries

Post by crons »

Thanks,
I understand that last ones will be used.
But i have used new custom files..
OTRS 3.3.x, Ubuntu, MySql 5.5
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Register Custom Libraries

Post by reneeb »

Can you post the error messages? Have you restarted Apache?

And you know the difference between

/opt/otrs/OTRSExtd
/OTRSExtd

right?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
crons
Znuny newbie
Posts: 58
Joined: 17 Aug 2012, 06:11
Znuny Version: 3.3.x
Real Name: Cornelius Jackson

Re: Register Custom Libraries

Post by crons »

flie doesnt exists in /opt/otrs/Kernel/Output/HTML/Standard/../Standard/CustomFile.dtl
OTRS 3.3.x, Ubuntu, MySql 5.5
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Register Custom Libraries

Post by reneeb »

"Older" versions of OTRS cannot handle custom paths for templates (IIRC that was changed in OTRS 3.2)... You have to put all templates in the standard path.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
crons
Znuny newbie
Posts: 58
Joined: 17 Aug 2012, 06:11
Znuny Version: 3.3.x
Real Name: Cornelius Jackson

Re: Register Custom Libraries

Post by crons »

I am using latest OTRS version 3.2.6
OTRS 3.3.x, Ubuntu, MySql 5.5
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Register Custom Libraries

Post by crythias »

crons wrote:I have registered the Custom Lib in Config.pm and apache2-perl-startup.pl

use lib "/opt/otrs/OTRSExtdCore";
use lib "/opt/otrs/OTRSExtd";

Moved my custom moduels to /OTRSExtd/Kernel/Modules/CustomFile.pm and also the corresponding dtl file to /OTRSExtd/Kernel/Output/Html/Standard/CustomFile.dtl.
But otrs is looking in /opt/otrs/Kernel/..
How to fix this?

Thanks in Advance
crons
  • use lib overwrites previous
  • your use lib looks in /opt/otrs
  • you put your files in /OTRSExtd (according to your post)
  • all you really needed was to put your custom module in /opt/otrs/Custom/Kernel/Modules/CustomFile.pm
  • and dtl could be loose in /opt/otrs/Kernel/Output/HTML/Standard/CustomTemplate.dtl
  • Don't forget you will need a Kernel/Config/Files/CustomModule.xml file to register the module unless it overrides a core module
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Locked