Troubleshooting Trigger Failures - any suggestions


(Douglas (@finnatic at @waikato)) #1

I've wondering if any has a troubleshooting checklist for troubleshooting triggers - particularly those that interact with workflow?

 

I've been trying without success to setup a trigger to change the asset status on an asset under workflow. The conditions required were:

* After workflow approval

* the asset to be in the right tree location,

 

And the action was a simple - set the asset status to live.  The trigger (when enabled, and batched) would update the status of the parent asset (a standard page), but fail to make the content bodycopy div (and div content within) asset live - leaving it at approved to go live with the parent live.  There's a screen or so of errors, and I can extract others from the error_log in the system. 

 

Setting ignore permissions didn't seem to be the answer, and the suggested solutions in the error message:

 

"Live" is not a valid option for the "Content DIV XYZ" Bodycopy Div asset (#XYZ) in its current "Pending Approval" state.  This may be due to required metadata fields being empty, or permissions for the current user ... [SYS0250]

 

didn't seem applicable.


#2

Hey Douglas,

 

we don't have a trigger checklist =( but a good point that we should.

i'm just double checking your status change is on - safe edit approved so go live  then make live.

 

Ours work and  is a really simple workflow

 

The trigger creates a cron job immediately and makes the asset live when the cron runs next.


(Bart Banda) #3

You might have to add a condition to ensure the trigger only runs on page based assets, so add a condition for asset type and include the types you want it to run on, like page (with inherited type on) assets.