omeka-s-modules / ExtractMetadata

Extract embedded metadata from files
GNU General Public License v3.0
1 stars 2 forks source link

Failed to open stream #3

Closed anders-naslund closed 2 years ago

anders-naslund commented 2 years ago

After installing this module the Omeka Admin site is no longer accessible and it only shows this error message:

Warning: require_once(/var/www/utv3.kulturhotell.se/web/modules/ExtractMetadata/vendor/autoload.php): failed to open stream: No such file or directory in /var/www/utv3.kulturhotell.se/web/modules/ExtractMetadata/Module.php on line 29

Fatal error: require_once(): Failed opening required '/var/www/utv3.kulturhotell.se/web/modules/ExtractMetadata/vendor/autoload.php' (include_path='.:') in /var/www/utv3.kulturhotell.se/web/modules/ExtractMetadata/Module.php on line 29

Looking at the module code it looks like to vendor folder and it's files are missing. Is this something you could look into?

Adjusting the path to "vendor/autload.php" on line 29 resolved the issue.

jimsafley commented 2 years ago

How did you install the module? I expect this to happen if you cloned the repository and did not run $ composer install. I recommend that you install the module using the ZIP, which includes all dependencies.

anders-naslund commented 2 years ago

Downloaded the zip, extracted and renamed the folder according to the instructions

anders-naslund commented 2 years ago

The issue is resolved by changing line 29 in Module.php from: require_once sprintf('%s/vendor/autoload.php', DIR); to: require_once sprintf('%s/../../vendor/autoload.php', DIR);

jimsafley commented 2 years ago

If you install the module from the provided ZIP file there should be no need to change the vendor path.

anders-naslund commented 2 years ago

Understood, but that was exactly what I did and I still needed to adjust the vendor path ... anyway it's working now and I know how to do it in future if the source is not fixed :-)