OTRS 3.0.9 ConfigItem crash

Moderator: crythias

Post Reply
_-Flo-_
Znuny newbie
Posts: 31
Joined: 23 Aug 2011, 14:33
Znuny Version: 3.0.9

OTRS 3.0.9 ConfigItem crash

Post by _-Flo-_ »

Hello,
in the class-definition of ConfigItem I modified some entrys. After each modification a new, updated version, of the code was set. Last time I changed something in the class-definition code (ITSM::ConfigItem::Class::Computer) the part crashed. Now I cannot open the class-definition again for changing the code in its old, working, state. When I want to open the class-definition-code the following error occurs:

Software error:
Can't use string ("CountMin") as a HASH ref while "strict refs" in use at C:/PROGRA~1/OTRS/OTRS//Kernel/System/ITSMConfigItem/Definition.pm line 342.

For help, please send mail to the webmaster (webmaster@somenet.com), giving this error message and the time and date of the error.


When I open this definition.pm there's another code than in the configitem class-definition of 'computer' and I just don't know how to open the configitem code for changing it that it works again.


Now i post the Code I changed (the old, working, version):

Config Item Klasse: Computer
Version: 6
Erstellt von: xxx
Erstellt: 23.08.2011 13:40:45
Definition: [
{
Key => 'Vendor',
Name => 'Vendor',
Searchable => 1,
Input => {
Type => 'GeneralCatalog',
Class => 'Anbieter',
Translation => 1,
},
},
{
Key => 'Model',
Name => 'Model',
Searchable => 1,
Input => {
Type => 'GeneralCatalog',
Class => 'ITSM::ConfigItem::Computer::Model',
Translation => 1,
},
},
{
Key => 'Description',
Name => 'Description',
Searchable => 1,
Input => {
Type => 'TextArea',
},
},
{
Key => 'Type',
Name => 'Type',
Searchable => 1,
Input => {
Type => 'GeneralCatalog',
Class => 'ITSM::ConfigItem::Computer::Type',
Translation => 1,
},
},
{
Key => 'Owner',
Name => 'Owner',
Searchable => 1,
Input => {
Type => 'Customer',
},
},
{
Key => 'SerialNumber',
Name => 'Serial Number',
Searchable => 1,
Input => {
Type => 'Text',
Size => 50,
MaxLength => 100,
},
},
{
Key => 'OperatingSystem',
Name => 'Operating System',
Input => {
Type => 'GeneralCatalog',
Class => 'ITSM::ConfigItem::Computer::OperatingSystem',
Translation => 1,
},
},
{
Key => 'CPU',
Name => 'CPU',
Input => {
Type => 'Text',
Size => 50,
MaxLength => 100,
},
CountMax => 16,
},
{
Key => 'Ram',
Name => 'Ram',
Input => {
Type => 'Text',
Size => 50,
MaxLength => 100,
},
CountMax => 10,
},
{
Key => 'HardDisk',
Name => 'Hard Disk',
Input => {
Type => 'Text',
Size => 50,
MaxLength => 100,
},
CountMax => 10,
Sub => [
{
Key => 'Capacity',
Name => 'Capacity',
Input => {
Type => 'Text',
Size => 20,
MaxLength => 10,
},
},
],
},
{
Key => 'FQDN',
Name => 'FQDN',
Searchable => 1,
Input => {
Type => 'Text',
Size => 50,
MaxLength => 100,
},
},
{
Key => 'NIC',
Name => 'Network Adapter',
Input => {
Type => 'GeneralCatalog',
Class => 'ITSM::ConfigItem::Computer::NetworkAdapter',
Translation => 1,
Required => 1,
},
CountMin => 0,
CountMax => 10,
CountDefault => 1,
Sub => [
{
Key => 'IPoverDHCP',
Name => 'IP over DHCP',
Input => {
Type => 'GeneralCatalog',
Class => 'ITSM::ConfigItem::YesNo',
Translation => 1,
Required => 1,
},
},
{
Key => 'IPAddress',
Name => 'IP Address',
Searchable => 1,
Input => {
Type => 'Text',
Size => 40,
MaxLength => 40,
Required => 1,
},
CountMin => 0,
CountMax => 20,
CountDefault => 0,
},
{
Key => 'Subnet',
Name => 'Subnet',
Searchable => 1,
Input => {
Type => 'Text',
Size => 40,
MaxLength => 40,
Required => 1,
},
},
{
Key => 'Gateway',
Name => 'Gateway',
Searchable => 1,
Input => {
Type => 'Text',
Size => 40,
MaxLength => 40,
Required => 1,
},
CountMin => 0,
CountMax => 20,
CountDefault => 0,
},

],
},
{
Key => 'GraphicAdapter',
Name => 'Graphic Adapter',
Input => {
Type => 'Text',
Size => 50,
MaxLength => 100,
},
},
{
Key => 'OtherEquipment',
Name => 'Other Equipment',
Input => {
Type => 'TextArea',
Required => 1,
},
CountMin => 0,
CountDefault => 0,
},
{
Key => 'WarrantyExpirationDate',
Name => 'Warranty Expiration Date',
Searchable => 1,
Input => {
Type => 'Date',
},
},
{
Key => 'InstallDate',
Name => 'Install Date',
Searchable => 1,
Input => {
Type => 'Date',
Required => 1,
},
CountMin => 0,
CountDefault => 0,
},
{
Key => 'Note',
Name => 'Note',
Searchable => 1,
Input => {
Type => 'TextArea',
Required => 1,
},
CountMin => 0,
CountDefault => 0,
},
];


The red marked part of the code I changed afterwards into the following:

{
Key => 'IPAddress',
Name => 'IP Address',
Searchable => 1,
Input => {
Type => 'Text',
Size => 40,
MaxLength => 40,
Required => 1,
},
CountMin => 0,
CountMax => 20,
CountDefault => 0,
},
{
Key => 'Subnet',
Name => 'Subnet',
Searchable => 1,
Input => {
Type => 'Text',
Size => 40,
MaxLength => 40,
Required => 1,
},
},
{
Key => 'Gateway',
Name => 'Gateway',
Searchable => 1,
Input => {
Type => 'Text',
Size => 40,
MaxLength => 40,
Required => 1,
},
CountMin => 0,
CountMax => 20,
CountDefault => 0,
},
CountMin => 0,
CountMax => 20,
CountDefault => 0,




The last three lines of this part of the code cause the error. If I just could delete this passage everything would work again.

If anything isn't clear please ask. Then I try to describe th eproblem better. My english isn't very well.

How can I fix the problem?

Thank you for your help!
Donati168
Znuny newbie
Posts: 9
Joined: 26 May 2011, 08:29
Znuny Version: 3.0.4

Re: OTRS 3.0.9 ConfigItem crash

Post by Donati168 »

Hi, please log in the database,find a table configitem_definition, select ID to find your definition.

If you want to work again, delete it.
Post Reply