You are not logged in.
Upgrading Generic Object to a new version causes added objects to be undisplayed and replaced with a horizontal line, it looks like a problem with locales files or custom fields file - the same files worked in earlier versions for 2 years with all updates in this time without a problem. After the last update, access to the objects disappeared. The same thing happened on several different installations after upgrade plugin generic object to last version.
My fields and locale files:
field.constant.php
<?php
global $GO_FIELDS, $LANG;
$GO_FIELDS['idestils']['name'] = $LANG['genericobject']['globalfields'][1];
// 'id estils';
$GO_FIELDS['idestils']['input_type'] = 'text';
$GO_FIELDS['inventory_date']['name'] = $LANG['genericobject']['globalfields'][2];
// 'Inventory date';
$GO_FIELDS['inventory_date']['input_type'] = 'datetime';
$GO_FIELDS['courier_id']['name'] = $LANG['genericobject']['globalfields'][3];
// 'Courier ID';
$GO_FIELDS['courier_id']['input_type'] = 'text';
$GO_FIELDS['data_courier_issuance']['name'] = $LANG['genericobject']['globalfields'][4];
// 'Date issuance';
$GO_FIELDS['data_courier_issuance']['input_type'] = 'datetime';
$GO_FIELDS['data_courier_return']['name'] = $LANG['genericobject']['globalfields'][5];
// 'Date return';
$GO_FIELDS['data_courier_return']['input_type'] = 'datetime';
$GO_FIELDS['lease_start_date']['name'] = $LANG['genericobject']['globalfields'][6];
// 'Lease start date';
$GO_FIELDS['lease_start_date']['input_type'] = 'datetime';
$GO_FIELDS['lease_end_date']['name'] = $LANG['genericobject']['globalfields'][7];
// 'Lease end date';
$GO_FIELDS['lease_end_date']['input_type'] = 'datetime';
$GO_FIELDS['users_id_owners_id']['name'] = $LANG['genericobject']['globalfields'][8];
// 'Owner';
$GO_FIELDS['users_id_owners_id']['input_type'] = 'dropdown';
$GO_FIELDS['plugin_genericobject_propertytypes_id']['name'] = $LANG['genericobject']['globalfields'][9];
// 'Property type';
$GO_FIELDS['plugin_genericobject_propertytypes_id']['field'] = 'property type';
$GO_FIELDS['plugin_genericobject_propertytypes_id']['input_type'] = 'dropdown';
$GO_FIELDS['jira_url']['name'] = $LANG['genericobject']['globalfields'][10];
// 'jira url';
$GO_FIELDS['jira_url']['field'] = 'jira url';
$GO_FIELDS['jira_url']['input_type'] = 'text';
$GO_FIELDS['jira_url']['datatype'] = 'weblink';
$GO_FIELDS['warranty_expiry_date']['name'] = $LANG['genericobject']['globalfields'][11];
// 'Warranty expiry date';
$GO_FIELDS['warranty_expiry_date']['input_type'] = 'datetime';
$GO_FIELDS['plugin_genericobject_carriertaxids_id']['name'] = $LANG['genericobject']['globalfields'][12];
// 'Carrier Tax ID';
$GO_FIELDS['plugin_genericobject_carriertaxids_id']['field'] = 'carrier tax id';
$GO_FIELDS['plugin_genericobject_carriertaxids_id']['input_type'] = 'dropdown';
$GO_FIELDS['plugin_genericobject_carriernames_id']['name'] = $LANG['genericobject']['globalfields'][13];
// 'Carrier Name';
$GO_FIELDS['plugin_genericobject_carriernames_id']['field'] = 'carrier name';
$GO_FIELDS['plugin_genericobject_carriernames_id']['input_type'] = 'dropdown';
?>
field.en_US.php
<?php
// Fields
$LANG['genericobject']['globalfields'][1]="Estils ID";
$LANG['genericobject']['globalfields'][2]="Inventory date";
$LANG['genericobject']['globalfields'][3]="Courier ID";
$LANG['genericobject']['globalfields'][4]="Date issuance";
$LANG['genericobject']['globalfields'][5]="Date return";
$LANG['genericobject']['globalfields'][6]="Lease start date";
$LANG['genericobject']['globalfields'][7]="Lease end date";
$LANG['genericobject']['globalfields'][8]="Owner";
$LANG['genericobject']['globalfields'][9]="Property type";
$LANG['genericobject']['globalfields'][10]="jira url";
$LANG['genericobject']['globalfields'][11]="Warranty expiry date";
$LANG['genericobject']['globalfields'][12]="Carrier Tax ID";
$LANG['genericobject']['globalfields'][13]="Carrier Name";
In Debug mode:
PHP Warning (2): Undefined array key "genericobject" in /var/www/files/_plugins/genericobject/fields/field.constant.php at line 4
PHP Warning (2): Trying to access array offset on value of type null in /var/www/files/_plugins/genericobject/fields/field.constant.php at line 4
PHP Warning (2): Trying to access array offset on value of type null in /var/www/files/_plugins/genericobject/fields/field.constant.php at line 4
PHP Warning (2): Undefined array key "genericobject" in /var/www/files/_plugins/genericobject/fields/field.constant.php at line 8
PHP Warning (2): Trying to access array offset on value of type null in /var/www/files/_plugins/genericobject/fields/field.constant.php at line 8
PHP Warning (2): Trying to access array offset on value of type null in /var/www/files/_plugins/genericobject/fields/field.constant.php at line 8
PHP Warning (2): Undefined array key "genericobject" in /var/www/files/_plugins/genericobject/fields/field.constant.php at line 12
....
The same problem here:
forum.glpi-project.org/viewtopic.php?id=289750
Last edited by wolvverinemp (2024-05-27 23:52:52)
Offline