Trigger Help (hopefully ;-)

Hi Folks,


Have an issue to run by people. I run multiple sites all with 'events' (calendar assets) on them. We want one person to review the events (make sure they are formatted correctly etc). So rather than put in place a workflow that would require someone logging into multiple sites I have created a single 'eventsadmin' site that they can use. When an event is created a trigger fires off to create a link under a 'pending' folder. i then have an asset listing etc that allows the person to review the pending items / put them from UC -> live. So now the issue. At the point of 'going live' I want the link under the pending folder to be removed. I've setup a trigger using the 'remove links' action that I'm sure should work - but it isn't… (see attached image). Anyone with a second pair of eyes notice what I'm doing wrong?







Cheers



K

Try adding live status to the conditions and ignore permissions to the remove link acion. Make sure you are testing from the front end as well. What Matrix version are you doing this in?

[quote]
Try adding live status to the conditions and ignore permissions to the remove link acion. Make sure you are testing from the front end as well. What Matrix version are you doing this in?

[/quote]



Ok I've done that and no luck :frowning: I've also added a Send E-mail action to test the trigger is firing (it is). Using 3.24.0. Could it be that the asset status is being changed from the location at which I want to remove the link?



K

Hey KJB have you tried Create Link trigger and select the 'Unlink this asset from all its existing parents' checkbox field? You might be able to fire this on the previous trigger you use to set the asset live after checking. That's how I've done it before.


So when your editor approves the event your trigger fires:



Set Status Live

Create Link to where you would like the asset to be held in a Live State

Unlink from Existing Parents to take out of the eventsadmin folder

Clear Cache on the eventsadmin folder and asset listings



Would this work for your implementation?

[quote]
Hey KJB have you tried Create Link trigger and select the 'Unlink this asset from all its existing parents' checkbox field? You might be able to fire this on the previous trigger you use to set the asset live after checking. That's how I've done it before.



So when your editor approves the event your trigger fires:



Set Status Live

Create Link to where you would like the asset to be held in a Live State

Unlink from Existing Parents to take out of the eventsadmin folder

Clear Cache on the eventsadmin folder and asset listings



Would this work for your implementation?

[/quote]



Maybe. There are 20+ events 'locations' spread out over 15+ urls (hence the need to have a central 'admin' area in the first instance). So you would need 20+ triggers listening on the 'primary' location (rather than eventsadmin) for this to work I think. Which is obv alot more work to setup when there is a trigger action that should do the job anyway.



K

So when an event is created, it's created in the correct folder and a trigger fires and links it into eventsadmin?

[quote]
So when an event is created, it's created in the correct folder and a trigger fires and links it into eventsadmin?

[/quote]



yip pretty much… not exactly but the end result is the same - that the asset is linked under the primary location… say:



Site -> Events -> Event Series -> 2009 /2010



and under:



eventsadmin -> pending



K

And that link is made with a trigger on creation?

in the [remove link] action, try set "As linked to the Broadcasting Asset, which also resides under" to "eventsadmin" instead of "pending 34095". If no luck, in the 'create' link trigger give the link value for links under "pending" location, then you can specify this value in the "remove link" trigger.
Good luck

[quote]
in the [remove link] action, try set "As linked to the Broadcasting Asset, which also resides under" to "eventsadmin" instead of "pending 34095". If no luck, in the 'create' link trigger give the link value for links under "pending" location, then you can specify this value in the "remove link" trigger.

Good luck

[/quote]



…the first option worked - putting it a level higher.



CHeers



K

Solved! Excellent.