ericferon / glpi-archimap

GLPI plugin for drawing architecture maps (based on draw.io)
GNU General Public License v2.0
19 stars 10 forks source link

PHP Compile Error (64): require_once(): Failed opening required #55

Closed jcervantes-sipecom closed 2 years ago

jcervantes-sipecom commented 2 years ago

GLPI Version: 9.5.7 Plugin version: 3.2.4 (in GLPI it show as 3.2.3) and 3.2.2

I'm getting this error in the last both versions:

[2022-03-31 09:52:37] glpiphplog.WARNING:   *** PHP Warning (2): require_once(/var/www/html/glpi/plugins/archimap/drawio-integration/ext/js-fileexplorer/server-side-helpers/file_explorer_fs_helper.php): failed to open stream: No such file or directory in /var/www/html/glpi/plugins/archimap/inc/diagram.class.php at line 114
  Backtrace :
  plugins/archimap/inc/diagram.class.php:114         require_once()
  plugins/archimap/inc/diagram.class.php:59          PluginArchimapDiagram->showForm()
  inc/commonglpi.class.php:637                       PluginArchimapDiagram::displayTabContentForItem()
  ajax/common.tabs.php:106                           CommonGLPI::displayStandardTab()

[2022-03-31 09:52:37] glpiphplog.ALERT:   *** PHP Compile Error (64): require_once(): Failed opening required '/var/www/html/glpi/plugins/archimap/drawio-integration/ext/js-fileexplorer/server-side-helpers/file_explorer_fs_helper.php' (include_path='.:/usr/share/php') in /var/www/html/glpi/plugins/archimap/inc/diagram.class.php at line 114

And the screen stuck in blank:

image

For sure, that file doesn't exist:

/var/www/html/glpi/plugins/archimap/drawio-integration/ext/js-fileexplorer/server-side-helpers/file_explorer_fs_helper.php

ericferon commented 2 years ago

Hi, Indeed, I'm trying to solve a bug when downloading the plugin through the marketplace. To repair, you should download the plugin manually from github and reinstall at least the directory archimap/drawio-integration/ext/js-fileexplorer. K.r,

jcervantes-sipecom commented 2 years ago

Hi, maybe I didn't explain, actually I downloaded the last version plugin (3.2.3) from github, and installed from the conventional plugin folder.

But this /var/www/html/glpi/plugins/archimap/inc/diagram.class.php at line 114 it says:

require_once Plugin::getPhpDir("archimap")."/drawio-integration/ext/js-fileexplorer/server-side-helpers/file_explorer_fs_helper.php";

But this file doesn't exists, nor in any version mentioned befored, nor in the master branch:

ls archimap/drawio-integration/ext/js-fileexplorer/ file-explorer

ls archimap/drawio-integration/ext/js-fileexplorer/file-explorer/ file-explorer.css file-explorer.js

The folder server-side-helpers and its file: file_explorer_fs_helper.php, both doesn't exists in that path.

image

Neither in another path: find . -name "file_explorer_fs_helper.php" return empty

It's seen that from version: 3.2.0 this error happens:

*** PHP Compile Error (64): require_once(): Failed opening required '/var/www/html/test/plugins/archimap/drawio-integration/ext/js-fileexplorer/server-side-helpers/file_explorer_fs_helper.php' (include_path='.:/usr/share/php') in /var/www/html/test/plugins/archimap/inc/diagram.class.php at line 114

But I resolved it. What was what I did?

  1. I went to https://github.com/cubiclesoft/js-fileexplorer and download the master.zip
  2. Delete the folder: rm -rf archimap/drawio-integration/ext/js-fileexplorer
  3. Unzip the master.zip
  4. Move the folder unziped: mv js-fileexplorer-master/ archimap/drawio-integration/ext/js-fileexplorer

And now it's showing right: image