When you installl the module via composer and you go to admin/config, it gives you a warning of file not found.
I am using blt (drupalvm) file structure and this patch fixes it.

When visiting the site status report (/admin/reports/status) I see the following warning:

Warning: file_get_contents(/var/www/docroot/libraries/PHPExcel/changelog.txt): failed to open stream: No such file or directory in _vbo_export_load_library() (line 87 of modules/contrib/vbo_export/vbo_export.module).

Comments

fuan2008 created an issue. See original summary.

graber’s picture

Not a good way, use something like:

$reflector = new ReflectionClass('Foo');
$path = $reflector->getFileName();

if the class exists.

Thanks!

graber’s picture

Status: Active » Needs work
benjifisher’s picture

Assigned: fuan2008 » Unassigned
Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new763 bytes

The suggestion in #2 only works if the class has already been auto-loaded. In this case, and if $details is TRUE, then we need to set $path correctly in order to find changelog.txt. That is what this patch does.

I am also pasting the warning message into the issue summary in order to help anyone who searches for that message.

This works for me when the site is installed in a subdirectory (docroot/) and the library is installed with composer under vendor/ (and these two subdirectories are siblings).

benjifisher’s picture

Title: Not phpexcel Class found warning when is on vendor (PATCH) » Not phpexcel Class found warning when is on vendor
Issue tags: -Warning file not found exception in /admin/config for Class phpExcel

  • Graber committed f02287f on 8.x-2.x authored by benjifisher
    Issue #2999739 by fuan2008, benjifisher: Not phpexcel Class found...
graber’s picture

Version: 8.x-2.0 » 8.x-2.x-dev
Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.