Closed (fixed)
Project:
Asset
Version:
5.x-1.0-rc1
Component:
User interface (Asset wizard)
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Aug 2008 at 03:13 UTC
Updated:
14 Jul 2012 at 19:19 UTC
I just tried to upload an image to include in a post. I click "upload" and then pick the file and then click "next" and it says, "The file kira_ezri.jpg has been successfully uploaded" and immediately under that it says "Please select a file" in red. As far as I can tell by poking around on the server, the image isn't being uploaded. There's no errors showing up in the logs. I've checked the settings pages but can't see anything I'm missing. Is there some trick to getting this to work?
Thanks,
Michelle
Comments
Comment #1
wmostrey commentedHey Michelle, are you able to upload files on that machine using other methods, for instance the core upload module or the image module? This should work out-of-the-box. I re-checked on several installations with rc1 and they all work as expected, with or without imagecache or TinyMCE for instance.
Comment #2
michelleI can upload with imagefield. I think this may be a directory problem. In the wizard, it says the directory is "assets/michelle" and there is no such directory under "files". Plus, when I actually go to upload the image, the only directory to choose in the drop down is "assets". "Michelle" isn't an option. I'm going to try creating those directories and see if that fixes it.
Michelle
Edit: I just realized that my image _is_ uploading but it's uploading to the root of "files" which makes me think I was right above.
Edit2: Creating the directories broke the asset wizard. It just sits there trying to load. I suspect I've got the permissions wrong. What should they be set to? Also, assuming this fixes the problem, how do I get asset to create the directory for other users so I don't have to do them all by hand?
Comment #3
wmostrey commentedWell normally you don't have to create the directories by hand. On a normal drupal installation after creating the files directory the asset module handles this all by itself. It must indeed be a problem with the webserver not being able to create new directories from within the files directory. I'm not sure what the permissions for that should be, I've never run into this issue before.
Comment #4
michelleStrange... There's lots of other directories in there created by Drupal. This is the only module having trouble. Not sure what to say at this point. Obviously this is working for other people or your issue queue would be full of complaints. :) I'll have to see if I can find someone with a working asset module to tell me what the permissions are set to on their directories.
Michelle
Comment #5
michelleActually, I just looked again and the wizard not loading must have been a connection glitch. The wizard comes up but I still have the same problem as before. The directories are there but it uploads the file into the files root. I tried changing them to 777 and it didn't help so I guess it's not a permissions problem. For some reason asset just doesn't want to upload anywhere but the root. I guess I'll have to trace thru the code.
Michelle
Comment #6
michelleOk, some debugging:
"Parent" is empty and "Path" is "files/kira_ezri.jpg". I need to dig further to figure out why it's setting the path wrong but I need to leave for a few hours. Thought that might spark an idea if you're around.
Michelle
Comment #7
michelleHad just a few more minutes so I tried to trace some more but I can't figure out where $form_values['parent'] gets set. Could you point me in the right direction?
Thanks,
Michelle
Comment #8
wmostrey commentedThe 'parent' item is just the value from the "Directory" dropdown when you upload a file. It should only be empty if you're uploading to the main direcotory (/files).
Comment #9
michelleThe only thing in the directory drop down is "assets" so there's no option to select anything else. It's not possible to select "michelle" and it seems like it should default there since I wouldn't want regular users uploading to the root... I'll try as a regular user and see what options I have, if any.
If the parent item is supposed to be what's in that drop down, then it's not getting set properly since that would be "assets"
Michelle
Comment #10
michelleOk, checked with a regular authenticated user. There's nothing in the dropdown at all. When I try to upload the file with that account, it makes a directory off files (NOT off assets) for that user and puts it in there. But still doesn't recognize that it's been uploaded in the wizard.
Any suggestions where to look from here? I'm willing to do the legwork since you can't repro this but I could use a bit of guidance about where to put the debugging code.
Thanks,
Michelle
Comment #11
michelleWould I be better of switching to version 2? I know the recommended one is v1 but, since I can't get that to work...
Michelle
Comment #12
wmostrey commentedWould you be able to post a dump of the asset table? That would help. Also, could you try the module on a new installation on the same server?
Do note that version 2 has been discontinued.
Comment #13
michelleMy client has asset on his site, which is on the same server, and it works for him other than the odd glitch here and there.
There's only one record in the asset table:
"5" "file" "test" "1" "1" "1205552667" "1205552667" "0" "" ""
That timestamp is from last March so is from when I first installed asset and it's not related to the file I've been trying to upload.
I'm sorry to hear asset 2 has been discontinued. :( I installed it to try it out a while back and it had such a nice UI. I've been hoping it would become the official one soon.
Is there anywhere I can set what directory asset should be using? I've gone through the asset* tables, the variables table, and the settings and can't see anything anywhere.
Thanks,
Michelle
Comment #14
wmostrey commentedAh you come from one of the early betas? It might be a good idea to completely disable/uninstall the asset module and try a new installation. There have been some changes to add support for the private download method so that might be playing with you now. I wasn't aware that you were playing with such an old installation. Would that be possible for you, since you only have one record?
We're currently pushing for a Drupal 6 release and we'll probably be working on a shiny new GUI after that. Also feel free to take a look at this groups issue: http://groups.drupal.org/node/13898.
Comment #15
michelleOk, completely reinstalling seems to have fixed the problem. Unfortunately, I've run into another one. The project page says it provides integration with imagecache 1 but it sounded like that was optional. But I can't find any place to turn the integration off and it's having a fatal error trying to find a function in imagecache. So I guess the issue here is fixed but I'll have to wait for imagecache 2 integration before I can use it.
Thanks for all your help. I should have just tried a complete re-install to begin with. I didn't realize just how long it had been since I installed it.
Michelle
Comment #16
wmostrey commentedGood news: imagecache2 support is already in the dev (soon-to-be-rc2) version.
Comment #17
michelleOh? When it said it was in dev, I thought that meant in development, not that it was actually in the dev version. LOL! Awesome, I'll move to the dev, then. Thanks!
Michelle
Comment #18
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.