Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Basic Configuration / I have "WARNING: An Error occurred, please refresh the page and try again" on my site

I have "WARNING: An Error occurred, please refresh the page and try again" on my site

Started by lina0962 on 23 Dec 2014, 9:53 PM · Views: 3,189

Results 1 to 6 of 6
23 Dec 2014, 9:53 PM
#1
lina0962 avatar

lina0962

Zen Follower

Join Date:
Jun 2006
Posts:
403
Plugin Contributions:
0

Post #1 by lina0962

I deleted the configuration.sql table from my database to figure it out something, then I importaed the same configuration table from my desktop to my database. Now the website is showing a "WARNING: An Error occurred, please refresh the page and try again", but the admin is still functioning. What is the problem? How to fix it??

23 Dec 2014, 10:12 PM
#2
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Post #2 by frank18

lina0962:

I deleted the configuration.sql table from my database to figure it out something, then I importaed the same configuration table from my desktop to my database. Now the website is showing a "WARNING: An Error occurred, please refresh the page and try again", but the admin is still functioning. What is the problem? How to fix it??

What are the entries in your /logs or /cache folder saying?
http://www.zen-cart.com/content.php?311-warning-an-error-occurred-please-refresh-the-page-and-try-again
http://www.zen-cart.com/content.php?124-blank-page

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

19 Mar 2015, 3:43 PM
#3
adb34 avatar

adb34

Totally Zenned

Join Date:
Mar 2008
Location:
Brampton, Cumbria, United Kingdom, United Kingdom
Posts:
825
Plugin Contributions:
0

Post #3 by adb34

I am getting this error with 1.5.4 when I try to upload the sql file for 'easy populate'.

Two file are generated in my logs folder;

Install Easy Populate Configuration for zen cart v1.5

SET @configuration_group_id=0;
SELECT (@configuration_group_id:=configuration_group_id)
FROM configuration_group
WHERE configuration_group_title = 'Easy Populate'
LIMIT 1;
DELETE FROM configuration WHERE configuration_group_id = @configuration_group_id AND @configuration_group_id != 0;
DELETE FROM configuration_group WHERE configuration_group_id = @configuration_group_id AND @configuration_group_id != 0;

INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES (NULL, 'Easy Populate', 'Config options for Easy Populate', '1', '1');
SET @configuration_group_id=last_insert_id();
UPDATE configuration_group SET sort_order = @configuration_group_id WHERE configuration_group_id = @configuration_group_id;

INSERT INTO configuration VALUES
('', 'Uploads Directory', 'EASYPOPULATE_CONFIG_TEMP_DIR', 'tempEP/', 'Name of directory for your uploads (default: tempEP/).', @configuration_group_id, '0', NULL, now(), NULL, NULL),
('', 'Upload File Date Format', 'EASYPOPULATE_CONFIG_FILE_DATE_FORMAT', 'm-d-y', 'Choose order of date values that corresponds to your uploads file, usually generated by MS Excel. Raw dates in your uploads file (Eg 2005-09-26 09:00:00) are not affected, and will upload as they are.', @configuration_group_id, '1', NULL, now(), NULL, 'zen_cfg_select_option(array("m-d-y", "d-m-y", "y-m-d"),'),
('', 'Default Raw Time', 'EASYPOPULATE_CONFIG_DEFAULT_RAW_TIME', '09:00:00', 'If no time value stipulated in upload file, use this value. Useful for ensuring specials begin after a specific time of the day (default: 09:00:00)', @configuration_group_id, '2', NULL, now(), NULL, NULL),
('', 'Split File On # Records', 'EASYPOPULATE_CONFIG_SPLIT_MAX', '300', 'Default number of records for split-file uploads. Used to avoid timeouts on large uploads (default: 300).', @configuration_group_id, '3', NULL, now(), NULL, NULL),
('', 'Maximum Category Depth', 'EASYPOPULATE_CONFIG_MAX_CATEGORY_LEVELS', '7', 'Maximum depth of categories required for your store. Is the number of category columns in downloaded file (default: 7).', @configuration_group_id, '4', NULL, now(), NULL, NULL),
('', 'Upload/Download Prices Include Tax', 'EASYPOPULATE_CONFIG_PRICE_INC_TAX', 'false', 'Choose to include or exclude tax, depending on how you manage prices outside of Zen Cart.', @configuration_group_id, '5', NULL, now(), NULL, 'zen_cfg_select_option(array("true", "false"),'),
('', 'Make Zero Qty Products Inactive', 'EASYPOPULATE_CONFIG_ZERO_QTY_INACTIVE', 'false', 'When uploading, make the status Inactive for products with zero qty (default: false).', @configuration_group_id, '6', NULL, now(), NULL, 'zen_cfg_select_option(array("true", "false"),'),
('', 'Smart Tags Replacement of Newlines', 'EASYPOPULATE_CONFIG_SMART_TAGS', 'true', 'Allows your description fields in your uploads file to have carriage returns and/or new-lines converted to HTML line-breaks on uploading, thus preserving some rudimentary formatting (default: true).', @configuration_group_id, '7', NULL, now(), NULL, 'zen_cfg_select_option(array("true", "false"),'),
('', 'Advanced Smart Tags', 'EASYPOPULATE_CONFIG_ADV_SMART_TAGS', 'false', 'Allow the use of complex regular expressions to format descriptions, making headings bold, add bullets, etc. Configuration is in ADMIN/easypopulate.php (default: false).', @configuration_group_id, '8', NULL, now(), NULL, 'zen_cfg_select_option(array("true", "false"),'),
('', 'Debug Logging', 'EASYPOPULATE_CONFIG_DEBUG_LOGGING', 'true', 'Allow Easy Populate to generate an error log on errors only (default: true)', @configuration_group_id, '9', NULL, now(), NULL, 'zen_cfg_select_option(array("true", "false"),');

INSERT INTO admin_pages VALUES ('easyPopulate', 'BOX_TOOLS_EASY_POPULATE', 'FILENAME_EASYPOPULATE', '', 'tools', 'Y', @configuration_group_id);
INSERT INTO admin_pages_to_profiles VALUES ('1', 'easyPopulate');
INSERT INTO admin_pages VALUES ('easyPopulateConfig', 'BOX_CONFIGURATION_EASY_POPULATE', 'FILENAME_CONFIGURATION', CONCAT('gID=',@configuration_group_id), 'configuration', 'Y', @configuration_group_id);

and

[19-Mar-2015 15:38:45 UTC] PHP Fatal error: 1136:Column count doesn't match value count at row 1 :: INSERT INTO jmi_configuration VALUES ('', 'Uploads Directory', 'EASYPOPULATE_CONFIG_TEMP_DIR', 'tempEP/', 'Name of directory for your uploads (default: tempEP/).', @configuration_group_id, '0', NULL, now(), NULL, NULL), ('', 'Upload File Date Format', 'EASYPOPULATE_CONFIG_FILE_DATE_FORMAT', 'm-d-y', 'Choose order of date values that corresponds to your uploads file, usually generated by MS Excel. Raw dates in your uploads file (Eg 2005-09-26 09:00:00) are not affected, and will upload as they are.', @configuration_group_id, '1', NULL, now(), NULL, 'zen_cfg_select_option(array("m-d-y", "d-m-y", "y-m-d"),'), ('', 'Default Raw Time', 'EASYPOPULATE_CONFIG_DEFAULT_RAW_TIME', '09:00:00', 'If no time value stipulated in upload file, use this value. Useful for ensuring specials begin after a specific time of the day (default: 09:00:00)', @configuration_group_id, '2', NULL, now(), NULL, NULL), ('', 'Split File On # Records', 'EASYPOPULATE_CONFIG_SPLIT_MAX', '300', 'Default number of records for split-file uploads. Used to avoid timeouts on large uploads (default: 300).', @configuration_group_id, '3', NULL, now(), NULL, NULL), ('', 'Maximum Category Depth', 'EASYPOPULATE_CONFIG_MAX_CATEGORY_LEVELS', '7', 'Maximum depth of categories required for your store. Is the number of category columns in downloaded file (default: 7).', @configuration_group_id, '4', NULL, now(), NULL, NULL), ('', 'Upload/Download Prices Include Tax', 'EASYPOPULATE_CONFIG_PRICE_INC_TAX', 'false', 'Choose to include or exclude tax, depending on how you manage prices outside of Zen Cart.', @configuration_group_id, '5', NULL, now(), NULL, 'zen_cfg_select_option(array("true", "false"),'), ('', 'Make Zero Qty Products Inactive', 'EASYPOPULATE_CONFIG_ZERO_QTY_INACTIVE', 'false', 'When uploading, make the status Inactive for products with zero qty (default: false).', @configuration_group_id, '6', NULL, now(), NULL, 'zen_cfg_select_option(array("true", "false"),'), ('', 'Smart Tags Replacement of Newlines', 'EASYPOPULATE_CONFIG_SMART_TAGS', 'true', 'Allows your description fields in your uploads file to have carriage returns and/or new-lines converted to HTML line-breaks on uploading, thus preserving some rudimentary formatting (default: true).', @configuration_group_id, '7', NULL, now(), NULL, 'zen_cfg_select_option(array("true", "false"),'), ('', 'Advanced Smart Tags', 'EASYPOPULATE_CONFIG_ADV_SMART_TAGS', 'false', 'Allow the use of complex regular expressions to format descriptions, making headings bold, add bullets, etc. Configuration is in ADMIN/easypopulate.php (default: false).', @configuration_group_id, '8', NULL, now(), NULL, 'zen_cfg_select_option(array("true", "false"),'), ('', 'Debug Logging', 'EASYPOPULATE_CONFIG_DEBUG_LOGGING', 'true', 'Allow Easy Populate to generate an error log on errors only (default: true)', @configuration_group_id, '9', NULL, now(), NULL, 'zen_cfg_select_option(array("true", "false"),'); ==> (as called by) /homepages/20/d503465712/htdocs/shops/mainshop/backoffice/sqlpatch.php on line 304 <== in /homepages/20/d503465712/htdocs/shops/mainshop/includes/classes/db/mysql/query_factory.php on line 155

with nothing in cache

I cannot make head not tail of these files, can someone please help?

Learning Fast.
Eden Craft Supplies

19 Mar 2015, 4:06 PM
#4
adb34 avatar

adb34

Totally Zenned

Join Date:
Mar 2008
Location:
Brampton, Cumbria, United Kingdom, United Kingdom
Posts:
825
Plugin Contributions:
0

Post #4 by adb34

Further to my post; The first part is the sql script;

This is a further file in logs;> [19-Mar-2015 15:37:29 UTC] PHP Warning: mysql_query(): No such file or directory in /homepages/20/d503465712/htdocs/shops/mainshop/backoffice/includes/functions/extra_functions/easypopulate_functions.php on line 230

[19-Mar-2015 15:37:29 UTC] PHP Warning: mysql_query(): A link to the server could not be established in /homepages/20/d503465712/htdocs/shops/mainshop/backoffice/includes/functions/extra_functions/easypopulate_functions.php on line 230
[19-Mar-2015 15:37:29 UTC] PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /homepages/20/d503465712/htdocs/shops/mainshop/backoffice/easypopulate.php on line 389
[19-Mar-2015 15:37:29 UTC] PHP Warning: mysql_query(): No such file or directory in /homepages/20/d503465712/htdocs/shops/mainshop/backoffice/includes/functions/extra_functions/easypopulate_functions.php on line 230
[19-Mar-2015 15:37:29 UTC] PHP Warning: mysql_query(): A link to the server could not be established in /homepages/20/d503465712/htdocs/shops/mainshop/backoffice/includes/functions/extra_functions/easypopulate_functions.php on line 230
[19-Mar-2015 15:37:29 UTC] PHP Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /homepages/20/d503465712/htdocs/shops/mainshop/backoffice/easypopulate.php on line 398
[19-Mar-2015 15:37:29 UTC] PHP Warning: mysql_query(): No such file or directory in /homepages/20/d503465712/htdocs/shops/mainshop/backoffice/includes/functions/extra_functions/easypopulate_functions.php on line 230
[19-Mar-2015 15:37:29 UTC] PHP Warning: mysql_query(): A link to the server could not be established in /homepages/20/d503465712/htdocs/shops/mainshop/backoffice/includes/functions/extra_functions/easypopulate_functions.php on line 230
[19-Mar-2015 15:37:29 UTC] PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /homepages/20/d503465712/htdocs/shops/mainshop/backoffice/easypopulate.php on line 411
[19-Mar-2015 15:37:29 UTC] PHP Warning: include(/homepages/20/d503465712/htdocs/shops/mainshop/EASYPOPULATE_CONFIG_TEMP_DIR/fileList.php): failed to open stream: No such file or directory in /homepages/20/d503465712/htdocs/shops/mainshop/backoffice/easypopulate.php on line 2438
[19-Mar-2015 15:37:29 UTC] PHP Warning: include(): Failed opening '/homepages/20/d503465712/htdocs/shops/mainshop/EASYPOPULATE_CONFIG_TEMP_DIR/fileList.php' for inclusion (include_path='.:/usr/lib/php5.5') in /homepages/20/d503465712/htdocs/shops/mainshop/backoffice/easypopulate.php on line 2438

the line that is mentioned; backoffice/includes/functions/extra_functions/easypopulate_functions.php on line 230 is

$result = mysql_query($query);

and mainshop/backoffice/easypopulate.php on line 2438 is

include(DIR_FS_CATALOG . $tempdir . 'fileList.php');

Learning Fast.
Eden Craft Supplies

19 Mar 2015, 5:47 PM
#5
lat9 avatar

lat9

Administrator

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

Post #5 by lat9

@adb34, I suggest that you post your issue in the support thread for EZ Populate (you'll get better service that way!).

The short answer is that the installation script is using "blind inserts" (i.e. not providing the field names for the configuration table items) and you've apparently installed one of the numinix plugins that alters the configuration table, adding an additional field.

19 Mar 2015, 5:53 PM
#6
adb34 avatar

adb34

Totally Zenned

Join Date:
Mar 2008
Location:
Brampton, Cumbria, United Kingdom, United Kingdom
Posts:
825
Plugin Contributions:
0

Post #6 by adb34

Sounds like a plan. I put it here because I could not find EZ Populate on the forum

Learning Fast.
Eden Craft Supplies