Trigger failure

Hi ,


I have added a trigger with the following settings:



Event: Before Asset Deleted

Conditions: Asset is of type: Link

Actions: Remove Web Path: Delete all webpaths



When I tried to delete a Link Asset, the trigger is failing. The error message does not explain why. The error log entries are:


    
    [2011-03-03 10:24:14][133963:Martin Butt][1024:mysource notice][R] (/core/include/locale_manager.inc:504) - Trigger Action:trigger_action_remove_web_path Failed [CORE0135]
    [2011-03-03 10:24:14][133963:Martin Butt][512:mysource warning][R] (/core/include/locale_manager.inc:504) - FAILURE: Trigger "Clear Web Path" Trigger# 14), Event "trigger_event_before_asset_deleted" broadcast by "Painters" (Id# 153998) [CORE0127]
    [2011-03-03 10:24:15][133963:Martin Butt][1024:mysource notice][R] (:) - The Squiz Server reset the running mode to WEB for User ID #133963 and Job hipo_job_create_links-860ebfca1e0c85306248982ba5953b7d


Is there any way to find out why the trigger failed?

Regards,
Martin

Try increasing the verbosity of your logging to see if more information is presented

[quote]
Try increasing the verbosity of your logging to see if more information is presented

[/quote]



How do I do that?

Go to System Configuration (the key icon in the top right).


Under the section "Error/Debug Settings" you should see options to show more details.

[quote]
Hi ,



I have added a trigger with the following settings:



Event: Before Asset Deleted

Conditions: Asset is of type: Link

Actions: Remove Web Path: Delete all webpaths



When I tried to delete a Link Asset, the trigger is failing. The error message does not explain why. The error log entries are:


    
    [2011-03-03 10:24:14][133963:Martin Butt][1024:mysource notice][R] (/core/include/locale_manager.inc:504) - Trigger Action:trigger_action_remove_web_path Failed [CORE0135]
    [2011-03-03 10:24:14][133963:Martin Butt][512:mysource warning][R] (/core/include/locale_manager.inc:504) - FAILURE: Trigger "Clear Web Path" Trigger# 14), Event "trigger_event_before_asset_deleted" broadcast by "Painters" (Id# 153998) [CORE0127]
    [2011-03-03 10:24:15][133963:Martin Butt][1024:mysource notice][R] (:) - The Squiz Server reset the running mode to WEB for User ID #133963 and Job hipo_job_create_links-860ebfca1e0c85306248982ba5953b7d


Is there any way to find out why the trigger failed?

Regards,
Martin
[/quote]

Hi,
Thank you for posting this. I tried it on my local system and surely looks like a bug to me. I will file this as a bug and keep this topic updated on its progress.

Cheers,

Ash

[quote]
Hi,

Thank you for posting this. I tried it on my local system and surely looks like a bug to me. I will file this as a bug and keep this topic updated on its progress.



Cheers,



Ash

[/quote]

It is actually a quick fix. If you have access to shell, you can go to class :

[SYSTEM_ROOT]/core/assets/system/triggers/trigger_action_types/trigger_action_remove_web_path/trigger_action_remove_web_path.inc



and around line number 58 change the type 'setting' to 'settings' :

58c58

< if (empty($settings['path']) && empty($setting['remove_all'])) return FALSE;



> if (empty($settings['path']) && empty($settings['remove_all'])) return FALSE;



This should fix the issue.

[quote]
It is actually a quick fix. If you have access to shell, you can go to class :

[SYSTEM_ROOT]/core/assets/system/triggers/trigger_action_types/trigger_action_remove_web_path/trigger_action_remove_web_path.inc



and around line number 58 change the type ‘setting’ to ‘settings’ :

58c58

< if (empty($settings[‘path’]) && empty($setting[‘remove_all’])) return FALSE;



> if (empty($settings[‘path’]) && empty($settings[‘remove_all’])) return FALSE;



This should fix the issue.

[/quote]



This bug has now been fixed (as above) and will be available in the next release.

Alternatively see Public CVS bug