-
Notifications
You must be signed in to change notification settings - Fork 9
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
File upload to media directory still not working #38
Comments
Are those scripts missing also in the media? |
Do you have lib_jquery 1.32 installed? If not please install the current version. I guess, your problem could be caused by a broken JS... |
I will do a clean install for testing these days – to eliminate errors that are caused because of just replacing old files with the new ones. |
Did you already make a clean install? I've tested different systems and can't confirm this problem. |
Tried it with my fresh installation I made yesterday. Tested with Zips and Jpegs, also created a Jpeg with blanks in the name. Tested with 3 levels of subdirs. Cannot verify this problem. Tested with latest Firefox on Win7. What browser is that? Maybe a Mac problem? Edit: Maybe the modal window is caused by a directory permissions problem? |
Yepp. Can confirm this with directory set to read-only perms. (Everyone R, Administrators F) |
I can now confirm this bug. It happens when LEPTON_Helper_Upload is initialized. |
Could be the same problem like mentioned here: http://www.verot.net/php_class_upload_forum.htm?php_class_upload_forum_id=1694 |
Hmmm... will do some research. As a workaround, we could use is_writable() first to check if the directory is writable. Maybe disable upload button then. (?) |
I already tested "is_writable"... doesn't work. An error occured:Local file doesn't exist This message is thrown in Helper/Upload.php on line 714: if ($this->uploaded && !file_exists($file))
{
$this->uploaded = false;
$this->error = 'Local file doesn\'t exist.';
} |
is_writable works for me. I added it to the ajax_get_contents.php as a return value. Now the JS can de-activate the upload button.
Now I just have to find out how/where to de-activate that button... ;) |
That part of Helper/Upload.php is for local files, not for uploaded files. |
I get this error message since I try to initialize the upload class by $files = $admin->get_helper('LEPTON_Helper_Upload', $_FILES[$file_name]); |
That's the syntax for local files. See the comment:
|
I loop through all files, so $_FILES[$file_name] is an array and should work: $files = $admin->get_helper('Upload', $_FILES[$file_name]); Did I missed something? |
Just read the docs: Giving a FILENAME is treated as a local file. You will have to give the FIELDNAME (of the upload field) instead. |
It is the __FIELD__name. I will change the name of variable from $file_name to $field_name on next update. The value is the field name of the upload form. |
I get the error Notice: Array to string conversion in /www/htdocs/w00f93e4/kunden/lepton2/upload/framework/class.wb.php on line 705 |
Let's go some steps back and add the is_writable() check first. Maybe this solves both problems. |
Already tried it, but didn't solved the problem (I check is_writeable() in the backend/media/upload.php before I call the upload helper)... |
PLEASE take the is_writable() solution I made, which is MUCH earlier. Checking is_writable() when giving a local file will never work. |
Check if is_writable() on loading contents of folders. Be carful - currently this is only updated, when a folder is reloaded.
There are two problems:
We will first fix the first problem, after that we will hopefully find a easy solution to this problem |
This problem seems to be on local installation on Macs only. Could someone confirm this problem on a local installation on windows and linux? |
I'm not sure if I understand you right. The installer on Mac creates a read-only media folder? As said above, I can't confirm this for Win7/XAMPP. I had to tweak the NTFS permissions manually to get this error. Don't have a Linux environment at hand. |
It seems to be not a problem with permissions... I changed them to 0777. In my environment it also occurs when installing a fresh system. But thats another problem, that couldn't be figured out yet;-) |
Try XDebug. |
I have the problem now on blackcat-cms.org. As a workaround, I use the filemanager in CKE to upload files at the moment. So it's may not only a Mac problem. |
Hope I fixed this. Please check the next tagged release. (Should be 0.2.0) |
I found another small bug in this section: The folder url is not correct, when uploading a file. I will take a look on this small issue next week. |
This just happens at first try. Reason is that the hidden form field is updated AFTER the form is sent, so the file path is not correct. At next try, the right path is sent. |
I hope this is fixed, I am closing this issue now as the initial error is fixed, please open a new issue if new bugs occur. ;) |
First i have to say that i did not a fresh install with the current version in repository but just replaced the old files with the new ones. So maybe the problem described below is just a problem on my side.
When uploading a file, the progress bar (green/white striped) appears and then i get a modal message with no text in it (see screenshot). After pressing OK the previously uploaded file isn't in the media directory – seems the upload failed.
Having a look into the js console, i noticed some missing JS files:
By the way: The buttons "Alle Sektionen zeigen" and "Alle Sektionen verstecken" not working any more – propable because of the missing JS files.
Maybee i shoud do a fresh install next time? Could anyone confirm this behavior?
The text was updated successfully, but these errors were encountered: