WARNING: An Error occurred, please refresh the page and try again.
OK, I need some help, and I am not sure if this is the correct spot.
I have upgraded to v1.5.
I am doing a re-write for purchase orders, which is essential for my clients store.
everything up to this point is working fine until i try to view the order in admin.
I have traced my error to the order class in admin.
I have successfully added a new column in zen_orders however under function query, when I insert the purchase_order_number. It just crashes the view/edit order.
original
Code:
function query($order_id) {
global $db;
$order = $db->Execute("select cc_cvv, customers_name, customers_company, customers_street_address,
customers_suburb, customers_city, customers_postcode, customers_id,
customers_state, customers_country, customers_telephone,
customers_email_address, customers_address_format_id, delivery_name,
delivery_company, delivery_street_address, delivery_suburb,
delivery_city, delivery_postcode, delivery_state, delivery_country,
delivery_address_format_id, billing_name, billing_company,
billing_street_address, billing_suburb, billing_city, billing_postcode,
billing_state, billing_country, billing_address_format_id,
coupon_code, payment_method, payment_module_code, shipping_method, shipping_module_code,
cc_type, cc_owner, cc_number, cc_expires, currency,
currency_value, date_purchased, orders_status, last_modified,
order_total, order_tax, ip_address
from " . TABLE_ORDERS . "
where orders_id = '" . (int)$order_id . "'");
after i insert purchase order
Code:
function query($order_id) {
global $db;
$order = $db->Execute("select cc_cvv, customers_name, customers_company, customers_street_address,
customers_suburb, customers_city, customers_postcode, customers_id,
customers_state, customers_country, customers_telephone,
customers_email_address, customers_address_format_id, delivery_name,
delivery_company, delivery_street_address, delivery_suburb,
delivery_city, delivery_postcode, delivery_state, delivery_country,
delivery_address_format_id, billing_name, billing_company,
billing_street_address, billing_suburb, billing_city, billing_postcode,
billing_state, billing_country, billing_address_format_id,
coupon_code, payment_method, payment_module_code, shipping_method, shipping_module_code,
cc_type, cc_owner, cc_number, cc_expires, currency,
currency_value, date_purchased, orders_status, last_modified,
order_total, order_tax, ip_address, purchase_order_number
from " . TABLE_ORDERS . "
where orders_id = '" . (int)$order_id . "'");
i get "WARNING: An Error occurred, please refresh the page and try again." when I try to look at the order in admin.
Help what am I doing wrong or missing.
Thanks
Re: Warning error ... I need your help
Quote:
Originally Posted by
l3ackdraft
"WARNING: An Error occurred, please refresh the page and try again."
A search in the FAQs for your error message brings up this article: https://www.zen-cart.com/tutorials/i...hp?article=412
Re: WARNING: An Error occurred, please refresh the page and try again.
Well let me ask you this Doc.
Can you tell me or point me into a direction, where i can include the the purchase_order_number from the sql without "hacking" the orders.php class file.
Is this even possible.
Re: WARNING: An Error occurred, please refresh the page and try again.
What's the actual SQL error message?
You can't merely add a random field name to a query if that field doesn't exist in the table you're querying. So, if you're getting an SQL error that tells you a certain field doesn't exist, then ... well ... it doesn't exist. Maybe you've got a typo on the field name. Maybe you added the field to the wrong table or the wrong database. All kinds of things could be wrong with what you've done. Without the actual SQL error, it's just a guess.
As for whether you need to hack the core code, that all depends on whether you need the functionality you're hacking into the code. Maybe you can live without it? If not, then unless there's a notifier hook in the code you'll need to alter the code. In v1.x there aren't many notifier hooks in the admin side, for technical reasons.
Re: WARNING: An Error occurred, please refresh the page and try again.
I just upgraded from v1.39g to 1.5 and I experienced the same problem.
I did as DR recommended and checked the cache log files. It told me that there was no order_status file in DB. I updated the db sucessfully but for some reason order_status disappeared.
I have updated 5 other sites and never experienced the probelm.
I just copied the order_status file from a working v1.5 DB thru my control panel phpmyadmin.
Check your cache log files, its probably something very similar.
Re: WARNING: An Error occurred, please refresh the page and try again.
Just an FYI for anyone having this issue, here's what happened to me and why.
I was getting this error as well, after making a change to allow for PHP to run within EZ-Pages (private site, no security risks that are major - beware when doing this, however).
The error, after viewing the log files in /cache turned out to be that the database I was referring to within my PHP code was a different one than Zen uses, and it was throwing an error from the query_factory.php file. So, I prefixed the tables from my foreign database and imported them to the database running Zen (different prefix so that anyone would know at a glance that they're not zen tables) and voila!, no more error displayed and all looks swell.
The moral of the story is: this project (Zen) is simply wonderful. The community is helpful and if you are diligent and read everything about any problems which others experience which are at all *similar* to yours, you'll likely find the answer.
Thank you Zen team...coffee's on me come payday. :D
-R
Re: WARNING: An Error occurred, please refresh the page and try again.
So that you can see the error more clearly, try this http://www.zen-cart.com/content.php?...rror_reporting
Re: WARNING: An Error occurred, please refresh the page and try again.
Hacked. Somehow thru csf they got me.
I had done some research because mysql was effected. One suggestion was to delete the ibdata files. Well, I saved them locally and then deleted them on the server. .frm files were not touched. I have since restored the original ibdata files.
Nothing really damaged though.
but pages arent loading. log says missing table. Ordinarilly not a problem. But its CEON uri. Install dow not come with tables. It creates them.
I checked the server, and they are there in var/lib/mysql. In phpmyadmin, table is named but when I click on it it says missing table.
So. How can I refresh phpmyadmin to pickup the tables?
Re: WARNING: An Error occurred, please refresh the page and try again.
Quote:
Originally Posted by
pixelpadre
I had done some research because mysql was effected. One suggestion was to delete the ibdata files. Well, I saved them locally and then deleted them on the server. .frm files were not touched. I have since restored the original ibdata files.
Nothing really damaged though.
but pages arent loading. log says missing table. Ordinarilly not a problem. But its CEON uri. Install dow not come with tables. It creates them.
I checked the server, and they are there in var/lib/mysql. In phpmyadmin, table is named but when I click on it it says missing table.
So. How can I refresh phpmyadmin to pickup the tables?
phpMyAdmin simply reports what it reads from MySQL.
And MySQL usually reports everything automatically, except occasionally when things are damaged.
Sometimes restarting MySQL is enough.
Sometimes repairing the tables manually from the command-line is necessary:
Code:
mysqlcheck --all-databases -r #repair
Re: WARNING: An Error occurred, please refresh the page and try again.
Yea i had already tried the repair. All that did was show me all the bad tables. :( Its weird how all of the zc databases only had the ceon table effected. I have 5-6 zc installs