I'm using Filebrowser 7.x-2.3

My directory listing is called "Private Directory" and the url is "www.website.com/subsite/private-directory" (yes Drupal is installed in a subfolder)

The system filepath to directory is outside of a browsable directory and the using this directory listing works great!

Here is the problem, when I upload files and link to them in other nodes for example on a page node content:
Download file

This link will work for awhile but then for some reason (not sure what triggers it) the related file that "100" relates to will now be "200" for example. It seems like the file links get reindexed and the numbers keep increasing.

What I'd like to have is "admin" users login and browse the Private Directory to upload/overwrite/delete files (which works now) and then take the file url and link to the file in a Page node (this doesn't work for very long). (Not really my preference in how this system works but that's what they want).

Comments

clivesj’s picture

I can not replicate this. On my test set-up the fid (file id) does not change.

In the link filebrowser/download/123 123 is the fid. It should not change. So you should be able to safely put this link in any content to retrieve a filebrowser file located elsewhere.

You can check the table node_dir_listing_content and see how the fid behaves. That might give us a clue.

Do you have a (test)system you can grant me access to, so I can check it out?

rbeard.iii’s picture

Ah ha, well this is my bad I think. Now that I see how the table works I don't think it would be making new fids. Sorry to post a noob question :/

clivesj’s picture

No problem, just let me know if you got the link working properly or if you need more info.

clivesj’s picture

Status: Active » Postponed (maintainer needs more info)
clivesj’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
ahmed.raza’s picture

@rbeard.iii, did you able to dig down what the root cause was? Please let me know as I am facing the same issue, like 100 of PDF documents' FIDs were renumbered.

This was reported by the client but like @clivesj I was also not able to reproduce this on production as well as on my local.

Please let me know what the issue is. Any help would be appreciated.

Thanks

clivesj’s picture

Ahmed, what version are you using?
This issue is for 7.x-2.3.
Current version is 7.x-3.5

Even though I could not reproduce this bug in this thread, later on there were 2 issues with the file ID' s that affected the urls.
This has been corrected down the way.
If you are using the recent version, this should not occur.

clivesj’s picture

Status: Closed (cannot reproduce) » Active
ahmed.raza’s picture

@Clivesj, apologies for late reply I was on holidays. Current version on production is 3.0

Client reported this issue on 10th August. I had nothing to say other than asking for re-uploading/fixing the urls throughout the site in the content (site is pretty big and there are lots of files being uploaded on the backend and are linked in the nodes). So she fixed all the urls on 13th August and since then the issue has not resurfaced.

I tried to reproduce on my local by uploading a file and then running cron manually, clearing caches infect left the uploaded files for days and the issue didn't reproduce.

Not sure how and what triggered the issue.

Any help would be appreciated.

Thanks

clivesj’s picture

Hello Ahmed.

Running version 3.0 will lead to two problems.

1. If you update the node (choose Edit and then Save) the file id's and therefore the url's will change. This will cause trouble if (like in your case) the files are linked. This has been identified and corrected in later a later version.
As far as I can see there is no way you can retrieve the old Id's to restore the original ID's. You will have to reset the links.

2. If web spider crawl your website looking for files that don't exists, like node/1/1234 (and file 1234 does not exists) this will cause ghost entries in your DB. If there was a lot of crawling going on, there will be a lot of entries and you might end-up with a very bloated DB.
This was also corrected in a later version.

You can out these two issues for reference:

Please check these issues and see for yourself what the best course of action will be.
I would say you should follow the steps in the second link.

Let me know if I can be of any help.

ahmed.raza’s picture

Clivesj, thanks a lot for the explanation. I was able to reproduce it by editting the node and saving it and was shocked to see all the files were renumbered.

I will add this note for them to not to edit the node.

One last thing can I update the module to a recent stable version will that fix these both problems the saving node and the webspiders ?

Thanks again man!

clivesj’s picture

Status: Active » Closed (works as designed)

Ahmed, yes. You update directly to the latest stable. The fid will not change anymore.
Please let me know if you need more help.
I am closing this one for the time.