Support Forum
Yellow Swordfish said
Which bit of code? Surely the only bit that matters is the code that attempts to create the folder that is missing. Would that be the bit you want?
How do I recreate the scenario of simple-press trying to create a folder... like what is being done to make that folder? Is it avatar upload, an attachment... I can't work out what it is.
My host thinks the problem is within the Simple Press Upload plugin because it's trimming the directory incorrectly somehow.
[13-May-2015 12:01:09 Europe/London] PHP Warning - scandir(/problem-with-post-edit-buttonome/account1/public_html/wp-content/forum-image-uploads/mario3lia/): failed to open dir: No such file or directory - file: count1/public_html/wp-content/sp-resources/forum-plugins/plupload/ahah/sp-plupload-attachments-display.php - line: 28 - function: scandir
The folder is missing the first 2 letters of the hosting account name "account1" is named "count1"
EDIT: I found how to recreate it over and over (profile > attachments > click on the three directory trees)
I covered this way back in the thread., It has nothing to do with the account name in the path. That is a red herring, The problem is in creating the final folder. Look at the actual text of the error:
scandir(/problem-with-post-edit-buttonome/account1/public_html/wp-content/forum-image-uploads/mario3lia/): failed to open dir: No such file or directory
There is nothing wrong with the path...
As to the question - what code is used to create the folder - then Simple:Press uses the core WordPress function wp_mkdir_p().
YELLOW
SWORDFISH
|
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?
$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.
hmmm... guess I too totally missed what you were trying to say - was thinking doing a file upload, not looking at previous uploads...
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...
Visit Cruise Talk Central and Mr Papa's World
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...
Visit Cruise Talk Central and Mr Papa's World
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.
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...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
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 😛
1 Guest(s)