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.

Safecracker + Matrix, Upload File goes to the home page

November 15, 2011 9:49am

Subscribe [1]
  • #1 / Nov 15, 2011 9:49am

    matteobug

    4 posts

    Hi everyone,

    I’m running v2.3.1 - Build: date 20111017.

    I’m using Matrix to create an image gallery, so I have one Matrix field set as File. I’m also using a Safecracker form to edit the gallery (among other channel fields).

    When I try to add an image through the safecracker form, I’m taken to the File Manager in a smaller window. I click on Upload File. A second, smaller window opens. Unfortunately, it doesn’t contain the file upload interface, but my website’s home page.

    I did remove index.php through .htaccess. However, that does not seem to be relevant. Renaming .htaccess and setting the “Name of your site’s index page” in General Configuration to “index.php” did not solve the issue.

    I have no problems uploading through the control panel.

    This is the code I’m testing (immobili_gallery is the Matrix field):

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xml:lang="it" lang="it" >
    <head>
     <title>Safecracker test</title>
     <link href="{path=css/_ee_saef_css}" type="text/css" rel="stylesheet" media="screen">
    </head>
    <body>
    {exp:safecracker channel="immobili" return="immobili/dettagli/ENTRY_ID" entry_id="{segment_3}"}
     {field:immobili_gallery}
    {/exp:safecracker}
    </body>
    </html>

    Any ideas?

  • #2 / Nov 15, 2011 11:05am

    matteobug

    4 posts

    Got it working by changing, inside the Matrix field, from a File field to a Safecracker File field. How did I not notice it before?

    You can close this. Thanks.

  • #3 / Nov 15, 2011 7:10pm

    Sean C. Smith

    3818 posts

    Matteobug,

    Welcome to the forums, we’re really happy to have you here. Glad to hear you found the solution. Feel free to post again as needed in the future.

    Sean

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

ExpressionEngine News!

#eecms, #events, #releases