BUG 9023 "Knowledgetree and ProcessMaker show error to upload some..." SOLVED
- Problem running case with field file with property value "Input" in the Dynaform, generates the following error: "This row doesn't exist!" - Added the missing code in this section when the KnowledgeTree plugin is enabled.
This commit is contained in:
@@ -211,6 +211,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$oAppDocument->create($aFields);
|
$oAppDocument->create($aFields);
|
||||||
|
|
||||||
$iDocVersion = $oAppDocument->getDocVersion();
|
$iDocVersion = $oAppDocument->getDocVersion();
|
||||||
$sAppDocUid = $oAppDocument->getAppDocUid();
|
$sAppDocUid = $oAppDocument->getAppDocUid();
|
||||||
$aInfo = pathinfo($oAppDocument->getAppDocFilename());
|
$aInfo = pathinfo($oAppDocument->getAppDocFilename());
|
||||||
@@ -218,15 +219,26 @@ try {
|
|||||||
$sPathName = PATH_DOCUMENT . $_SESSION ['APPLICATION'] . PATH_SEP;
|
$sPathName = PATH_DOCUMENT . $_SESSION ['APPLICATION'] . PATH_SEP;
|
||||||
$sFileName = $sAppDocUid . '_'.$iDocVersion.'.' . $sExtension;
|
$sFileName = $sAppDocUid . '_'.$iDocVersion.'.' . $sExtension;
|
||||||
G::uploadFile ( $_FILES ['form'] ['tmp_name'] [$sFieldName], $sPathName, $sFileName );
|
G::uploadFile ( $_FILES ['form'] ['tmp_name'] [$sFieldName], $sPathName, $sFileName );
|
||||||
|
|
||||||
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
|
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
|
||||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||||
if ($oPluginRegistry->existsTrigger ( PM_UPLOAD_DOCUMENT ) && class_exists ( 'uploadDocumentData' )) {
|
if ($oPluginRegistry->existsTrigger(PM_UPLOAD_DOCUMENT) && class_exists("uploadDocumentData")) {
|
||||||
$documentData = new uploadDocumentData ( $_SESSION ['APPLICATION'], $_SESSION ['USER_LOGGED'], $sPathName . $sFileName, $aFields ['APP_DOC_FILENAME'], $sAppDocUid );
|
$triggerDetail = $oPluginRegistry->getTriggerInfo(PM_UPLOAD_DOCUMENT);
|
||||||
|
$documentData = new uploadDocumentData($_SESSION["APPLICATION"], $_SESSION["USER_LOGGED"], $sPathName . $sFileName, $aFields["APP_DOC_FILENAME"], $sAppDocUid, $iDocVersion);
|
||||||
$uploadReturn = $oPluginRegistry->executeTriggers(PM_UPLOAD_DOCUMENT, $documentData);
|
$uploadReturn = $oPluginRegistry->executeTriggers(PM_UPLOAD_DOCUMENT, $documentData);
|
||||||
|
|
||||||
if ($uploadReturn) {
|
if ($uploadReturn) {
|
||||||
$aFields['APP_DOC_PLUGIN']=$triggerDetail->sNamespace;
|
$aFields["APP_DOC_PLUGIN"] = $triggerDetail->sNamespace;
|
||||||
$oAppDocument1 = new AppDocument();
|
|
||||||
$oAppDocument1->update($aFields);
|
if (!isset($aFields["APP_DOC_UID"])) {
|
||||||
|
$aFields["APP_DOC_UID"] = $sAppDocUid;
|
||||||
|
}
|
||||||
|
if (!isset($aFields["DOC_VERSION"])) {
|
||||||
|
$aFields["DOC_VERSION"] = $iDocVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
$oAppDocument->update($aFields);
|
||||||
|
|
||||||
unlink($sPathName . $sFileName);
|
unlink($sPathName . $sFileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -270,7 +282,6 @@ try {
|
|||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher;
|
||||||
$aMessage = array();
|
$aMessage = array();
|
||||||
$aMessage['MESSAGE'] = $e->getMessage();
|
$aMessage['MESSAGE'] = $e->getMessage();
|
||||||
|
|||||||
Reference in New Issue
Block a user