ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Using SafeCracker File in Matrix - Doesnt upload

September 24, 2012 9:08am

Subscribe [12]
  • #16 / Oct 24, 2012 10:18pm

    Lee Sheppard

    13 posts

    I am encountering the same issue with uploading as well and it seems to have been since updating the EE to 2.5.3 that caused the issue to break uploading at all. I’ve applied some of the custom patches that have been suggested in the Bug Report but still have the same issue where the upload does not work. It isn’t a fault it seems of the extensions but something more with the updates in the new EE version that are the cause. I’m running EE 2.5.3 with Zoo Visitor, S3 Simple Uploader and Matrix (all up to date). 

    The issue was raised with Pixel and Tonic here:

    https://getsatisfaction.com/pixelandtonic/topics/safecracker_and_matrix_after_update_ee_2_4_0_to_2_5_3

    But process of elimination, it seems like the EE 2.5.3 broke down what was previously functioning normally. Made the mistake of doing this on a live site, so I’m getting plenty of flack until it gets fixed.

    Also, I’ve split the page in to two so that updating images is separate to updating profile text data, it’s only the images that have the issue and not the text field based form.

  • #17 / Oct 25, 2012 5:11pm

    Dan Decker

    7338 posts

    Hi Rocket Science,

    Let’s get a closer look at this. Be on the lookout for an email from EllisLab!

    Cheers,

    Lee, with a look at this, I’ll report back what we find. It is possible that we’ve introduced a bug.

    Cheers,

  • #18 / Oct 31, 2012 8:14am

    emagine media

    65 posts

    Any update on this? Seems like a pretty big break…

  • #19 / Nov 01, 2012 11:49am

    Shane Eckert

    7174 posts

    Hey emagine media,

    As soon as Dan has some more information he will post back.

    Sorry about the delay!

    Cheers,

  • #20 / Nov 01, 2012 8:54pm

    Brett Gullan

    70 posts

    I’ve had the same problem, with a setup similar to that mentioned by Lee Sheppard (above): EE2.5.3, Matrix, Simple S3 Uploader.

    Simple S3 Uploader as a custom field works within a Safecracker form. However as a cell within a Matrix field, it doesn’t.

    Would love to see a resolution to this. I have a site in development (and getting close to deadline) that would really benefit!

    Cheers,

    Brett

  • #21 / Nov 05, 2012 2:11pm

    Kevin Smith

    4784 posts

    @Ralph123 and @Rocket Science - Did you receive the emails from us? Let us know if you need us to send them again.

    For everyone else asking, if you could provide detailed information about the issue you’re facing in particular, we can start working on the case with each of you specifically. Thanks!

  • #22 / Nov 05, 2012 2:46pm

    dstechroom

    113 posts

    I’m also having issues uploading images using safecracker and matrix. Response returns success but no image is uploaded. Could you count me in as well? Thanks!

    .(JavaScript must be enabled to view this email address)

  • #23 / Nov 06, 2012 2:20pm

    Kevin Smith

    4784 posts

    Sure thing, dstechroom. Be on the lookout for an email from me.

  • #24 / Nov 06, 2012 4:51pm

    dstechroom

    113 posts

    Thanks kevin.

  • #25 / Nov 07, 2012 12:22pm

    Kevin Smith

    4784 posts

    Just posting a note here to let onlookers know that we’re working with dstechroom (and others) privately on this for the time being. I’ll post an update back here once we have something to share!

  • #26 / Nov 08, 2012 11:37am

    mooo

    168 posts

    Any update on this? I’m having this same problem, and I have a client with an urgent need to get this fixed ASAP.

  • #27 / Nov 08, 2012 4:39pm

    Dan Decker

    7338 posts

    Hi mooo,

    I went to check the status on this behind the scenes. Based on some code digging and $_POST troubleshooting, this is ultimately up to Matrix.

    Check over at P & T’s Get Satisfaction for a followup.

    Thanks!

  • #28 / Nov 11, 2012 2:28pm

    joost de keijzer

    10 posts

    Hi All,

    I don’t have access to the EE version prior to 2.5.3, but in safecracker_lib.php line 1227 the $_POST[fieldname] index is overwritten by the $_FILES[fieldname][name] value. For Matrix field types, this results in all other row-values being removed from the $_POST array.

    Removing this line makes all work again, but I don’t know about the validation…

    foreach ($this->custom_fields as $i => $field)
      {
       $isset = (isset($_POST['field_id_'.$field['field_id']]) || isset($_POST[$field['field_name']]) || (((isset($_FILES['field_id_'.$field['field_id']]) && $_FILES['field_id_'.$field['field_id']]['error'] != 4) || (isset($_FILES[$field['field_name']]) && $_FILES[$field['field_name']]['error'] != 4)) && in_array($field['field_type'], $this->file_fields)));
       
       // If file exists, add it to the POST array for validation
       if (isset($_FILES[$field['field_name']]['name']))
       {
        //$_POST[$field['field_name']] = $_FILES[$field['field_name']]['name'];
       }
       
       $this->custom_fields[$i]['isset'] = $isset;
  • #29 / Nov 11, 2012 7:14pm

    Lee Sheppard

    13 posts

    Reverting to the Safecracker version included with 2.4.0 and the problem is resolved. So I am running EE 2.5.3 but with an older version of Safecracker to overcome the issue. Is this an error then stemming for Matrix or for EE ?

  • #30 / Nov 12, 2012 4:48am

    joost de keijzer

    10 posts

    IMHO it’s EE.

    When using Safecracker and Matrix with a field-type (and some other types), the Safecracker code overwrites the Post data the Matrix fieldtype generates.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases