Zen Cart Logo
Forums / General Questions / WARNING: An Error occurred, please refresh the page and try again (tried the fix)

WARNING: An Error occurred, please refresh the page and try again (tried the fix)

Views: 4,676

Results 1 to 20 of 22
8 Aug 2013, 12:28 PM
#1
woody619 avatar

woody619

Zen Follower

Join Date:
Jan 2007
Posts:
136
Plugin Contributions:
0

WARNING: An Error occurred, please refresh the page and try again (tried the fix)

Hi,
I accessed options_values_manager.php with no problem searched back and forwards between pages, deleted one option fine and when I went to rename another option I got a WARNING: An Error occurred, please refresh the page and try again.

Now that error is all I get on attributes controller, option names manager, option values manager.

I have tried the fix on http://www.zen-cart.com/showthread.php?200688-Known-Bugs-%28and-fixes%29-with-v1-5-1&p=1154025#post1154025 with no lucky.

I was deleting options in the attributes controller only a few weeks ago with no problems, nothing added or changed since then.

Website https://www.anythingframed.co.uk

Current version 1.5.1

Fresh install was 1.3.6 FTP and was upgraded to 1.3.7, 1.3.8, 1.3.9h, 1.5.0 and 1.5.1

Sadly the upgrade (last year) from 1.3.9h to 1.5.0 was done by someone on odesk (big mistake, big nightmare).

Used to have the old newsletter subscribe addon.

Have installed, tabbed products pro, Testimonials Manager, Recaptcha Settings, Sitemap XML.

It was never requested but added and turned off Ceon URI Mapping (SEO)

Error log
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 'int)PRODUCTS_OPTIONS_VALUES_TEXT_ID, 1, 'TEXT')' at line 1 :: INSERT INTO products_options_values (products_options_values_id, language_id, products_options_values_name) VALUES ((int)PRODUCTS_OPTIONS_VALUES_TEXT_ID, 1, 'TEXT') in /home/sites/anythingframed.co.uk/public_html/includes/classes/db/mysql/query_factory.php on line 120

8 Aug 2013, 2:50 PM
#3
woody619 avatar

woody619

Zen Follower

Join Date:
Jan 2007
Posts:
136
Plugin Contributions:
0

Re: WARNING: An Error occurred, please refresh the page and try again (tried the fix)

Thank you for your reply.

I have downloaded the 3 files in question and compared them to the 3 files from the fix folder and they are identical.

Back to scratching my head, can't understand how it works one minute but the next minute errors.

been using zencart since 2007 so i'm no newbie and have searched and read a lot of other posts before posting this.

8 Aug 2013, 4:07 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: WARNING: An Error occurred, please refresh the page and try again (tried the fix)

Woody619:

Error log
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 'int)PRODUCTS_OPTIONS_VALUES_TEXT_ID, 1, 'TEXT')' at line 1 :: INSERT INTO products_options_values (products_options_values_id, language_id, products_options_values_name) VALUES ((int)PRODUCTS_OPTIONS_VALUES_TEXT_ID, 1, 'TEXT') in /home/sites/anythingframed.co.uk/public_html/includes/classes/db/mysql/query_factory.php on line 120

While I understand that you say you changed it, if the errors you're STILL getting are indeed still the same as what you posted above, then you've not applied the fix, else the error message would be different.

8 Aug 2013, 4:40 PM
#5
woody619 avatar

woody619

Zen Follower

Join Date:
Jan 2007
Posts:
136
Plugin Contributions:
0

Re: WARNING: An Error occurred, please refresh the page and try again (tried the fix)

again thank you so much for your reply.

the error log now
[08-Aug-2013 17:37:01] PHP Fatal error: 1062: Duplicate entry '0-1' for key 'PRIMARY' :: INSERT INTO products_options_values (products_options_values_id, language_id, products_options_values_name) VALUES (0, 1, 'TEXT') in /home/sites/anythingframed.co.uk/public_html/includes/classes/db/mysql/query_factory.php on line 120

8 Aug 2013, 5:11 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: WARNING: An Error occurred, please refresh the page and try again (tried the fix)

The quick fix for that is (if I recall correctly) discussed in the thread that's linked in the post you quoted. Ajeh outlines the process. I'll summarize it here: find that products_option_values table in phpMyAdmin, and delete the records whose values are 0, 1, 'TEXT' already. After that the PHP code should work okay again.

8 Aug 2013, 6:15 PM
#7
woody619 avatar

woody619

Zen Follower

Join Date:
Jan 2007
Posts:
136
Plugin Contributions:
0

Re: WARNING: An Error occurred, please refresh the page and try again (tried the fix)

Excellent thank you very much, working now.

Just had to delete a 0 value in products_option_values table in phpMyAdmin.

19 Oct 2013, 7:13 PM
#8
jeffiec avatar

jeffiec

New Zenner

Join Date:
Jun 2009
Posts:
86
Plugin Contributions:
0

Re: WARNING: An Error occurred, please refresh the page and try again (tried the fix)

After applying this fix, I am having a strange issue when trying to apply an option value.

Scenario:
When selecting option names from the admin menu, upon loading the page, zen cart follows the code replaced by this fix, and displays what would be the next product name id in the first column of the table along the insert line, in my case, i have 20 option names, the number displays 21.
NOTE: This does not write to the table! I refreshed it several times going between this page and any other in the admin side.

When selecting option values from the admin menu, upon loading, zen cart follows the code replace by the fix for that code, and displays what should be the next option value, however, in the product value id, it displays 319, I only have 110? for some reason, it jumps 200+ id numbers.
NOTE: This DOES write to the database! It keeps the number in the database unlike the product options names. Navigating away and back, writes another entry.

So when you click insert, of course it fails with a duplicate record of 319 or what ever the last number it incremented to.
I just cant figure out where it is getting the 200+ jump in ids from?
Any help appreciated.
Jeff

20 Oct 2013, 2:13 PM
#9
jeffiec avatar

jeffiec

New Zenner

Join Date:
Jun 2009
Posts:
86
Plugin Contributions:
0

Re: WARNING: An Error occurred, please refresh the page and try again (tried the fix)

So rimming out this section, line 28 in options_value_manager.php is seeming to work, it no longer inserts the lines in the database when switching to and from the pages.
for ($i=0, $n=sizeof($languages); $i<$n; $i ++) {
if ((int)$languages[$i]['id'] > 0 && !in_array((int)$languages[$i]['id'], $ary)) {
// $db->Execute("INSERT INTO products_options_values (products_options_values_id, language_id, products_options_values_name) VALUES ((int)PRODUCTS_OPTIONS_VALUES_TEXT_ID, " . (int)$languages[$i]['id'] . ", 'TEXT')");
//$db->Execute("INSERT INTO " . TABLE_PRODUCTS_OPTIONS_VALUES . " (products_options_values_id, language_id, products_options_values_name) VALUES (" . (int)PRODUCTS_OPTIONS_VALUES_TEXT_ID . ", " . (int)$languages[$i]['id'] . ", 'TEXT')");
}
}
I know this is not the proper fix but it works for now, any help would be appreciated.
Jeff

24 Oct 2013, 1:35 AM
#10
bergernovelties avatar

bergernovelties

New Zenner

Join Date:
Apr 2008
Location:
Lindenwood, Illinois
Posts:
27
Plugin Contributions:
0

Re: WARNING: An Error occurred, please refresh the page and try again (tried the fix)

zen 1.5.1 linux refresh install ftp

adding attribute values cause error on product page. products show in category listing but getting error on product detail page. removing all attributes corrects problem.

1 Nov 2013, 4:30 AM
#11
bergernovelties avatar

bergernovelties

New Zenner

Join Date:
Apr 2008
Location:
Lindenwood, Illinois
Posts:
27
Plugin Contributions:
0

Re: WARNING: An Error occurred, please refresh the page and try again (tried the fix)

get this error message when trying to access the layout boxes controller.
ver. 151 fresh install on linux

1 Nov 2013, 5:14 AM
#12
ajeh avatar

ajeh

Oba-san

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

Re: WARNING: An Error occurred, please refresh the page and try again (tried the fix)

jeffiec:

So rimming out this section, line 28 in options_value_manager.php is seeming to work, it no longer inserts the lines in the database when switching to and from the pages.
for ($i=0, $n=sizeof($languages); $i<$n; $i ++) {
if ((int)$languages[$i]['id'] > 0 && !in_array((int)$languages[$i]['id'], $ary)) {
// $db->Execute("INSERT INTO products_options_values (products_options_values_id, language_id, products_options_values_name) VALUES ((int)PRODUCTS_OPTIONS_VALUES_TEXT_ID, " . (int)$languages[$i]['id'] . ", 'TEXT')");
//$db->Execute("INSERT INTO " . TABLE_PRODUCTS_OPTIONS_VALUES . " (products_options_values_id, language_id, products_options_values_name) VALUES (" . (int)PRODUCTS_OPTIONS_VALUES_TEXT_ID . ", " . (int)$languages[$i]['id'] . ", 'TEXT')");
}
}
I know this is not the proper fix but it works for now, any help would be appreciated.
Jeff

You might look at the Known bug fixes ... I do believe the fix for that is posted on it:
http://www.zen-cart.com/showthread.php?200688-Known-Bugs-%28and-fixes%29-with-v1-5-1

4 Nov 2013, 9:26 AM
#13
konzo avatar

konzo

New Zenner

Join Date:
Jan 2012
Posts:
24
Plugin Contributions:
0

Re: WARNING: An Error occurred, please refresh the page and try again (tried the fix)

bergernovelties:

get this error message when trying to access the layout boxes controller.
ver. 151 fresh install on linux

I have a problem when accessing the layout boxes controller also.

I get this - WARNING: An Error occurred, please refresh the page and try again

4 Nov 2013, 3:23 PM
#14
ajeh avatar

ajeh

Oba-san

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

Re: WARNING: An Error occurred, please refresh the page and try again (tried the fix)

What debug logs are you seeing in /logs ...

5 Nov 2013, 12:23 AM
#15
konzo avatar

konzo

New Zenner

Join Date:
Jan 2012
Posts:
24
Plugin Contributions:
0

Re: WARNING: An Error occurred, please refresh the page and try again (tried the fix)

Sorry I deleted the template and reinstalled the zencart template, works now without template. So I assume its something to do with the template.

14 Apr 2017, 4:22 AM
#16
gsallen101289 avatar

gsallen101289

New Zenner

Join Date:
Aug 2009
Posts:
44
Plugin Contributions:
0

Re: WARNING: An Error occurred, please refresh the page and try again (tried the fix)

My URL is http://completelydevoteddesigns.com

All was well until I started adding attributes. I am able to add the Option Name but when I try to add the Option Value I am directed to a page with the following:
"WARNING: An Error occurred, please refresh the page and try again."
http://completelydevoteddesigns.com/my_admin_name/options_values_manager.php?action=add_product_option_values&value_page=1

I was able to add an attribute a few days ago. I am not sure what broke. I applied the suggested fix from this thread.

Any thoughts?

14 Apr 2017, 1:36 PM
#17
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: WARNING: An Error occurred, please refresh the page and try again (tried the fix)

gsallen101289:

My URL is http://completelydevoteddesigns.com

All was well until I started adding attributes. I am able to add the Option Name but when I try to add the Option Value I am directed to a page with the following:
"WARNING: An Error occurred, please refresh the page and try again."
http://completelydevoteddesigns.com/my_admin_name/options_values_manager.php?action=add_product_option_values&value_page=1

I was able to add an attribute a few days ago. I am not sure what broke. I applied the suggested fix from this thread.

Any thoughts?
What Zen Cart version?
What PHP version?
What MySQL version?
What plugins do you have installed?
What exact error is recorded in your /logs/ folder when that message appears? http://www.zen-cart.com/content.php?124-blank-page

14 Apr 2017, 2:26 PM
#18
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 (tried the fix)

gsallen101289:

My URL is http://completelydevoteddesigns.com

All was well until I started adding attributes. I am able to add the Option Name but when I try to add the Option Value I am directed to a page with the following:
"WARNING: An Error occurred, please refresh the page and try again."
http://completelydevoteddesigns.com/my_admin_name/options_values_manager.php?action=add_product_option_values&value_page=1

I was able to add an attribute a few days ago. I am not sure what broke. I applied the suggested fix from this thread.

Any thoughts?

Glad that you've been able to operate as long as you have with ZC and not coming across such a similar issue. Be advised that anyone that was on email distribution from this thread has received your admin directory path, even though the post contents have been modified. Not sure what version of ZC you are using to be able to say what specifically is needed to change that directory, but suggest that you change your admin directory. There is a FAQ associated with it.

As to your issue, when you see an error message like that this FAQ is helpful: https://www.zen-cart.com/content.php?311-warning-an-error-occurred-please-refresh-the-page-and-try-again

Otherwise/addition to that, please when posting about an issue identify the information that is requested of the posting tips. It will help others help you.

14 Apr 2017, 8:08 PM
#19
gsallen101289 avatar

gsallen101289

New Zenner

Join Date:
Aug 2009
Posts:
44
Plugin Contributions:
0

Re: WARNING: An Error occurred, please refresh the page and try again (tried the fix)

DrByte:

What Zen Cart version?
What PHP version?
What MySQL version?
What plugins do you have installed?
What exact error is recorded in your /logs/ folder when that message appears? http://www.zen-cart.com/content.php?124-blank-page

PHP version: 5.6.30
Server version: 5.5.54-cll - MySQL Community Server (GPL)
I have the following plugins, Google ReCAPTCHA, Testimonial Manages, Ask with a Sidebox, Stirling Grand template, Litebox
I am honestly not sure how to get the log file. Or I cannot find a log related to the 124 error...

I do not think it is template related.

I do see this in phpMyAdmin (not sure if it is related
Your PHP MySQL library version 5.1.73 differs from your MySQL server version 5.5.54. This may cause unpredictable behavior.

14 Apr 2017, 8:15 PM
#20
gsallen101289 avatar

gsallen101289

New Zenner

Join Date:
Aug 2009
Posts:
44
Plugin Contributions:
0

Re: WARNING: An Error occurred, please refresh the page and try again (tried the fix)

mc12345678:

Glad that you've been able to operate as long as you have with ZC and not coming across such a similar issue. Be advised that anyone that was on email distribution from this thread has received your admin directory path, even though the post contents have been modified. Not sure what version of ZC you are using to be able to say what specifically is needed to change that directory, but suggest that you change your admin directory. There is a FAQ associated with it.

As to your issue, when you see an error message like that this FAQ is helpful: https://www.zen-cart.com/content.php?311-warning-an-error-occurred-please-refresh-the-page-and-try-again

Otherwise/addition to that, please when posting about an issue identify the information that is requested of the posting tips. It will help others help you.

Thank you mc12345678