Blank / broken images in Edit + resulting from make live Trigger


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

We have a site using Edit+ with a trigger which sets image assets to be live when created - the trigger is firing on the 'Asset Created'.

 

Some of the time when our Edit+ users create a new Image asset, the wizard doesn't complete - the image file is created, but I believe the upload doesn't complete.

 

Possibly the trigger is interfering with the process.

 

Anyone encountered something similar?


(Tom Chadwin) #2

It could be a number of reasons, including what you suspect - incomplete upload. Look at the asset details, and see what the filesize is reported to be - if it's 0, then it is probably a failed upload. Otherwise, check that the status change has fired. What about permissions - is that cascading OK?


(Nic Hubbard) #3

Are you seeing anything in the error logs?


(Robin Shi) #4

would you try "After Asset Built" and see how it goes?


(Bart Banda) #5

It's probably because the method of creating image assets in Edit+ actually happens in 2 steps. The first step is to create a blank image asset in Matrix backend, Edit+ then uploads the actual image and puts it into that created image asset. So your trigger is probably firing as soon as the first step completes, and interfering with the 2nd step Edit+ needs to make, and thus failing the upload.

 

Can you use a different trigger such as set future status? So that it goes live in the next cron run perhaps? Not sure if that trigger will still interfere.

 

Another way would be to use trigger method for creating image varieties in Edit+, but instead of using the image variety as the action, you use the set status action. Here are the steps for configuring the Event and Conditions for it:

  1. In the Events section, select Simple Edit Accessed.
  2. In the Conditions section, select URL matches in the list provided and click Commit. Additional fields will appear in the Conditions section. Enter a URL pattern match of file_create=true and select Must be in URL then click Commit.

(Scott Hall) #6

Hey

 

We recently updated the triggers examples in the manuals because a few people were experiencing file creation/upload issues in edit mode, some of which touches on what Bart mentions above.

 

Have a look through the following and note that there needs to be clear separation between admin mode and edit mode triggers and edit mode does things very differently.

 

http://manuals.matrix.squizsuite.net/triggers/examples/configuring-a-trigger-to-create-an-image-variety

 

http://manuals.matrix.squizsuite.net/triggers/examples/configuring-a-trigger-to-set-an-asset-live-upon-creation

 

Also, you won't be able to use triggers that automatically set the status on assets that have workflow applied. You will need to either select to not include these trigger types, or to not have workflow applied to these areas of your system.

 

There could be other issues here, like edit+ not applied to the base domain (because it posts to /_edit appended to the base domain path) but sounds like the trigger.


(Tim Davison) #7

We had issues with this is as well, wanted it to run whether an asset was created in admin or EES.  Fix for us was to use a Future Status action.  And remove our default workflow.

 

Event - asset created

Condition - image, etc

Action - Remove workflow, set future status 'live', now.


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

Thanks for the responses - Bart's post confirms what I suspected Matrix was doing.

 

The users affected have found a workaround, but we'll look at the suggestions made if we need to address the problem more directly.