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.

MSM+SafeCracker File Uploads

March 23, 2012 2:00pm

Subscribe [2]
  • #1 / Mar 23, 2012 2:00pm

    Adam Dorsey

    1439 posts

    I am getting an error when trying to upload a file from a SafeCracker form.

    You do not have access to this upload directory.

    I have a channel and file upload prefs on Site A. I have a SafeCracker on Site B, posts to the channel in Site A. Channel posting is fine without the file fields. Everything works.

    I tried having the directory on both sites. Open base_dir restrictions are off. I’m a bit lost.

    There are a few posts in the forum, but everyone that had an issue, just asked for the threads to be closed without posting their solutions.

    I can post the images fine in the Control Panel.
    I can’t post as guest or a SuperAdmin. Samer Error.

    Thanks,
    Adam

  • #2 / Mar 25, 2012 12:39pm

    Dan Decker

    7338 posts

    Hi Adam,

    I’m sorry you are running into this trouble with SafeCracker and MSM. In order to help you troubleshoot this, I really need to know the version of ExpressionEngine and MSM you are using.

    In the meantime, if you are using ExpressionEngine 2.4, look at this bug and this bug regarding files and channel entries (SafeCracker may well be affected too).

    If that’s not the case, get me that version information and I’ll get you an answer!

    Cheers,

  • #3 / Jun 26, 2012 3:48pm

    openmotive

    65 posts

    I am having a similar problem.

    2 Sites. The 2nd is a duplicate of the 1st (templates, channels, fields, settings etc.) 1st site is working hunky-dory. 2nd site is yielding this error when uploading via SafeCracker (using safecracker file).

    Of course, the upload paths now point to a folder for new site, not the original one.
    Permissions are correct (777)

    ExpressionEngine v2.5.2 - Build Date: 20120606
    MSM Version: 2.1.3 Build: 20120529

    Any idears?

    Oh, and uploading via Control Panel seems to work just fine.

    Thanks!

  • #4 / Jun 27, 2012 1:49pm

    openmotive

    65 posts

    Alrightee - I think I’ve found the problem here. Not *exactly* sure what’s happening behind the scenes but hopefully this might help someone else out in the future.

    The problem only seems to exist on sites that are DUPLICATED from an existing site when installing MSM. While I duplicated the file upload preferences, and then edited them with a new path, something about them being created from the original seems to be the problem.

    To fix this:

    1) In the 2nd site create BRAND NEW file upload locations and delete the ones that were created during the MSM installation.

    2) For every field that used one of these locations, switch the field type to regular “file”, update, and then change it back to “safecracker file” and assign one of your new upload locations.

    It seems both the creation of new upload locations AND forcing the field itself to be redefined as a safecracker file field are necessary. My guess is there’s something on the backend created by the MSM installation/duplication process that needs to be completely wiped out to get the fields working correctly.

  • #5 / Jun 29, 2012 3:26pm

    Dan Decker

    7338 posts

    Hi openmotive,

    I am sorry for your experience! This is a known bug and the bug report has a solution.

    Let me know if you have any questions at all!

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases