Questions and discussion about using ProcessMaker: user interface, running cases & functionality
By qooxoo
#813380
Hi all:
I met a problem Unable to solve

error meaasge:
TCPDF ERROR: [Image] Unable to get image: /opt/processmaker/apps/processmaker/htdocs/shared/sites/workflow/reports/cache/img_UEvJWo

please help me thanks!
#814308
Sorry to hijack the thread. I am having this problem too, but after a few output document generation the problem comes up again. Do we have to clear cache every day? I do not want this to happen when we go live with the process as it involves external parties and the process stops as soon as the output document is an error.

Thanks
#814345
This error should not happen. I never heard of it before qooxoo reported it. What version of PM are you using? Operating system? Bitnami or manual install?

PS: If you find that it keeps occurring, you can work around it by creating a cron job in Linux or a Scheduled Task in Windows that periodically deletes the compiled cache. In Linux, the script file would be:
Code: Select all
rm -rf /opt/processmaker/apps/processmaker/htdocs/shared/sites/workflow/reports/cache/* 
#814413
I've attached my file so that you can maybe trouble shoot if you have the time. I'm not sure whether clearing cache constantly (maybe every 5 minutes) is a good idea because it happens quite frequently.

Thanks :)
Last edited by PipSqueak on Sun May 13, 2018 8:25 pm, edited 1 time in total.
#814422
I wonder if this error isn't being caused by trying to access this image file in the Output Document template:
Code: Select all
<img align="right" src="http://processmaker/sysworkflow/en/freo/setup/showLogoFile.php?id=aW1nX2xvZ28ucG5n" /> 
If a problem occurs executing setup/showLogoFile.php then you will have an error.

Try placing your image file in the Public files of a process (you can access those files from any process). Then use a URL like this in your Output Document template:
Code: Select all
<img align="right" src="http://processmaker/sysworkflow/en/freo/1478665105ad7fdbe42dc74033733939/myLogo.jpg" /> 
#814439
If a Public File, .png should work the same as .jpg.

If you enter the URL in the web browser address bar, does it display the image correctly?

Try deleting all the cache files.

The public files are accessed through redirection, so maybe that is causing problems. Do you have another place to store the image file which is publicly accessible via the internet? If so, try using the other location.

Are you using https? Maybe the Output Document generator isn't able to connect via ssl/tls.

If nothing seems to solve the problem, then convert your image to Base64 code and add that code to the HTML code in your template. See:
https://hreftools.com/image-to-base64
http://www.techerator.com/2011/12/how-t ... your-html/

If you figure out what was the problem, please post what solved your problem to help others.
#814711
Hi Amos,

I really can't figure out why I keep getting this error. I had changed it to base64 code and it still gives me the same error. This really gives me the jitters because the whole process stops when this error is met and there is no way to go back to the previous or next task - it just throws the whole case out the window. Any other pointers please? :(

I've changed the img file path to
1) public files
2) direct the path to the company's website's logo
3) base64
4) changed to jpg or png
5) removed the height & width html tags
6) adjusted the width/height of the image in the image editor

and I keep running into this error. I have 4 output documents generating the logo at different tasks or triggers - the error happens randomly but frequently.
#814721
When you embed the image as Base64 code in the HTML, are you still seeing this kind of error message:
TCPDF ERROR: [Image] Unable to get image: /opt/processmaker/apps/processmaker/htdocs/shared/sites/workflow/reports/cache/img_UEvJWo

or are you seeing something different?

Edit workflow/engine/classes/model/OutputDocument.php, line 528 and change from:
Code: Select all
     public function generate($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape = false, $sTypeDocToGener = 'BOTH', $aProperties = array())
    {
        if (($sUID != '') && is_array($aFields) && ($sPath != '')) {
to:
Code: Select all
     public function generate($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape = false, $sTypeDocToGener = 'BOTH', $aProperties = array())
    {
        system("rm -rf /opt/processmaker/apps/processmaker/htdocs/shared/sites/".SYS_SYS."/reports/cache/*");
        if (($sUID != '') && is_array($aFields) && ($sPath != '')) {
(Change the path to match your system.)
#814723
I had done some changes to the trigger and I think it is this code in the trigger that gives it an error, any tips on optimising it?
Code: Select all
//Update information
$sqlUdata = "UPDATE PMT_CUSTOMER_CREDIT_APPLICATION SET
STATUS = 'Case Closed'
WHERE COMPANYNAME_LABEL = '".@@companyName."'";
executeQuery($sqlUdata);	
This is displayed after
Code: Select all
if(@@approveInformation=='Case Closed'){

//Generate Information Not Received Letter
$outDocId = '6477745535aeaa556730a09047032322';
PMFGenerateOutputDocument($outDocId);
$sqlScarta = "SELECT AD.APP_DOC_UID, C.CON_VALUE, AD.DOC_VERSION
FROM APP_DOCUMENT AD, CONTENT C 
WHERE AD.APP_UID = '".@@APPLICATION."' 
AND AD.DOC_UID = '".$outDocId."' 
AND AD.APP_DOC_UID = C.CON_ID 
AND C.CON_CATEGORY = 'APP_DOC_FILENAME' 
AND AD.DOC_VERSION = C.CON_PARENT
ORDER BY AD.DOC_VERSION DESC";
$result = executeQuery($sqlScarta);
$docId = $result[1]['APP_DOC_UID'];
$docVr = $result[1]['DOC_VERSION'];

@@NoInfoLetter = $httpServer.$_SERVER['HTTP_HOST']."/sys".SYS_SYS."/".SYS_LANG."/".SYS_SKIN."/cases/cases_ShowOutputDocument?a=".$docId."&v=".$docVr."&ext=pdf";


//Get Information Not Received Letter
$outDocId = '6477745535aeaa556730a09047032322';
$sqlSdoc = "SELECT D.APP_DOC_UID, D.DOC_VERSION, C.CON_VALUE
FROM APP_DOCUMENT D, CONTENT C
WHERE D.APP_UID = '".@@APPLICATION."' 
AND D.DOC_UID = '".$outDocId."'
AND D.APP_DOC_UID = C.CON_ID
AND C.CON_CATEGORY = 'APP_DOC_FILENAME'
ORDER BY D.DOC_VERSION DESC";
$result = executeQuery($sqlSdoc);
$docName = $result[1]['CON_VALUE'];
$docId = $result[1]['APP_DOC_UID'];
$docVr = $result[1]['DOC_VERSION'];
$nameDocument = $docId."_".$docVr.".pdf";

$dir1 = substr(@@APPLICATION, 0, 3);
$dir2 = substr(@@APPLICATION, 3, 3);
$dir3 = substr(@@APPLICATION, 6, 3);
$dir4 = substr(@@APPLICATION, 9, 23);

$outputInfoNotReceived = PATH_DOCUMENT . $dir1."/".$dir2."/".$dir3."/".$dir4."/outdocs/".$nameDocument;
$aAttachFiles[$docName.'.pdf'] = $outputInfoNotReceived;


//Send email to employee
$from = "accounts@company.com";
$to = @@companyEmail;
$subject = "APPLICATION FOR CREDIT ACCOUNT ";
PMFSendMessage(@@APPLICATION, $from, $to, ' ', ' ', $subject, 'IncompleteInformation.html', array(), $aAttachFiles);

//Update information
$sqlUdata = "UPDATE PMT_CUSTOMER_CREDIT_APPLICATION SET
STATUS = 'Case Closed'
WHERE COMPANYNAME_LABEL = '".@@companyName."'";
executeQuery($sqlUdata);	

}
#814724
Actually, I did a few more tests and it seems like it has nothing to do with cache clearing or the code above. I'm now back to square one and not knowing what is causing it.

Would you mind having a look to see if any of the triggers are causing it? I'd appreciate a 2nd pair of eyes.

Thanks and regards
#829969
Hello guys, I have the same problem and I do all the things that you all suggested here but I have the same error:

TCPDF ERROR: [Image] Unable to get image: \\"https://bpm.asti.dost.gov.ph/sysdostasti/en/neoclassic/cases/cases_ShowDocument?a=\\"

I can't display the image in the output document.
My trigger code is like this:
--------------------------------------------------------------------------------------------------------------------------------------------------
@@imageSign = '';

if (!empty(@@imagePath) and @@imagePath != '[]') {
$fileId = json_decode(@@imagePath)[0];
$g = new G();
$cURL = ($g->is_https() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] .
'/sys'.@@SYS_SYS.'/'.@@SYS_LANG.'/'.@@SYS_SKIN. '/cases/cases_ShowDocument?a=';

@@imageSign = '<img style="max-width: 400px;" src="'. $cURL . $fileId . '">';
}
----------------------------------------------------------------------------------------------------------------------------------------------------------------
And I put the parameter @@imageSign in my output document.

I hope you can help me resolve this problem. I'm using Process Maker Ver. 3.3.2 - Community

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]