Closed moodyblue closed 2 years ago
I encountered some problems when I made evolve the plugin to the marketplace and GLPI version 10. One of the consequences was a blank screen. From my side, it is now solved in v3.2.4. Can you check whether it solves also your problem ? K.r,
I have too problem with blank screen when "Drawing pane" is clicked. GLPI version 9.5.7 and Diagrams version 3.2.4.
Uncaught TypeError: Cannot read properties of undefined (reading 'value')
at XMLHttpRequest.xhr.onreadystatechange (
So I removed archimap from plugins
folder and installed 3.2.4 from marketplace. Blank screen continues but with some variants:
1) If I specify the key name, as in the following screen Then Firefox gives this error 2) If I remove the key name, the Firefox error is different
Hi @zdenkor @moodyblue, I had the same issue: https://github.com/ericferon/glpi-archimap/issues/56
Could you try in the APP_TOKEN
token configuration cleaning the key
value?
Also as I said in my issue, you have to create an API KEY
Please have a look to https://github.com/ericferon/glpi-archimap/wiki/How-to-install-and-set-up-the-plugin. You have indeed to specify the APP_TOKEN entry in the plugin configuration, with an empty key and a value. K.r,
The problem continues even after replacing the marketplace version by the plugins version
Hi @moodyblue, It could be maybe something in your apache server, can you confirm that in any *.conf in /etc/apache2/sites-enabled/
(if it's Ubuntu) don't you have something like this:
<IfModule mod_headers.c>
Header set Content-Security-Policy "script-src 'strict-dynamic' 'nonce-rAnd0m123' 'unsafe-inline' http: https:; frame-ancestors; 'self';object-src 'none';base-uri 'none'; require-trusted-types-for 'script';"
Header set X-XSS-Protection "1; mode=block"
---> Header always append X-Frame-Options SAMEORIGIN
Header set X-Content-Type-Options nosniff
Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains"
</IfModule>
Thanks. I've gone through all .conf files, some of them load module mod_headers.so. but there is no IfModule making any reference to mod_headers
The problem is linked with CORS (the Archimap plugin is using the REST API of GLPI for some operations).
Personally, I added these lines to the conf file, to enable CORS :
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "GET, POST, OPTIONS, PUT, DELETE"
Header always set Access-Control-Allow-Credentials "true"
Header always set Access-Control-Allow-Headers "X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding, App-Token, Session-Token"
and I haven't any line mentioned by jcervantes-sipecom (with or without if) Header always append X-Frame-Options SAMEORIGIN K.r,
Thanks. I will try to enable CORS. It's a non-trivial setup, my server is a QNAP NAS running a proprietary firmware called QTS (based on Linux kernel 5.10.60). There are several Apache versions ported to this platform, I need to test which one supports CORS.
Maybe the cause is different. My gpli runs in port 4488 and apirest is http://192.168.130.210:4488/GLPI80/apirest.php/
In previous error messages looks like archimap is trying to use port 80 instead
Indeed, if you use another port, this is not included in the URL calling apirest. I added it (v3.2.5). K.r,
v3.2.5 puts the port incorrectly http://192.168.130.210/GLPI80:4488/apirest.php/initSession/
It should be http://192.168.130.210:4488/GLPI80/apirest.php/initSession/
Edit: I've tried with apache listening to port 80 and it works. But I would prefer to use port 4488 instead
Yes, the port was misplaced. Solved (I hope) with v3.2.6. K.r,
Solved with v3.2.6. Thank you very much.
GLPI 9.5.7 archimap 3.2.3 Apache/2.4.53 PHP 8.0.17 Firefox 98.0.2 (64-bit)
These are the errors when I press F12