I am trying to investigate File Not Found errors. It might very well be that by upgrading and strange chmod settings on my server I cause some of the errors myself. Or that the errors come from older versions of filedepot (before 1.0). This is not so much the point of this issue. Instead I am concerned mostly with what should happen. In the absence of documentation (http://drupal.org/node/897998) I am trying to figure that out. So this is both the request for more documentation as well as the attempt to provide some of it myself.
Results:
- A directory inside filedepot is actually a node of the type filedepot_folder,sometimes also referred to as category. Each category has nodeid (nid in {node}) and a category id (cid in {filedepot_categories}). It is also likely that a directory of the same name exists somewhere in the drupal filesystem. I am not quite certain how to explain it. My current guess is that categories as such don't necessarily have a directory on the filesystem. They are created only under certain conditions which is to bothersome to go into at this point.
- A file in filedepot resides somewhere on the drupal filesystem. If you have the fid you can look up the location in {files}, including - of course- the directory in which it is in. Info about the category into which it is placed is in {filedepot_files} which has a cid column.
Before I continue here I need to read up on drupal's file handling.
How I get here
I got to filedepot's ajax interface at my.site.com/filedepot. Latest files lists a number of files recently uploaded.
I can download most of them, but not all, by clicking on the green arrow at the right. Where it fails, I get a new page (ajax windows disappears) with "Page not found" message. The URL is http://my.site.org/filedepot_download/250/196
Back on the ajax browser there is no apparent reason for why the download fails. A different file in the same folder downloads fine (http://my.site.org/filedepot_download/250/197 works). No difficult characters in file name etc.
How does drupal/filedepot determine where to look for from that url? I look at my DB. There is a table {filedepot_files}. The last no. from the link 196 and 197 are the fid. What is the other number? No directory info in that table.
fid seems to be a normal drupal file id. I find the full path in {files} including some other files I dealt with with filedepot, but not the two example files.
Maybe directories are called categories. The is a table called {filedepot_categories} which has an index column called cid and seems to describe directory like items, but this is NOT the other number from the link above. That is in a column called nid. Drupal's node id. Filedepot maps categories to nods, i.e. every category has to have a nid.
I notice that I cannot switch to any folder by clicking on that folder. Links are all http://my.site.com/filedepot# which reloads the ajax browser. Probably a separate issue. I will investigate/file that separately later.
So I try to find that file on filesystem to check rights.
It turns out to be at $filedepot_root/administration/Kick_Off_Summary.pdf
(I call $filedepot_root the directory which is specified in the Filedepot settings.)
which seems not to be the directory indicated on ajax browser overview.
I compare this with the file which is listed as being in the same folder. That one is located at
depot20/Kick_Off_Meeting_Action_Log.pdf
which is strange because it is in a sister directory to $filedepot_root. In my understanding this should never happen.
Comments
Comment #1
mokko commentedAnother attempt
{filedepot_files}: fid, cid, fname, title, description ...
{filedepot_categories}: cid, pid,nid,vid,name, description ...
{files}: fid, uid, filename, filepath ...
this is pretty straight forward. It seems.
Comment #2
blainelang commentedSuspect this all related to missconfigured installation.
Comment #3
_timpatrick commentedClosing as there has been no activity for a while. If you wish - and the issue still exists - you may reopen it.