Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Communicate attachments fail to upload while file directories are fine #4811

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

Closed
robinsowell opened this issue May 2, 2025 · 1 comment · Fixed by #4814
Closed

Communicate attachments fail to upload while file directories are fine #4811

robinsowell opened this issue May 2, 2025 · 1 comment · Fixed by #4814
Labels
Bug: Unconfirmed Bug report that is not yet confirmed and/or is not reproducible.

Comments

@robinsowell
Copy link
Contributor

robinsowell commented May 2, 2025

Not sure this is a bug, but it's worth bringing up for an extra set of eyeballs.

Had a user, current EE, file upload work fine except when making attachments to emails in Communicate. You submit- it fails and comes back with a validation error 'There was a problem attaching your file'.

Turns out they were on Plesk and there is no “upload_tmp_dir” set so in plesk we have to set a PHP variable:

upload_tmp_dir = /var/www/rob1/httpdocs/tmp

This got it working, but it is interesting that it wasn't necessary for other uploads. I did notice in the communicate controller:

        ee()->upload->initialize(array(
            'allowed_types' => '*',
            'use_temp_dir' => true
        ));

Not entirely sure why use_temp_dir is explicitly set to true there and I suspect that's why the different behavior. So again- not at all sure it's a bug, but if it's not, we might drop a note in the troubleshooting section of the docs about it. Pretty rare thing, but still confusing to the user.

@robinsowell robinsowell added the Bug: Unconfirmed Bug report that is not yet confirmed and/or is not reproducible. label May 2, 2025
@intoeetive
Copy link
Contributor

I think the behavior is correct (we want to use the temporary directory only, and we also are trying to use different places, so it's problem with their setup if the have none) - but we clearly need to display the right error message

TomJaeger added a commit that referenced this issue May 14, 2025
…-temp-dir-error

Resolved #4811 where error messages when uploading attachments on Communicate page were not clear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Unconfirmed Bug report that is not yet confirmed and/or is not reproducible.
Projects
None yet
2 participants