Support Forum

Error on Uploading Custom Avatars and seemingly with "plupload" plugin

22 Answers

New Answer

RY Ryan
Ryan
Member

Yellow Swordfish said
As to the question – what code is used to create the folder – then Simple:Press uses the core WordPress function wp_mkdir_p().

 So the error is happening when I go to Profile > Attachments > click on any of the directories…

To me it doesn’t even look like it’s trying to make a directory, it is just trying to scan… if the user hasn’t uploaded anything surely $files will be blank or zero and should just say there are no files?

sp_forum_api_support();
$userid = sp_esc_int($_GET[‘uid’]);
if (empty($userid)) die();
$thisUser = sp_get_user($userid);
global $plup;
sp_plupload_config($thisUser);

$sfconfig = sp_get_option(‘sfconfig’);

$id = ($_POST[‘id’] == ‘#’) ? ” : sp_esc_str($_POST[‘id’]).’/’;

$type = sp_esc_str($_POST[‘type’]);

$path = $plup[‘basepath’][$type].$id;

$response = array();

$files = scandir($path);

It is only appearing for users who have not uploaded anything… if the user has uploaded the folder exists and then there are no errors…

My host said:

I’ve had a look at it and I’m not too sure on how to resolve the issue. The permissions seem fine, the php is up to date and the appropriate mods are enabled so I’m not sure what on the server would cause this.

YS Yellow Swordfish
Yellow Swordfish
Member

I thought you were experiencing problems making an upload? I will talk to Mr Papa and we will have to look at that bit of coding… maybe need a little more rugged checking.

MP Mr Papa
Mr Papa
Member

hmmm…  guess I too totally missed what you were trying to say – was thinking doing a file upload, not looking at previous uploads…  embarassed

its a lot more deeper than you are imagining… mainly because the tree stuff is a third party js library being used…   we dont output anything…

but if the there is no directory to scan, we should not throw the notice…  and will get that fixed up… a ticket is open…  and you are only seeing those in the error log, right?  that is not displaying errors on a production site…

MP Mr Papa
Mr Papa
Member

btw… there is already a message that says the use has no uploads…   just need to clean up the notices and have done so… will be in the next release of the plugin…

RY Ryan
Ryan
Member

Yellow Swordfish said
I thought you were experiencing problems making an upload? I will talk to Mr Papa and we will have to look at that bit of coding… maybe need a little more rugged checking.

Yeah, that’s what I thought it was but you guys told me that is not the case a few messages back, so I went and had a further look at the function and worked it out a little more.

That’s the problem with me not knowing what all of your functions do, I just assumed it was to do with uploading avatars because it was the image upload folder where it was throwing notices. embarassed

Mr Papa said
hmmm…  guess I too totally missed what you were trying to say – was thinking doing a file upload, not looking at previous uploads…  embarassed

its a lot more deeper than you are imagining… mainly because the tree stuff is a third party js library being used…   we dont output anything…

but if the there is no directory to scan, we should not throw the notice…  and will get that fixed up… a ticket is open…  and you are only seeing those in the error log, right?  that is not displaying errors on a production site…

Yeah, like I just said to YS I had no idea what the notice was truly about because I didnt know what the attachment does, it took me lots of trial and error to find how to replicate the error.

At least it’s not my fault and it can hopefully be fixed in the future update 🙂 I can relax now and ignore them errors for the mean time kiss

It’s only showing in the error log, which I check all the time to make sure everything is working. Cough Wishlist Cough throwing thousands of errors lately 😛

YS Yellow Swordfish
Yellow Swordfish
Member

Oh you have that problem with WishList too? And it’s weird how it goes in spurts… We are looking at alternatives at the moment I have to day.

So sorry this took a while for the light to dawn. Mr Papa did some remedial work on this last night so should get a fix out soon.

RY Ryan
Ryan
Member

Just drop them an e-mail, they’ve fixed mine after pestering them lots 😛

MP Mr Papa
Mr Papa
Member

its fixed for next release of plugin…  tied to 5.5.7 release, hopefully next weekend…