We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

[FIX] 1.7.2 Avatar Upload Error (base+upload_avatar_faild) | Forum

n3rdcore
n3rdcore Dec 17 '14
Hi!

After the update to 1.7.2 it was no longer possible to upload avatars. The following error message appears: "base+upload_avatar_faild"

I found the thread "29369" here in the forum and was wondering why there is this problem. So I looked at the update to the new version more closely. Here, I noticed the following problem:

/ow_updates/updates/8520/update.php Line 84-85:

- CODE -----------------------------------------------------
@mkdir(OW_DIR_PLUGIN_USERFILES . 'base' . DS . 'avatars' . DS . 'tmp');
@chmod(OW_DIR_PLUGIN_USERFILES . 'base' . DS . 'avatars' . DS . 'tmp', 0777);
- /CODE ----------------------------------------------------

Ok... So... the script tries to create a new folder "tmp" and give this appropriate directory permissions. But... on many systems, you can not carry out such instructions. The providers prohibit it mostly(shared hosting).

The folder is therefore not created and the profile image can not be loaded into the temporary folder. The upload is canceled by and you get the error message.

What do you do to fix it? Easy!

- Open the FTP client and navigate to the path:
ROOT/ow_userfiles/plugins/base/avatars

- Create a new folder "tmp" with chmod "777" or "755".

Fixed! Wasn't that easy? Huh?
Now the upload should again function properly. :-)

Cheers!
//n3rd
ross Team
ross Dec 18 '14
As you can see yourself - the system does not allow to create new temp directory and give it correct permissions. It totally depends on the server configuration, probably suhosin module is enabled or some other setting which does not allow to anonymous user to create folders on the server, which is why users have such an error. 


Anyway thank you for the solution, hope somebody will find it helpful. 

Dirk
Dirk Dec 18 '14
Hi,


System: Platform version 1.7.2 (build 8520)

Plugins: Oxwall Photo plugin:

URL: www.hardstyleunited.com

I am having problems with uploading but with a JS error. If i try to upload via the click to browse:

I am getting this:

Reads:Failed to load resource: the server responded with a status of 404 (Not Found)jquery.textcomplete.js:301 Uncaught TypeError: Cannot read property 'keepTextCompleteDropdown' of undefinedhttp://hardstyleunited.com/user/flawlessfriction Failed to load resource: net::ERR_CACHE_MISS
Thanks for the help :)

ross Team
ross Dec 18 '14
Before posting anything, please show some respect to the work we do. You're not eligible for the attribution link removal
Dirk
Dirk Dec 18 '14
Hi,


I think i have to make some apologies! Since i did not installed it myself i am more than happy to provide any link to the respectful developers! Can you please provide me where i need to add this info. Or if i need to override files please let me know.


Again Not my intention to be disrespectful in any way!


ross Team
ross Dec 18 '14
Upload the original master pages of the theme you currently use and origin theme to the master_pages folder. 


enable dev mode and refresh your website for the static cache to recompile. 

Dirk
Dirk Dec 18 '14
Took me a while to figure out where he changed it (applications.php). But its fixed and live! And will not be changed again! Again sorry for this acknowledge.


Also looked at the file permissions and the files need to have 777 are correct. Just tried to install it myself to make sure i own the process. And there it works. So I don't really have a clue why it wont work here.


Thanks for your understanding and help!

The Forum post is edited by Dirk Dec 18 '14
ross Team
ross Dec 18 '14
Dirk, I'm sorry, you say it works but it won't work here. Can you please specify what exactly is not working here? As to your problem with avatar change, I just registered at your website and uploaded avatar and then successfully changed. 


Is your issue resolved? or do you experience something else?

Dirk
Dirk Dec 19 '14
Hi Ross,


I fixed it. It was a conflict with the autocomplete module. (3rd party) 

Thanks for your reply's and help. 

ross Team
ross Dec 19 '14
Great. Thanks for letting us know. 
Shinyglaze
Shinyglaze Sep 12 '15
Awesome. Great. Such a simple solution. I'am happy
Sean
Sean Sep 30 '15
Hate to bump an old thread, but what do I do if using Amazon S3?
Jochen
Jochen Sep 8 '19

Hi n3rdcore , you are right, all avatars are stored in subfolder  "tmp" of avatars folder.


On my server, after installing latest oxwall-version 1.8.4  (including the core update)

If I try to update my avatar it is stored in that tmp -folder but it is not displayed anymore on my profile site. Still the "no-avatar" pic is displayed.


So I guess one path to the correct avatar-files maybe wrong ?


I already commented out those 2 lines in the update-file


- CODE -----------------------------------------------------
@mkdir(OW_DIR_PLUGIN_USERFILES . 'base' . DS . 'avatars' . DS . 'tmp');
@chmod(OW_DIR_PLUGIN_USERFILES . 'base' . DS . 'avatars' . DS . 'tmp', 0777);
- /CODE ----------------------------------------------------

but still no success.


Do you have an idea?


Thanks in advance, br, Jochen