So, I ran into an issue where the workflow hangs or stalls and on Saving the record. User gets “Oops! Something went wrong” and Error Page. Luckily it saves most information.
The temporary fix is to go into the DB and delete the job - I have 2 separate workflows. (All I am trying to do is output “echo” text or combine text from different fields and fill out another field) no real calculation.
I am using the Projects Module - Run: “Only on Save” - Run On: “All records” Repeated Runs: “Checked”. No Conditions. Formula Parameters is: Account Name: {P0}-Client Job #: {P1} - Project Address: {P2}- Project Name: {P3}- Municipality: {P4}-Estimate #: {P5}-Project Number: {P6}
Do you see any characters that might cause the issue? If so is there a wrapper to echo without issue?
Thank You Bastian . It did work on many records, (with several parameters) but then started throwing an error.:
" This page isn’t working is currently unable to handle this request…HTTP ERROR 500"
We had done some troubleshooting. And the log file does mention something that looks relevant:
[15-Jun-2024 16:23:10 UTC] PHP Warning: implode(): Invalid arguments passed in /home/dbusr/stage4.testingdomain.com/modules/AOW_Actions/actions/actionSendEmail.php on line 508
[15-Jun-2024 16:23:10 UTC] PHP Warning: mysqli_real_escape_string() expects parameter 2 to be string, object given in /home/dbusr/stage4.testingdomain.com/include/database/MysqliManager.php on line 290
[15-Jun-2024 16:23:10 UTC] PHP Fatal error: Uncaught Error: Object of class Link2 could not be converted to string in /home/dbusr/stage4.testingdomain.com/data/SugarBean.php:4573
Stack trace:
#0 /home/dbusr/stage4.testingdomain.com/modules/Project/Project.php(486): SugarBean->retrieve(Object(Link2))
#1 /home/dbusr/stage4.testingdomain.com/modules/AOW_Actions/actions/actionComputeField.php(129): Project->save(false)
#2 /home/dbusr/stage4.testingdomain.com/modules/AOW_WorkFlow/AOW_WorkFlow.php(969): actionComputeField->run_action(Object(Project), Array, true)
#3 /home/dbusr/stage4.testingdomain.com/modules/AOW_WorkFlow/AOW_WorkFlow.php(229): AOW_WorkFlow->run_actions(Object(Project), true)
#4 /home/dbusr/stage4.testingdomain.com/include/utils/LogicHook.php(260): AOW_WorkFlow->run_bean_flows(Object(Project), 'after_save', '')
#5 /home/dbusr/stage4.testingdomain.com/include/utils/LogicHook.php(201): LogicHook->process_hooks(Array, 'after_save', '')
#6 /home/dbusr/stage4.dbusrngsolutions.c in /home/dbusr/stage4.testingdomain.com/data/SugarBean.php on line 4573
[15-Jun-2024 16:25:35 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; VIMultipleFields has a deprecated constructor in /home/dbusr/stage4.testingdomain.com/custom/include/VIMultipleFields/VIMultipleFields.php on line 19
[15-Jun-2024 16:25:36 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; VIMultipleFields has a deprecated constructor in /home/dbusr/stage4.testingdomain.com/custom/include/VIMultipleFields/VIMultipleFields.php on line 19
[15-Jun-2024 16:25:41 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; VIMultipleFields has a deprecated constructor in /home/dbusr/stage4.testingdomain.com/custom/include/VIMultipleFields/VIMultipleFields.php on line 19
[15-Jun-2024 16:25:42 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; VIMultipleFields has a deprecated constructor in /home/dbusr/stage4.testingdomain.com/custom/include/VIMultipleFields/VIMultipleFields.php on line 19
[15-Jun-2024 16:25:42 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; VIMultipleFields has a de
Specifically: [15-Jun-2024 16:23:10 UTC] PHP Warning: mysqli_real_escape_string() expects parameter 2 to be string, object given in /home/dbusr/stage4.testingdomain.com/include/database/MysqliManager.php on line 290 [15-Jun-2024 16:23:10 UTC] PHP Fatal error: Uncaught Error: Object of class Link2 could not be converted to string in /home/dbusr/stage4.testingdomain.com/data/SugarBean.php:4573 Stack trace:
So maybe a strange character? Not sure really, as it worked with many parameters, but now even 1 param : {P0} will get the error.
@dwaynecasey can you try adding a project template (anything, even with at test task in it) to the project that’s causing the 500 error, then re-save and see if it works with your existing workflow. That’s the just of bug and workaround.
@dwaynecasey thinking more about this, why fight the bug? This is an easy before save hook to write and it will work 100% of the time. Just avoid the problem all together.