7955 Posts in 1394 Topics by 945 members
|Go to End|
2 April 2010 at 3:02am
Wondered if you might be able to help me debug an issue, or if you would be interested in an hour or two of work today?
I'm running SS 2.4beta1, recent ImageGallery mod and recent Subsites working. At one point last week, the project seemed to be very stable so I locked all their revision numbers in my externals. Everything's great.
The one last issue I have is that when a User uploads files in the Files & Images area, it uploads into the correct 'virtual' directory but then creates another blank 'virtual' parent directory. I've pored through FileDataObjectManager.php and the SWFUpload code, turned the debugger on, etc. But am not able to -pinpoint what's creating the extra Folder. Perhaps, it's a JOIN query in the SQL that's causing it? If I set the 'SubsiteID' to 0 in the File table, then it works, but the User can then see all of the other Users asset directories.
A minor related issue, is that the file is physically uploaded to the '/assets/' root instead of into the selected directory.
Everything appears OK to the end-user, except for the extra directory created.
Thanks for your time!
2 April 2010 at 3:10pm
Still debugging. Everything looks fine in both the SWFUpload debugger and PHP logs (incidentally I found a nice way to debug the PHP functions that you can't see with SS debugger or FirePHP is just to write it to PHP error_log, probably obvious).
Is it possible there is a variable type issue? All of my asset folders are numbers, based on the ID of a particular store for this corporate HQ.
Thanks for any help anyone.
2 April 2010 at 4:44pm
The problem appears to be in line 23 of Folder.php.
$item = DataObject::get_one("Folder", "\"Name\" = '$part' AND \"ParentID\" = $parentID");
The filter is correct, but it's returning false.
2 April 2010 at 6:34pm
Crazy thing is I can do $item = DataObject::get_by_id('Folder', AN ID); and it works.
Something must be overriding 'get_one'?
|Go to Top|