Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Upload Directory Paths Causing Issues With Modules #19

Open
kmgdevelopment opened this issue Oct 2, 2012 · 4 comments
Open

File Upload Directory Paths Causing Issues With Modules #19

kmgdevelopment opened this issue Oct 2, 2012 · 4 comments

Comments

@kmgdevelopment
Copy link

After setting up custom upload directory paths in /config/config.master.php, some add-ons that use file paths have been breaking.

With Pixel & Tonic's Assets v1.2.2, the image preview thumbnails appear broken in the browser pane. When I right-click on a preview image and choose "view file", the URL it opens looks like this:

http://www.mysite.com/?ACT=33&file=%7Bfiledir_1%7Dmy-image.png

With Solspace Freeform 4.0.6, for a form with a file upload field, if I select "Include Attachment" in a notification template, the resulting email will be blank.

Images and files all display correctly on the front-end when used in templates. Commenting out the upload directory configurations in config.master.php fixes both problems.

Here is an example of my upload directory configuration in /config/config.master.php:

$env_config['upload_preferences'] = array(
    1 => array(
        'name'        => 'Main Upload Directory',
        'server_path' => $images_path . '/uploads/main',
        'url'         => $images_path . '/uploads/main/'
    ),
    2 => array(
        'name'        => 'Portfolio',
        'server_path' => $images_path . '/uploads/portfolio',
        'url'         => $images_url  . '/uploads/portfolio/'
    ),
    3 => array(
        'name'        => 'WYSIWYG Uploads',
        'server_path' => $images_path . '/uploads/wysiwyg',
        'url'         => $images_url  . '/uploads/wysiwyg/'
    )
);

I have experienced these problems in EE 2.5.2 and 2.5.3 with Master Config 1.1.1.

@erikreagan
Copy link
Member

Hi Kristen,

Very strange. I'll see if I can get my hands on these add-ons to test.

Your sample code looks correct though, assuming that the IDs are correct. Our config simply uses an EE override feature, so you might end up needing to check with Pixel & Tonic and Solspace.

@kmgdevelopment
Copy link
Author

Hi Erik,

You can remove Assets from this issue. In this instance, I was using $images_path where I should have been using $images_url.

I am still having problems with Freeform attachements, however, and I'll submit a support ticket to Solspace. Thanks!

@erikreagan
Copy link
Member

Good to know. Thanks for the update, Kristen.

@paynecodes
Copy link

I am also having issues with Solspace's Freeform and this master config. I have searched and searched for related issues, and it seems those who have come up with a fix have simply quit using the "upload_preferences" array as a solution. Unfortunately, this will not work in our case, but I am still wondering if either @kgrote or @erikreagan have seen/come up with a solution for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants