2 replies [Last post]
peach's picture
Offline
Joined: 01/30/2009
Juice: 67
Was this information Helpful?

After a redesign of my website and a fresh new developing/staging setup I was also playing with the ubercart secure files directory for digital downloads. After I noticed this messed up my product/file download relationships I quickly restored the directory and it's file contents to exactly how it was before. All files related tables had been emptied by ubercart.
Then I noticed all users and product had lost their file downloads, so I restored the uc_files, uc_file_users, uc_file_products and uc_product_features database tables. This seemed to have fixed the problem but now all download links dont work anymore. On top of that, every time I try a download link or try to add files to a user all the aforementioned tables are emptied again!

Does anyone know why ubercart is behaving this way? is there any quick fix or hack to prevent this, even a temporary fix would do for now because I'll soon have hundreds of users complaining if I don't fix this.

peach's picture
Offline
Joined: 01/30/2009
Juice: 67
Re: Complete ubercart file downloads system got messed up

after another database backup restore it seems to be all good. I don't really like this feature where ubercart empties out my database tables, makes me very nervous. If anyone googles this thread, these are the tables that need to be restored when you find out your product- and user-file relationships are gone:

uc_files
uc_file_users
uc_file_products
uc_product_features

royerd's picture
Offline
Joined: 01/22/2008
Juice: 293
Re: Re: Complete ubercart file downloads system got messed up

I have had this happen too. The tables seem very temperamental. I've lost files several times and had to restore by adding whole groups of tables back in. Although I've seen this discussed elsewhere in these forums, I've not found it adequately explained. The best that I've seen is torgospizza explain that certain actions (like updating a product feature or updating a user profile) cause the module to scrape the ../files directory where the downloads are. He didn't say what happened after that to cause the problem, but the point is that these tables seem to get an "update" when the directory is re indexed or whatever--scraped to find new files. In that process, I think the files can get lost if everything is not square. I suspect the sequence table. But if you have any other description of this problem, I'd love to hear.