Forums / General Questions / WARNING: An Error occurred, please refresh the page and try again

WARNING: An Error occurred, please refresh the page and try again

Views: 1,920

Results 1 to 6 of 6
9 Jul 2016, 3:53 AM
#1
pramitha avatar

pramitha

New Zenner

Join Date:
Jul 2016
Posts:
7
Plugin Contributions:
0

WARNING: An Error occurred, please refresh the page and try again

Hello,

We are having an issue with zencart checkout options on our site. Sometimes customers have an error on checkout. It displays that 'WARNING: An Error occurred, please refresh the page and try again. '. This issue does not happen every time however.
When they then place an order it creates three orders on the system, but they are all blank and so we can't see what they ordered.

I am able to access the MYSQL with the credentials given in the configure.php file. Also, I checked logs/myDEBUG-adm-1467907900-21022.log.
Its showing a warning '[07-Jun-2016 15:43:12 UTC] PHP Warning: Creating default object from empty value in public_html/admin/categories.php on line 1019'

PHP 5.5.36
Mysql 5.6.30
Zencart v1.5.1

This is a high priority issue, it would be great If you people can help me to fix this issue.

Regards,
Pramitha Paul

9 Jul 2016, 5:25 AM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: WARNING: An Error occurred, please refresh the page and try again

pramitha:

Sometimes customers have an error on checkout. It displays that 'WARNING: An Error occurred, please refresh the page and try again. '. This issue does not happen every time however.

How often is 'sometimes'? Every 10th order? once a day? once month?

Where is the site hosted?

How long has this problem been occurring?

Can you provide a link to the site so that we can see if we can replicate the problem?

pramitha:

When they then place an order it creates three orders on the system, but they are all blank and so we can't see what they ordered.

What payment methods do you have enabled? Does the problem only show with certain payments?

pramitha:

I am able to access the MYSQL with the credentials given in the configure.php file.

The site wouldn't be working at all if those were incorrect.

pramitha:

Also, I checked logs/myDEBUG-adm-1467907900-21022.log.
Its showing a warning '[07-Jun-2016 15:43:12 UTC] PHP Warning: Creating default object from empty value in public_html/admin/categories.php on line 1019'

Does this error coincide with the failed orders? (IOW, do you get this same log entry each time there is a problem?)
Is this the only entry in the logs folder?

pramitha:

This is a high priority issue, it would be great If you people can help me to fix this issue.

Best I can tell you with the information provided, is that something appears to be going wrong with some orders, some of the time. If this only happens once every month or so it could be a network glitch and nothing to do with the site itself. Basically, there are a lot of possible causes, so we need to narrow it down.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

9 Jul 2016, 4:56 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: WARNING: An Error occurred, please refresh the page and try again

pramitha:

Hello,

We are having an issue with zencart checkout options on our site. Sometimes customers have an error on checkout. It displays that 'WARNING: An Error occurred, please refresh the page and try again. '. This issue does not happen every time however.
When they then place an order it creates three orders on the system, but they are all blank and so we can't see what they ordered.

I am able to access the MYSQL with the credentials given in the configure.php file. Also, I checked logs/myDEBUG-adm-1467907900-21022.log.
Its showing a warning '[07-Jun-2016 15:43:12 UTC] PHP Warning: Creating default object from empty value in public_html/admin/categories.php on line 1019'

PHP 5.5.36
Mysql 5.6.30
Zencart v1.5.1

This is a high priority issue, it would be great If you people can help me to fix this issue.

Regards,
Pramitha Paul
Echoing RodG's suggestions, I'll also point out that the log you posted identifies a PHP warning, not a condition that will result in the "Warning: An error occurred..." message. That plus the fact that the file will be present in a file named myDEBUG-something.log, not myDEBUG***-adm***-something.log.

12 Jul 2016, 7:13 AM
#5
pramitha avatar

pramitha

New Zenner

Join Date:
Jul 2016
Posts:
7
Plugin Contributions:
0

Re: WARNING: An Error occurred, please refresh the page and try again

Hello,

Thank you all for your valuable suggestions.

I have checked the log file and got the error like,

[07-Jul-2016 11:12:46 UTC] PHP Fatal error: 1366:Incorrect string value: '\xA312.90' for column 'comments' at row 1 :: INSERT INTO orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) VALUES ('49577', '2', now(), '1', 'Could my returns come off and the £12.90') in /home/International/public_html/includes/classes/db/mysql/query_factory.php on line 120

I hope this is due to the zen cart encoding issue.

In client module configure.php , the character set is : utf8
In admin module configure.php, the character set is : iso-8859-1

I am able to insert the values ' £12.90' to DB using mysql prompt. I have checked the mysql charset and found that,

Server version: 5.6.30 MySQL Community Server (GPL)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8

So which charset I need to use in both configure.php? Please help me to proceed further.

Regards,
Pramitha

12 Jul 2016, 9:25 AM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: WARNING: An Error occurred, please refresh the page and try again

Well, ideally the same throughout, regardless of which one is used. There is a plugin convert db2utf8 that will/should migrate the DB to utf8, then there are several files (referenced in the plugin's instructions) that should also be modified.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...