0

I have a Safecracker form where I have more than one Matrix field in the form. Each of these Matrix fields has a Safecracker File field as the first column. When testing the form out I can only upload files into the first Matrix field. I get no inline errors, just an empty field in the second Matrix field.

EE v2.5.5, Matrix v2.5.6, Safecracker File v2.1

Has anyone come across this problem before. Sample template code for the two fields below:

{exp:safecracker 
    channel="awaentry" 
    return="entries/nomination/URL_TITLE/success" 
    id="award-entry-form"
    class="standard-form"
    url_title="{segment_3}"
    include_jquery="no"
    author_only="yes"
    error_handling="inline"
}

{global_errors}<div class="alert">
    {error}
</div>{/global_errors}

{field_errors}<div class="alert">
    {error}
</div>{/field_errors}

<div class="field">
    <span class="label">Screen Grabs (Desktop)</span>
    <div class="formHelp">Please provide a set of screen grabs with details, that can be used for promotional purposes.</div>
    {field:website_screens}
</div>

<div class="field">
    <span class="label">Screen Grabs (Mobile)</span>
    <div class="formHelp">Please provide a set of screen grabs with details, that can be used for promotional purposes.</div>
    {field:website_screens_mobile}
</div>

<div class="formControls">
    <button type="submit" class="submit">Save Entry</button>
</div>

{/exp:safecracker}

There's other problems with this combination when it comes to proper error messages being parsed through, but will get this working first.

Uploading to the second Matrix field works as expected in the EE control panel.

Would love some assistance as I'm really quite ready to punch someone fair square in the face...this shit should work by now!!!

2 Answers 2

1

After a week of banging my head, this ended up being a known problem with Safecracker - or Safecracker File and is to do with the field names.

Here's an earlier thread that pointed towards the problem: Safecracker File Fields only uploads the first one

Who would have thought that the name of the Matrix fields would also affect this problem. So basically my original field names were:

{website_screens} and {website_screens_mobile}

I changed these field names to the following:

{website_desktop_screens} and {website_mobile_screens}

And low and behold, it all uploads fine. What an absolute pain in the rear. Apparently it's a known bug and has been fixed (https://support.ellislab.com/bugs/detail/19231) but a trial under v2.6.1 showed that only renaming the fields solved the problem.

0

Brendan,

I get all sorts of errors doing this on EE2.5.5, but it all works flawlessly on EE 2.6, so you might consider upgrading.

4
  • Bugger, I really don't have the time to do a full point upgrade, but might just have to considering if I approach EL they will highly recommend I do that first anyway. All addons I use have been confirmed as being v2.6.x compatible so that's one thing out of the road. Will keep this updated. Commented Jul 15, 2013 at 9:00
  • Brendan, if you're unsure about the upgrade you can do a test install of EE2.6 to see if that indeed solves your problem - i.e. identify this as a working solution first. Commented Jul 15, 2013 at 12:17
  • Yeah I will do. Just that there's over a dozen addons that need to be updated as well. Commented Jul 16, 2013 at 0:53
  • Went through the upgrade process and this is still a problem. Now running latest version of everything and second upload field within a Matrix still not working. Complete balls up this shit. Commented Jul 18, 2013 at 4:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.