Menu

#522 500 Error When Rejecting or Approving Documents

6.0.17
open
None
bug
2022-02-17
2022-01-25
No

500 Error When Rejecting or Approving Documents

PHP Fatal error: Uncaught Error: Call to a member function getWorkflow() on null in /var/www/html/dms/inc/inc.ClassNotificationService.php:1296\nStack trace:\n#0 /var/www/html/dms/op/op.TriggerWorkflow.php(94): SeedDMS_NotificationService->sendTriggerWorkflowTransitionMail(Object(SeedDMS_Core_DocumentContent), Object(SeedDMS_Core_User), NULL)\n#1 {main}\n thrown in /var/www/html/dms/inc/inc.ClassNotificationService.php on line 1296, referer: https://[platformname]/dms/out/out.TriggerWorkflow.php?documentid=52&version=3&transition=37

Created a simple workflow
Updated -> Under Review -> Approve Or Rejected.

Once a document is approved or rejected, i will get a 500 error page with the error above.

From what i looked at in the code, line 84 of op/op.TriggerWorkflow.php below will send FALSE if $wkflog[0] doesnt exist which doenst once a workflow has been updated. Once a document is reviewed and going to the next step where a document will be rejected or aprroved, i will get the 500 error above.

$notifier->sendTriggerWorkflowTransitionMail($version, $user, $wkflog ? $wkflog[0] : false);

Discussion

  • M Faiz

    M Faiz - 2022-01-26

    We are having the same issue as we deployed the 6.0.17 version on Cent OS 7
    when we execute a simple workflow it shows same 500 error on exit and still completes the workflow, relising the document but coment s page is skipped.
    Please do share solution.

     
  • M Faiz

    M Faiz - 2022-01-28

    We have installed Seeddms on Centos 7 with PHP 7.4.27 and there are no missing workflows but as we complete the workflow it gives followin error on last action

     
  • M Faiz

    M Faiz - 2022-02-02

    Please share a response .....

     
  • Uwe Steinmann

    Uwe Steinmann - 2022-02-04

    I'll look into it, but I'm currently too busy with other stuff

     
  • Uwe Steinmann

    Uwe Steinmann - 2022-02-11

    Here is a fix. Replace

    $wkflog = $version->getWorkflowLog($transition);
    $notifier->sendTriggerWorkflowTransitionMail($version, $user, $wkflog ? $wkflog[0] : false);
    

    with

    $wkflogs = $version->getWorkflowLog($transition);
    $wkflog = array_pop($wkflogs);
    $notifier->sendTriggerWorkflowTransitionMail($version, $user, $wkflog ? $wkflog[0] : false);
    

    in op/op.TriggerWorkflow.php

     
  • M Faiz

    M Faiz - 2022-02-11

    Applied the fix but same result

     
  • M Faiz

    M Faiz - 2022-02-15
    If we inspect Browser this message is shown in console
    
    This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”.                  op.TriggerWorkflow.php
    
     
  • Uwe Steinmann

    Uwe Steinmann - 2022-02-16

    Does this happen for any page?

     
  • M Faiz

    M Faiz - 2022-02-17

    when a workflow ends a white page appears and if we inspect the page the error is shown

     
  • yusree rusli

    yusree rusli - 2022-02-17

    For me, this happens when a workflow ends (approve or reject document). If i go back to the document, i can see that the document is approved/rejected.

     
  • M Faiz

    M Faiz - 2022-02-17

    Dear Yusree the is our case. we applied the fix but did not resolve.

     
  • M Faiz

    M Faiz - 2022-02-17

    Dear Yusree the is our case. we applied the fix but did not resolve.

     

Log in to post a comment.