Menu

How to debug triggers?

2021-08-13
2021-11-02
  • Romano Trampus

    Romano Trampus - 2021-08-13

    I'm tryng to create a Trigger (and an Action) to send an email to staff
    when a new request is inserted by a caller using the standard portal. The
    email test runs fine, but I'm unable to catch the event. There is any way
    to debug triggers, i.e. understand which events are fired when a new
    request is inserted?

     
  • Romano Trampus

    Romano Trampus - 2021-08-14

    Found to set log_level_min to LogAPI::LEVEL_TRACE but no trace of notification come in log (or I'm looking at the wrong log, /var/www/html/log/error.log). I fond only:

    array (
      '$sObjectClass' => 'Incident',
      '$sTransactionId' => '8239-0nd6Rg',
      '$sTempId' => '8239-0nd6Rg',
      '$aInlineImagesId' => 
      array (
      ),
      '$sUser' => '8239',
      'HTTP_REFERER' => '(here is the url)',
    )
    
     
  • Pierre Goiffon

    Pierre Goiffon - 2021-11-02

    Hello,

    To understand what is triggered when you can take a look at the source code : search for \Trigger class children.
    But you can also see events attached to your object : if a trigger catch the action then an event will be attached to the object.

    Can you send your trigger configuration ?

     

Log in to post a comment.