We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

File Field Broken?

Development and Programming

DougH's avatar
DougH
205 posts
6 years ago
DougH's avatar DougH

The file field appears to be broken since v5.0.

I can upload an image through the file manager just fine. But trying to add a file through a channel entry in the control panel just results in “loading…”.

Extremely frustrating.

       
peak2peak's avatar
peak2peak
18 posts
6 years ago
peak2peak's avatar peak2peak

I have the same issue, running 5.2.2 now and no change.

       
jhwebstudio's avatar
jhwebstudio
2 posts
6 years ago
jhwebstudio's avatar jhwebstudio

I also have this issue on v 5.1.3 as a clean install as well as auto upgraded versions.

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
6 years ago
Robin Sowell's avatar Robin Sowell

It’s not a known bug and I’m not able to replicate. There is a known issue with MSM and file upload fields- directories are site specific in the CP, which can cause issues using file fields across sites. But otherwise, it should be working.

First, check that you can upload to the directory via the file manager. Then, make sure the file field is using a directory you know you can upload to in the file manager. If there’s still nothing, take a look at the network traffic using your browser developer tools and see what the response is you’re getting, if anything.

It’s definitely working for the vast majority, so something odd must be going on.

       
jhwebstudio's avatar
jhwebstudio
2 posts
6 years ago
jhwebstudio's avatar jhwebstudio

Robin, I can successfully load images to all folders in the file manager. The only changes to my 7 ee 5.1 sites has been an auto upgrade to v 5.2.2 - I have a site running 5.1.3 that has this same issue and is an empty install.

I have read in other threads that I can remove certain mod_securities to fix the issue - but that seems odd to have to update those settings.

What would you advise for me? Thank you.

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
6 years ago
Robin Sowell's avatar Robin Sowell

I would expect mod_security/server issues to affect the file manager as well. Try it with one of the native avatars EE ships with. They’re tiny. Upload it via the file manager, make sure it’s ok. Delete it. Upload the same image via a file field in a channel entry.

If it fails- you’re getting to the part where you’ve chosen a file upload directory (same one you already tested in file manager) and you drag the image over and- it spins. No javascript errors? Anything interesting in the headers?

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
6 years ago
Robin Sowell's avatar Robin Sowell

Aha- I got a closer look at one site running into this, and it was mod_security objecting to the format of some of EE’s assets, namely some combo_load javascript. Which was causing a javascript error and breaking the field.

Use your dev tools and look at the network traffic when you open an entry with the file field- see if you’re getting any resources that fail to load- 406, 500, whatever. I’m betting that’s it. In which case, check with your host and let them know the url that’s tripping the filter. They should be able to adjust the security check.

I do wonder what exact pattern is causing the problem- if you find out, let me know.

       
marijn1412's avatar
marijn1412
10 posts
6 years ago
marijn1412's avatar marijn1412

See my reply on this thread: link

In my case it has to with “/cp” being in a request, which on Linux is a copy command line and could potentially be used to do harm… which is why my hosting provider blocks it

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.