Root cause: MediaExportFilesForm.php had a hardcoded require_once DRUPAL_ROOT . '/modules/media_export_files/vendor/pclzip/pclzip.lib.php' — it assumed the module sits directly under web/modules/, but it's actually installed under web/modules/contrib/media_export_files/ (as Composer-managed contrib modules are). The pclzip library was there all along; the path was just wrong.

Fix: Changed the include to __DIR__ . '/../../vendor/pclzip/pclzip.lib.php', which resolves relative to the form class's own location and works no matter where the module is installed.

Comments

couloir007 created an issue. See original summary.

couloir007’s picture

StatusFileSize
new2.09 KB

Also found that the export fatals with PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE (-20): Invalid type boolean. String expected for attribute 'PCLZIP_ATT_FILE_NAME' when
any file entity's underlying file is missing from disk — realpath() returns FALSE in that case and it's passed straight to PclZip. Updated patch below also skips
missing files (with a warning) instead of failing the whole export.