Zen Cart Logo
Forums / General Questions / Accidentally Set Download Status To Expired, Can't Fix

Accidentally Set Download Status To Expired, Can't Fix

Views: 1,141

Results 1 to 11 of 11
31 Oct 2013, 5:42 PM
#1
scully avatar

scully

Zen Follower

Join Date:
Dec 2010
Posts:
257
Plugin Contributions:
0

Accidentally Set Download Status To Expired, Can't Fix

I just did something stupid...I accidentally clicked on the green "Status - Available" link for a customer's download order, and it went yellow (Status - Expired). When I try to reset it, I get the following error message: WARNING: An Error occurred, please refresh the page and try again. Refreshing doesn't help. I just keep getting the error message...and when I go back into his Orders page, the link remains yellow. I've tried about 10 times now to reset it, and gotten the same error every time.

Fortunately he already downloaded his book...but I'd really like to figure out what's causing the error, and fix it. Can anyone please help? Thanks!!

31 Oct 2013, 5:53 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Accidentally Set Download Status To Expired, Can't Fix

I cannot repeat the problem ...

If you look in your /cache or /logs directory (depends on version and v1.5 should be /cache) what debug logs do you see?

31 Oct 2013, 6:11 PM
#3
scully avatar

scully

Zen Follower

Join Date:
Dec 2010
Posts:
257
Plugin Contributions:
0

Re: Accidentally Set Download Status To Expired, Can't Fix

Hopefully I attached the screenshot properly...first time I've done that. ;-)

Thanks for your help!

Oh my, that came out nice! :D

31 Oct 2013, 6:36 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Accidentally Set Download Status To Expired, Can't Fix

Nice screen shot, but not quite what I am looking for ... :lookaroun

On your server, you have a directory:
/cache

in it you should see files that start with:
myDEBUG

Trigger the error, then refresh the directory to get the most recent myDEBUG file created ...

If you View it, you will see the contents and it should show the problem that triggers the warning ...

31 Oct 2013, 6:50 PM
#5
scully avatar

scully

Zen Follower

Join Date:
Dec 2010
Posts:
257
Plugin Contributions:
0

Re: Accidentally Set Download Status To Expired, Can't Fix

LOL Well, at least I figured out how to upload a file the right way!!

Okay, here's the most recent error report, and I hope it makes more sense to you than it does to me! :blink:

[31-Oct-2013 13:47:59] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sFantasy.epub'
and pa.products_id = '336'' at line 4 :: SELECT pa.products_attributes_id, pa.products_id, pad.products_attributes_filename, pad.products_attributes_maxdays, pad.products_attributes_maxcount
from products_attributes pa, products_attributes_download pad
WHERE pa.products_attributes_id = pad.products_attributes_id
and pad.products_attributes_filename = 'E.R.O.Scott-Robert'sFantasy.epub'
and pa.products_id = '336' in /home/carnal1/public_html/zencart/includes/classes/db/mysql/query_factory.php on line 101

31 Oct 2013, 6:53 PM
#6
scully avatar

scully

Zen Follower

Join Date:
Dec 2010
Posts:
257
Plugin Contributions:
0

Re: Accidentally Set Download Status To Expired, Can't Fix

Duh. I need to change the file name, so that there's not an apostophe in it, don't I? That will fix all future problems. But is there a way to fix the existing line item?

31 Oct 2013, 6:59 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Accidentally Set Download Status To Expired, Can't Fix

The problem is your naming convention for your file:
E.R.O.Scott-Robert'sFantasy.epub

At the least, the apostrophe in the name is causing issues ...

You need to only use letters and numbers in your filenames to not cause issues ...

You can try to manually change the settings on the file in phpMyAdmin in the table:
orders_products_download

and locate the Download in that file and change the days/count as needed ...

NOTE: When changing days, remember the days in the number of days from when the Order was made, so if you want to extend the time period, just adjust the days as needed ...

Meanwhile, you should really fix your filenames so that none contain spaces or special characters to avoid these issues in the future ...

31 Oct 2013, 7:00 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Accidentally Set Download Status To Expired, Can't Fix

Scully:

Duh. I need to change the file name, so that there's not an apostophe in it, don't I? That will fix all future problems. But is there a way to fix the existing line item?

You are getting good at this ... :cool:

To fix the current issue, change the filename on the server then change it in the same table:
orders_products_download

31 Oct 2013, 7:41 PM
#9
scully avatar

scully

Zen Follower

Join Date:
Dec 2010
Posts:
257
Plugin Contributions:
0

Re: Accidentally Set Download Status To Expired, Can't Fix

At the risk of looking like a total moron again...where do I find the phpMyAdmin, let alone orders_products_download? :unsure:

31 Oct 2013, 7:44 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Accidentally Set Download Status To Expired, Can't Fix

phpMyAdmin comes with your domain Control Panel, such as cPanel ...

There should be an option for phpMyAdmin and then you can find your database for your site and in that will be the tables of the database and you should see that table ...

If you search that table for the Order, you can fix the filename on it to match your new filename ...

31 Oct 2013, 7:49 PM
#11
scully avatar

scully

Zen Follower

Join Date:
Dec 2010
Posts:
257
Plugin Contributions:
0

Re: Accidentally Set Download Status To Expired, Can't Fix

Oh. LOL Okay. I knew I'd seen it, but couldn't remember where...my brain is fried! :onfire: Thanks!