I attempted to rename a file I had uploaded by simply going into the MySQL database and searching for the filename. The name appeared in 3 places in 2 records. The revision table and the files table. I changed the name to the new one and renamed the file to the correct name. The link is live -- but is says "Page not found" is the application/stream incorrect? What's going on? The link is right, yet the page says "Page not found" instead of pulling up the download screen. What's going on?

Comments

GreenLED’s picture

Any ideas?

» Respectfully, GreenLED
» Download Spybot

cog.rusty’s picture

A few things to try:
- Hit Ctrl+F5 to completely refresh your browser.
- If the file is in a linux server then its name should be case sensitive.
- Are you using Drupal's private or public download method?
- Check the html source of the page in your browser. Is the file's URL correct? What is it like?
- Does browsing directly to the the file's URL work?
- If any of these results in an error page, is that a drupal-themed error page, an error page from the server, or one from the browser?

GreenLED’s picture

I cannot directly access the file. However, the name of the file is exactly correct. It only works when I rename it back to the original name of the file. Does this tell you something? Hopefully a clue in that somehow. I am using public system for download, so it's a direct link.

» Respectfully, GreenLED
» Download Spybot

GreenLED’s picture

I don't know what kind of curse was plauging my work, but today it worked like a charm. Just for future onlookers, here's how to rename a file via the database.

First, open phpMyAdmin (or your MySQL Editor). Begin by doing an "exact search" (3rd radio button for phpMyAdmin) for the filename. Simply copy and paste the filename you want to change. Once the search is done, you should come up with 2 matches, one record will be located in the file_revisions table and the other will be located in the files table. First, edit the file_revisions table first with the new name. After this, rename the record in the files table. MAKE SURE to edit BOTH places in the files table, there are two place in that record. Once you've saved both, rename the file via ftp or what have you and then dump all your cache from your browser AND once you've tested to see if the new link works, also do a cache dump of your database --- IN DRUPAL. Drupal may act funny if something is cached. I'm specifically referring to the database caching feature. Contact me if you guys need help.

» Respectfully, GreenLED
» Download Spybot