Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: amosbatto

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By jayandrewryan
#790187
After upgrading from 2.5.1 to 3.0 we have had some odd issues. This one has been a bit of a pain the past few days and I'm hoping someone can help me out.

When going to Advanced Search and searching for a case #, if the Current User is [UNASSIGNED] because it is in a task that is set to Self Service, clicking open on the case comes up with the error:

row '' in table USER doesn't exist!

There are also two alerts (javascript popup)
1) cases_Resume
2) cases_Resume_Current_Task

It seems to be getting the USR_UID from the current task and attempting to get data about the user from the USER table before displaying the case information. Unfortunately, as there is no user assigned, that is not possible.

Does anyone have an idea on the best way to handle this?
#790188
I found it:

[‎4/‎6/‎2017 2:04 PM] Ryan, Jay:
i figured out how to fix the
row '' in table USER doesn't exist!
error
In /opt/processmaker/workflow/engine/methods/cases/cases_Resume.php
I need to modify the file to look like this at line 285
[‎4/‎6/‎2017 2:05 PM] Ryan, Jay:
Code: Select all
      $FieldsPar['USR_UID'] = $row['USR_UID'];

        // JAR ADDED to prevent "row '' in table USER doesn't exist!" error

        if ($FieldsPar['USR_UID'] == '') {

                $aUser['USR_FULLNAME'] = "Unassigned";
        } else {

                $aUser = $objUser->loadDetails ($row['USR_UID']);

        }

      $FieldsPar['CURRENT_USER'] = $aUser['USR_FULLNAME']; 
Then cases that are currently unassigned open with no errors

Posting in case someone else needs it.
User avatar
By amosbatto
#790189
Glad you found the problem.

Here is the corresponding code in PM 3.2 (the next version of PM):
Code: Select all
      $FieldsPar['USR_UID'] = $row['USR_UID'];
      if(isset($row['USR_UID']) && !empty($row['USR_UID'])) {
        $aUser = $objUser->loadDetails ($row['USR_UID']);
        $FieldsPar['CURRENT_USER'] = $aUser['USR_FULLNAME'];
      } 
It looks like the Dev team already fixed this for the next version of PM. Which version of PM are you using?

As you have got seen that after every single updat[…]

issue with processmaker 3.2

Hello! The solution to your question is the foll[…]

BPMN project disappeared

Hi Alex! , maybe you forgot to save your process[…]

mcrypt extension is deprecated!

Hello Ehsan! If you did not find the mcrypt ext[…]