Trigger Cloning Error

I have a trigger that clones and asset from the front end interface. I must have done something in my system, because now it is not working, and I am getting an error. If I try the trigger, closing to another folder it works, which is strange because they have the same permissions as the folder that I am getting the error when trying to clone to.


My folder where I am cloning assets has 625 assets as children, so I hope this is not the problem, as I can manually clone one of those assets without a problem.


    MySource Error (/core/include/asset.inc:2005) - Unable to set file(s) for "Movie Monday", permission denied [SYS0321]


What does Unable to set file mean? That it just cannot create it?

What does the backtrace say?

I don't get the error on the front-end, only in the log manager, so I don't see the backtrace button. Is there another place where it would be?

I am using the ajax method to trigger a trigger to delete and duplicate assets, probably why the error only comes up in the log.

I found it:

    0 => array (
    	"function" => "sq_error_handler",
    	"args" => array (
    		0 => 512,
    		1 => "Unable to set file(s) for \"The Gathering: Tim Mitchell\", permission denied [SYS0321]",
    		2 => "[SYSTEM_ROOT]/core/include/locale_manager.inc",
    		3 => 504,
    		4 => array (
    			[Max Depth Reached]
    		) 
    	) 
    ),
    1 => array (
    	"file" => "[SYSTEM_ROOT]/core/include/locale_manager.inc",
    	"line" => 504,
    	"function" => "trigger_error",
    	"args" => array (
    		0 => "Unable to set file(s) for \"The Gathering: Tim Mitchell\", permission denied [SYS0321]",
    		1 => 512 
    	) 
    ),
    2 => array (
    	"file" => "[SYSTEM_ROOT]/core/include/general.inc",
    	"line" => 1119,
    	"function" => "raiseerror",
    	"class" => "locale_manager",
    	"type" => "->",
    	"args" => array (
    		0 => "SYS0321",
    		1 => 512,
    		2 => array (
    			[Max Depth Reached]
    		) 
    	) 
    ),
    3 => array (
    	"file" => "[SYSTEM_ROOT]/core/include/asset.inc",
    	"line" => 2005,
    	"function" => "trigger_localised_error",
    	"args" => array (
    		0 => "SYS0321",
    		1 => 512,
    		2 => "The Gathering: Tim Mitchell" 
    	) 
    ),
    4 => array (
    	"file" => "[SYSTEM_ROOT]/packages/calendar/calendar_event/calendar_event.inc",
    	"line" => 387,
    	"function" => "clonecomponents",
    	"class" => "asset",
    	"type" => "::",
    	"args" => array (
    		0 => new calendar_event_single Object (
    			[Max Depth Reached]
    		),
    		1 => array (
    			[Max Depth Reached]
    		),
    		2 => 1 
    	) 
    ),
    5 => array (
    	"file" => "[SYSTEM_ROOT]/core/include/asset_manager.inc",
    	"line" => 1756,
    	"function" => "clonecomponents",
    	"class" => "calendar_event_single",
    	"type" => "->",
    	"args" => array (
    		0 => new calendar_event_single Object (
    			[Max Depth Reached]
    		),
    		1 => array (
    			[Max Depth Reached]
    		),
    		2 => 1 
    	) 
    ),
    6 => array (
    	"file" => "[SYSTEM_ROOT]/core/include/asset_manager.inc",
    	"line" => 1949,
    	"function" => "_cloneasset",
    	"class" => "asset_manager",
    	"type" => "->",
    	"args" => array (
    		0 => new calendar_event_single Object (
    			[Max Depth Reached]
    		),
    		1 => array (
    			[Max Depth Reached]
    		),
    		2 => array (
    			[Max Depth Reached]
    		),
    		3 => array (
    			[Max Depth Reached]
    		),
    		4 =>  
    	) 
    ),
    7 => array (
    	"file" => "[SYSTEM_ROOT]/core/assets/system/triggers/trigger_action_types/trigger_action_create_clone/trigger_action_create_clone.inc",
    	"line" => 124,
    	"function" => "cloneasset",
    	"class" => "asset_manager",
    	"type" => "->",
    	"args" => array (
    		0 => new calendar_event_single Object (
    			[Max Depth Reached]
    		),
    		1 => array (
    			[Max Depth Reached]
    		),
    		2 => array (
    			[Max Depth Reached]
    		),
    		3 => array (
    			[Max Depth Reached]
    		) 
    	) 
    ),
    8 => array (
    	"function" => "execute",
    	"class" => "trigger_action_create_clone",
    	"type" => "::",
    	"args" => array (
    		0 => array (
    			[Max Depth Reached]
    		),
    		1 => array (
    			[Max Depth Reached]
    		) 
    	) 
    ),
    9 => array (
    	"file" => "[SYSTEM_ROOT]/core/assets/system/triggers/trigger_manager/trigger_manager.inc",
    	"line" => 1217,
    	"function" => "call_user_func_array",
    	"args" => array (
    		0 => array (
    			[Max Depth Reached]
    		),
    		1 => array (
    			[Max Depth Reached]
    		) 
    	) 
    ),
    10 => array (
    	"file" => "[SYSTEM_ROOT]/core/assets/system/triggers/trigger_manager/trigger_manager.inc",
    	"line" => 850,
    	"function" => "_executetrigger",
    	"class" => "trigger_manager",
    	"type" => "->",
    	"args" => array (
    		0 => array (
    			[Max Depth Reached]
    		),
    		1 => array (
    			[Max Depth Reached]
    		) 
    	) 
    ),
    11 => array (
    	"file" => "[SYSTEM_ROOT]/core/include/mysource.inc",
    	"line" => 2646,
    	"function" => "broadcastevent",
    	"class" => "trigger_manager",
    	"type" => "->",
    	"args" => array (
    		0 => "trigger_event_asset_accessed",
    		1 => new calendar_event_single Object (
    			[Max Depth Reached]
    		),
    		2 =>  
    	) 
    ),
    12 => array (
    	"file" => "[SYSTEM_ROOT]/core/include/mysource.inc",
    	"line" => 460,
    	"function" => "broadcasttriggerevent",
    	"class" => "mysource",
    	"type" => "->",
    	"args" => array (
    		0 => "trigger_event_asset_accessed",
    		1 => new calendar_event_single Object (
    			[Max Depth Reached]
    		) 
    	) 
    ),
    13 => array (
    	"file" => "[SYSTEM_ROOT]/core/web/index.php",
    	"line" => 31,
    	"function" => "start",
    	"class" => "mysource",
    	"type" => "->",
    	"args" => array (
    		[Empty]
    	) 
    )

Hmm…I seem to have fixed my own problem by tweaking my trigger. I removed ignore permissions, which then allowed the trigger to finish firing. (Which is strange, because I would think that ignore permissions would not throw an error talking about permissions denied) Then I realized that my trigger to make assets that were just created live was not functioning, so I added the checkbox to only fire on children assets, and that fixed it.


Strange, because it just came up, and no problems before…

I love how you fix problems yourself before I get to work. :smiley:


Sorry, just trying to be efficient!

Oh, don't apologise! It's marvelous. I wish all my work sorted itself out like this. :)

I have identified this as a bug, please see bug #2744 for more information. You should not get the warning and the trigger should be fired and completed correctly when you have ‘Ignore Permissions’ option on.


Thanks Rayn