[Vtigercrm-developers] ModuleExport Action Returns Corrupted ZIP
mhadid
mustapha.hadeed at gmail.com
Mon Aug 20 09:14:11 GMT 2018
I've tried multiple ways to export modules in Vtiger 7.1.0 with no luck.
The exported file has a little size--around 10kb. Unzipping the file raises
a corruption error
Using built-in ModuleExport action
------------------------------------------------------------------
/vtigercrm/index.php?module=ModuleManager&parent=Settings&action=ModuleExport&mode=exportModule&forModule={ModuleName}
Using Vtiger_PackageExport
------------------------------------------------------------------
require_once('vtlib/Vtiger/Package.php');
require_once('vtlib/Vtiger/Module.php');
require_once('includes/Loader.php');
$module = Vtiger_Module_Model::getInstance($moduleName);
if ($module == false) {
echo "Module not found: $moduleName";
return;
} elseif (!$module->isExportable()) {
echo 'Module not exportable: $moduleName';
return;
}
$package = new Vtiger_PackageExport();
$package->export($module, 'test/vtlib', "$moduleName.zip", true); # also
tried setting the final argument to false to save it locally
Using Vtiger_Package (following Vtiger wiki
<http://community.vtiger.com/help/vtigercrm/developers/vtlib/package-export.html>
)
------------------------------------------------------------------
require_once('vtlib/Vtiger/Package.php');
require_once('vtlib/Vtiger/Module.php');
require_once('includes/Loader.php');
$module = Vtiger_Module::getInstance($moduleName);
if ($module == false) {
echo "Module not found: $moduleName";
return;
}
$package = new Vtiger_Package();
$package->export($module, 'test/vtlib', "$moduleName.zip", true); # also
tried setting the final argument to false to save it locally
Debugging Information
------------------------------------------------------------------
phpinfo: https://pastebin.com/raw/ndL2yYPC
<https://pastebin.com/raw/ndL2yYPC>
--
Sent from: http://vtiger-crm.2324883.n4.nabble.com/vtigercrm-developers-f4.html
More information about the vtigercrm-developers
mailing list