I created a simple DigitalCertificate class on my workstation installation (Windows 7 running WAMP) and it worked fine.
When I moved the extension containing the class to my test server (Linux), I ran the Setup which worked fine, but when I went to the Configuration Management Overview, where the DigitalCertificate Class should be there was:
Unknown class 'DigitalCertificate'
it was plain text (non-hyperlink). I ran the setup again several times and still got the same.
Looking at the file structure on the server I noticed that the setup had created a "copy" of the model file in the ENV-PRODUCTION folder, only with UPPERCASE letters.i.e. my extension was called 'add-cmdb-objects' and the original model file was 'model.add-cmdb-objects.php' but the Setup created a 'model.add-CMDB-objects.php' file, with the only differences being the case in the actual filename and the generation date in the comment. It almost seems like the setup ran the toolkit to create the file.
I may try to install the extension in a different Windows installation to see if it reproduces the error.
Also:
The correspoding Table in the Databse was NOT created either so it looks like something went wrong when Setip parsed the class somehow.
Any ideas?
Thank you in advance!
Marco
Last edit: Marco Lima 2015-10-05
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Maybe the error is in file type (utf-8, iso....) try save your files with UTF-8 codification, change the permissions after copy your files to linux and review the class files in linux to double check before running setup again.
Run the toolkit to.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I double checked the encoding and it was all utf-8. The permissions seemed okay as well.
I did perform the following test:
Added the Add-Sample-Class (adds monitor) from the Itop Wiki tutorial and ran Setup. Worked. Class was added.
Added the actual "code" for my my class (including menu, user rights, etc.) to the Add-Sample-Class XML file and ran the Toolkit. The Toolkit detected the necessary database changes and after I updated the code and db, everything worked and the class was there in the overview.
This at least let me get what I needed into my test server so it can be reviewed by the powers that be.
What I find curious is that before I did this "workaround", I was running the Toolkit on the installation and deleting the duplicate file, renaming, etc., the impression I got was that the system simply wasn't parsing the XML definition, (it wouldn't detect the necessary changed to be done in the database like create table and add columns) yet it still generated the corresponding PHP file (not database though). Made me wonder if perhaps I had somehow coded something incorrectly.
Really sounds like some kind of bug, especially since copy/pasting the exact code into another extension and running the toolkit made it work just fine.
I greatly appreciate the input though.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I created a simple DigitalCertificate class on my workstation installation (Windows 7 running WAMP) and it worked fine.
When I moved the extension containing the class to my test server (Linux), I ran the Setup which worked fine, but when I went to the Configuration Management Overview, where the DigitalCertificate Class should be there was:
Unknown class 'DigitalCertificate'
it was plain text (non-hyperlink). I ran the setup again several times and still got the same.
Looking at the file structure on the server I noticed that the setup had created a "copy" of the model file in the ENV-PRODUCTION folder, only with UPPERCASE letters.i.e. my extension was called 'add-cmdb-objects' and the original model file was 'model.add-cmdb-objects.php' but the Setup created a 'model.add-CMDB-objects.php' file, with the only differences being the case in the actual filename and the generation date in the comment. It almost seems like the setup ran the toolkit to create the file.
I may try to install the extension in a different Windows installation to see if it reproduces the error.
Also:
The correspoding Table in the Databse was NOT created either so it looks like something went wrong when Setip parsed the class somehow.
Any ideas?
Thank you in advance!
Marco
Last edit: Marco Lima 2015-10-05
Oh and I'm using 2.1 in all instances! And I just tested it on a second Windows installation of Itop and the extension installed just fine.
Last edit: Marco Lima 2015-10-05
Maybe the error is in file type (utf-8, iso....) try save your files with UTF-8 codification, change the permissions after copy your files to linux and review the class files in linux to double check before running setup again.
Run the toolkit to.
Thanks for the reply Thiago!
I double checked the encoding and it was all utf-8. The permissions seemed okay as well.
I did perform the following test:
Added the Add-Sample-Class (adds monitor) from the Itop Wiki tutorial and ran Setup. Worked. Class was added.
Added the actual "code" for my my class (including menu, user rights, etc.) to the Add-Sample-Class XML file and ran the Toolkit. The Toolkit detected the necessary database changes and after I updated the code and db, everything worked and the class was there in the overview.
This at least let me get what I needed into my test server so it can be reviewed by the powers that be.
What I find curious is that before I did this "workaround", I was running the Toolkit on the installation and deleting the duplicate file, renaming, etc., the impression I got was that the system simply wasn't parsing the XML definition, (it wouldn't detect the necessary changed to be done in the database like create table and add columns) yet it still generated the corresponding PHP file (not database though). Made me wonder if perhaps I had somehow coded something incorrectly.
Really sounds like some kind of bug, especially since copy/pasting the exact code into another extension and running the toolkit made it work just fine.
I greatly appreciate the input though.