You are not logged in.
hi ..
my name is csyeow , new to GLPI . i try to install and play around GLPI but i facing a problem using custom field on components .
i follow the instruction to install ocs + GLPI http://www.glpi-project.org/forum/index.php
os : RHEL 5.4 32bit
GLPI version : 0.72.4 ( rpm version from EPEL )
custom field version : 1.1.7b
i try to follow the instruction to install custom field , i patch the custom field by glpi-0.72.patch and components.patch .b4 i patch , i change the /usr/share/glpi/plugins/customfields/setup. php from define('CUSTOMFIELDS_GLPI_PATCH_APPLIED', true); to define('CUSTOMFIELDS_GLPI_PATCH_APPLIED', false);
the custom field is working fine for me on computer table , monitor table, contract table , software table, but not in components tables
my problem is when i add custom field on component, the custom field table appear on component ( main / custom field / all ) after create component record eg- RAM , system board , the record does not appear , the web page http://20.195.102.100/glpi/front/device … ice_type=1 (setup > component > system board > ) show "During loading ..." below the update and delete button .
the step i taken to create custom field record as below :
plugins > custom field > RAM >
label : product number system name: type: general [ add ]
after that i enable the plugin .
i do the same step on computers , the record appear and i able to enter a data to this record.
plugins > custom field > computers >
label : product number system name: type: general [ add ]
hope some one can help me rectified the problem ..
thanks
Offline
If you don't need custom fields on components, I don't recommend using them. GLPI just isn't set up well for plugins to work together with individual components. That is why the complex components patch is necessary--and then there are still some limitations.
But you may need custom field on components, like we did...
The "During loading" message would indicate that the components patch was not completely successful. The patch was made for GLPI 0.72.21, so something probably changed and made it incompatible with 0.72.4. I don't have time to look at it right now, but you could read through the components patch and try to apply it manually.
Offline
hi ..
i try to manual patch , still not successful , so i try to uninstall glpi 0.72.4 ( rpm package ) & reinstall GLPI 0.72.21 ( tar.gz) , unzip the tar ball file and pull to /var/www/html/ , and try to apply the patch ( i backup the file b4 apply the patch file ) , i only apply glpi-0.72.patch and components.patch , but still not successfully , next step try to delete the file and manually do the patch , still not successfully.
then i found the error on /var/log/httpd/error_log :
[error] [client xxx.xxx.xxx.xxx] script '/var/www/html/glpi/ajax/device.tabs.php' not found or unable to stat, referer: http://xxx.xxx.xxx.xxx/glpi/front/devic … ice_type=1
then i cant find the file on /var/www/html/glpi/ajax/device.tabs.php ( 0.72.21 glpi version ) . i try to download glpi 0.72.4.tar.gz , unzip ,still cant find the file device.tabs.php
anyway --> many thanks to rfoster who help me a lot .
i will still use custom field but not in component .
Offline
Thank you for tracing the problem down. Since that file isn't in the customfields directory I forgot about it, and did not include it in the package. I'll fix that and upload a new version soon. For now you can create ajax/device.tabs.php and put this in it:
<?php
define('GLPI_ROOT', '..');
include (GLPI_ROOT . "/inc/includes.php");
header("Content-Type: text/html; charset=UTF-8");
header_nocache();
if(isset($_POST["ID"]) && $_POST['ID']>0) {
switch($_POST['glpi_tab']){
default :
if (!displayPluginAction($_POST['device_type']+500,$_POST["ID"],$_POST['glpi_tab'])){
}
break;
}
}
ajaxFooter();
?>
This might even work with 0.72.4?
EDIT: Fixed the name of the file.
Last edited by rfoster (2010-08-17 08:59:19)
Offline
hi .. rfoster
thanks for ur help ,, now the custom field is working now ..tq ..
sorry for delay reply ....
have a nice day & all the best ...
Offline
I did what rfoster wrote (also used patches), but when I try to see new custom fields for some of the components in Computers/Components I can now see tabs Main, Custom Fields and All, but when I click on each of them, it writes me, that it's loading and nothing happens?
This is Apache error log:
...script 'C:/wamp/www/glpi/ajax/device.tabs.php' not found or unable to stat, referer: http://localhost/glpi/front/device.form.php?ID=1&device_type=2&referer=http://localhost/glpi/front/device.php?device_type=2
OK... I was able to resolve the problem... I have 'devices.tabs.php' not 'device.tabs.php'! It's working now, thanks a lot!
Last edited by ursyy25 (2010-07-09 11:08:45)
Offline