Zen Cart Logo
Forums / Addon Admin Tools / Easy Populate 1.2.5.4 support

Easy Populate 1.2.5.4 support

Views: 1,301,272

Results 3,701 to 3,720 of 3,834
8 Feb 2015, 4:12 AM
#3701
cloud9 avatar

cloud9

New Zenner

Join Date:
Jan 2014
Location:
United States
Posts:
12
Plugin Contributions:
0

Easy Populate 1.2.5.4 support

Receiving Internal Server Error when Importing

I installed and began using this plugin in November 2014 with ZenCart v1.5.0. All was working well until a couple of weeks later. I'm receiving an Internal Server Error page after importing products on my site. The products are still getting updated/added (I can see the changes on my website), however I cannot see the results of what was updated/changed anymore since it is displaying an internal server error page after the import. Just to be clear, I'm receiving this internal server error page only when importing products. I do not get the error when downloading/creating files within the interface.

Here are some steps I took to try to resolve the issue:
I'm using the latest EasyPopulate version (v1.2.5.7c). No older versions were installed.
I've removed the plugin and re-installed it.
I made sure the permissions are set correctly on my temp folder.
I made sure my file that I'm importing doesn't contain odd characters.
I've limited my import file to only 3 products.
I'm using PHP version 5.4.22.

Any help would be appreciated.

19 Feb 2015, 5:28 PM
#3702
etchedmemories avatar

etchedmemories

New Zenner

Join Date:
Feb 2015
Location:
United States
Posts:
4
Plugin Contributions:
0

Re: Easy Populate 1.2.5.4 support

Hello,
I installed the plugin to my site and also added the SQL to it as well after i installed i get this

Strange but there is no default language to work... That may not happen, just in case...v_products_model,v_products_image,v_specials_price,v_specials_last_modified,v_specials_expires_date,v_products_price,v_products_weight,v_last_modified,v_date_added,v_pro

An SQL error has occured. Please check your input data for tabs within fields and delete these. If this error continues, please forward your error log to the Easy Populate maintainer.

I have the latest and current sql server everything is working properly on my server side but apparently there is a flaw in the SQL coding or it is not compatible with the latest zencart version. i really would like this on my site due to it will save me time and effort uploading products to website.

Thanks
Jim

19 Mar 2015, 6:26 PM
#3703
adb34 avatar

adb34

Totally Zenned

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

Re: Easy Populate 1.2.5.4 support

Sorry this is a bit of a war & peace post. Zencart v1.5.4 & template carlisle fresh

I am having problems with loading the sql file I get the error 'WARNING: An Error occurred, please refresh the page and try again.' The log files are;

[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

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

I have installed this in to the same template on the same zencart version to another site with no problems.

19 Mar 2015, 6:59 PM
#3704
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Easy Populate 1.2.5.4 support

Differences in php version between the two sites? mysql_ queries are no longer supported in PHP5.4+.

19 Mar 2015, 7:08 PM
#3705
adb34 avatar

adb34

Totally Zenned

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

Re: Easy Populate 1.2.5.4 support

mc12345678:

Differences in php version between the two sites? mysql_ queries are no longer supported in PHP5.4+.

I do not understand, I have just checked & my PHP is set at v5.5. Would be an idea for me to upgrade to v5.6 then back down?

19 Mar 2015, 7:08 PM
#3706
lat9 avatar

lat9

Administrator

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

Re: Easy Populate 1.2.5.4 support

The issue is that the install.sql is using "blind inserts" (i.e. not supplying the field names along with the values). adb34 has apparently installed one of the numinix plugins on the site that's not working (which adds a field to the configuration table, making the count mismatch).

19 Mar 2015, 7:24 PM
#3707
adb34 avatar

adb34

Totally Zenned

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

Re: Easy Populate 1.2.5.4 support

lat9:

The issue is that the install.sql is using "blind inserts" (i.e. not supplying the field names along with the values). adb34 has apparently installed one of the numinix plugins on the site that's not working (which adds a field to the configuration table, making the count mismatch).

I see what you are saying. How can I find which numinix plugin is causing this problem?

19 Mar 2015, 8:33 PM
#3708
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Easy Populate 1.2.5.4 support

mc12345678:

Differences in php version between the two sites? mysql_ queries are no longer supported in PHP5.4+.

adb34:

I do not understand, I have just checked & my PHP is set at v5.5. Would be an idea for me to upgrade to v5.6 then back down?

Intent of the question was to identify what the difference in php versions was between one site and the other assuming that both sites were not hosted under the same host as neither condition was specifically identified. (both sites hosted in the same space or different spaces though specifically doesn't matter which configuration as php version depending on host setup could be different for each site)

19 Mar 2015, 8:39 PM
#3709
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Easy Populate 1.2.5.4 support

adb34:

I see what you are saying. How can I find which numinix plugin is causing this problem?

It's not necessarily that numinix software is causing the problem. It's that the sql is incorrectly formatted for any condition other than a brand new installation of ZC without modifications to the tables that are made by numinix software...

The sql needs to be in the format:

insert into DB_PREFIXtablename (field1, field2, ...) VALUES ('value1', 'value2', ...);

If the sql is in someway in the code... The portion: SB_PREFIXtablenmae ought to already be properly formatted, it is the remaining portion that does the blind insert described by lat9.

19 Mar 2015, 11:07 PM
#3710
lat9 avatar

lat9

Administrator

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

Re: Easy Populate 1.2.5.4 support

adb34:

I see what you are saying. How can I find which numinix plugin is causing this problem?
It's not the numinix plugin that is causing the problem, it's the improperly coded install.sql file. See http://www.zen-cart.com/showthread.php?194965-Mod-Authors-Please-read-if-you-are-creating-install-sql-files for more information.

20 Mar 2015, 3:28 PM
#3711
adb34 avatar

adb34

Totally Zenned

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

Re: Easy Populate 1.2.5.4 support

If the sql is in someway in the code... The portion: SB_PREFIXtablenmae ought to already be properly formatted, it is the remaining portion that does the blind insert described by lat9.

# 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);

If I have read it right, line 10 is what you are talking about?

line 10 is ```
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');

20 Mar 2015, 3:57 PM
#3712
adb34 avatar

adb34

Totally Zenned

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

Re: Easy Populate 1.2.5.4 support

I may have a problem with my database. I have tried to load another script for another plugin, 'editable_centerboxes' and that too this throwing up the the message 'WARNING: An Error occurred, please refresh the page and try again.'

20 Mar 2015, 4:23 PM
#3713
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Easy Populate 1.2.5.4 support

adb34:

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);

> 
> If I have read it right, line 10 is what you are talking about?
> 
> line 10 is ```
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');

Yup, that line specifically. Although not aware of numinix modifying the admin_pages table, but that sql should also be revised/updated with the same consideration.

Follow the "structure" of the configuration_group insert for both cases.

20 Mar 2015, 4:28 PM
#3714
adb34 avatar

adb34

Totally Zenned

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

Re: Easy Populate 1.2.5.4 support

mc12345678:

Yup, that line specifically. Although not aware of numinix modifying the admin_pages table, but that sql should also be revised/updated with the same consideration.

Follow the "structure" of the configuration_group insert for both cases.

OK great, wading into the abyss. Never coded sql before. Let the games begin :yuck:

20 Mar 2015, 8:20 PM
#3715
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Easy Populate 1.2.5.4 support

adb34:

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 [B](configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function)[/B] 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 [B](page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order)[/B] 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 [B](page_key, language_key, main_page, [B]page_params, [/B]menu_key, display_on_menu, sort_order)[/B] VALUES ('easyPopulateConfig', 'BOX_CONFIGURATION_EASY_POPULATE', 'FILENAME_CONFIGURATION', CONCAT('gID=',@configuration_group_id), 'configuration', 'Y', @configuration_group_id);

> 
> If I have read it right, line 10 is what you are talking about?
> 
> line 10 is ```
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');

adb34:

OK great, wading into the abyss. Never coded sql before. Let the games begin :yuck:

Didn't go and find the admin_pages_to_profiles table fields, but the bold blue added information above should at least get you through the next "step".

21 Mar 2015, 11:33 AM
#3716
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Easy Populate 1.2.5.4 support

Of course this doesn't run with zen cart 1.5.4 due to change from mysql to mysqli. Here's the first problem

function ep_query($query) {
	global $ep_debug_logging, $ep_debug_logging_all, $ep_stack_sql_error;
	$result = mysql_query($query);
	if (mysql_errno()) {
		$ep_stack_sql_error = true;
		if ($ep_debug_logging == true) {
			// langer - will add time & date..
			$string = "MySQL error ".mysql_errno().": ".mysql_error()."\nWhen executing:\n$query\n";
			write_debug_log($string);
		}
	} elseif ($ep_debug_logging_all == true) {
		$string = "MySQL PASSED\nWhen executing:\n$query\n";
		write_debug_log($string);
	}
	return $result;
}

fixed by added the i in

function ep_query($query) {
	global $ep_debug_logging, $ep_debug_logging_all, $ep_stack_sql_error;
	$result = mysqli_query($query);
	if (mysqli_errno()) {
		$ep_stack_sql_error = true;
		if ($ep_debug_logging == true) {
			// langer - will add time & date..
			$string = "MySQL error ".mysqli_errno().": ".mysqli_error()."\nWhen executing:\n$query\n";
			write_debug_log($string);
		}
	} elseif ($ep_debug_logging_all == true) {
		$string = "MySQL PASSED\nWhen executing:\n$query\n";
		write_debug_log($string);
	}
	return $result;
}

but still get the message: Strange but there is no default language to work

logs confirm that wasn't enough

[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning:  mysqli_query() expects at least 2 parameters, 1 given in /home/domain/public_html/12wsjuY/includes/functions/extra_functions/easypopulate_functions.php on line 230
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning:  mysqli_errno() expects exactly 1 parameter, 0 given in /home/domain/public_html/12wsjuY/includes/functions/extra_functions/easypopulate_functions.php on line 231
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning:  mysql_fetch_array() expects parameter 1 to be resource, null given in /home/domain/public_html/12wsjuY/easypopulate.php on line 389
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning:  mysqli_query() expects at least 2 parameters, 1 given in /home/domain/public_html/12wsjuY/includes/functions/extra_functions/easypopulate_functions.php on line 230
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning:  mysqli_errno() expects exactly 1 parameter, 0 given in /home/domain/public_html/12wsjuY/includes/functions/extra_functions/easypopulate_functions.php on line 231
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning:  mysql_num_rows() expects parameter 1 to be resource, null given in /home/domain/public_html/12wsjuY/easypopulate.php on line 398
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning:  mysqli_query() expects at least 2 parameters, 1 given in /home/domain/public_html/12wsjuY/includes/functions/extra_functions/easypopulate_functions.php on line 230
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning:  mysqli_errno() expects exactly 1 parameter, 0 given in /home/domain/public_html/12wsjuY/includes/functions/extra_functions/easypopulate_functions.php on line 231
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning:  mysql_fetch_array() expects parameter 1 to be resource, null given in /home/domain/public_html/12wsjuY/easypopulate.php on line 411
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning:  Invalid argument supplied for foreach() in /home/domain/public_html/12wsjuY/easypopulate.php on line 448
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning:  mysqli_query() expects at least 2 parameters, 1 given in /home/domain/public_html/12wsjuY/includes/functions/extra_functions/easypopulate_functions.php on line 230
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning:  mysqli_errno() expects exactly 1 parameter, 0 given in /home/domain/public_html/12wsjuY/includes/functions/extra_functions/easypopulate_functions.php on line 231
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning:  mysql_fetch_array() expects parameter 1 to be resource, null given in /home/domain/public_html/12wsjuY/easypopulate.php on line 852
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/domain/public_html/12wsjuY/easypopulate.php:404) in /home/domain/public_html/12wsjuY/easypopulate.php on line 1200
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/domain/public_html/12wsjuY/easypopulate.php:404) in /home/domain/public_html/12wsjuY/easypopulate.php on line 1201
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/domain/public_html/12wsjuY/easypopulate.php:404) in /home/domain/public_html/12wsjuY/easypopulate.php on line 1207
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/domain/public_html/12wsjuY/easypopulate.php:404) in /home/domain/public_html/12wsjuY/easypopulate.php on line 1209

So any php/mysqli gurus want to give me some hints? I went back a few pages here but saw no info.

21 Mar 2015, 11:38 AM
#3717
adb34 avatar

adb34

Totally Zenned

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

Re: Easy Populate 1.2.5.4 support

Out of all of this what I do not understand is that; I have already put this plugin into another website and I had no problems at all. I used the same ISP, zencart version, PHP version. I have said earlier I have similar problems with other plugins and again no problems with my test site. Do I have a problem with my SQL database?

21 Mar 2015, 2:49 PM
#3718
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Easy Populate 1.2.5.4 support

delia:

Of course this doesn't run with zen cart 1.5.4 due to change from mysql to mysqli. Here's the first problem

function ep_query($query) {
global $ep_debug_logging, $ep_debug_logging_all, $ep_stack_sql_error;
$result = mysql_query($query);
if (mysql_errno()) {
$ep_stack_sql_error = true;
if ($ep_debug_logging == true) {
// langer - will add time & date..
$string = "MySQL error ".mysql_errno().": ".mysql_error()."\nWhen executing:\n$query\n";
write_debug_log($string);
}
} elseif ($ep_debug_logging_all == true) {
$string = "MySQL PASSED\nWhen executing:\n$query\n";
write_debug_log($string);
}
return $result;
}

> fixed by added the i in 
> ```php
function ep_query($query) {
	global $ep_debug_logging, $ep_debug_logging_all, $ep_stack_sql_error;
	$result = mysqli_query($query);
	if (mysqli_errno()) {
		$ep_stack_sql_error = true;
		if ($ep_debug_logging == true) {
			// langer - will add time & date..
			$string = "MySQL error ".mysqli_errno().": ".mysqli_error()."\nWhen executing:\n$query\n";
			write_debug_log($string);
		}
	} elseif ($ep_debug_logging_all == true) {
		$string = "MySQL PASSED\nWhen executing:\n$query\n";
		write_debug_log($string);
	}
	return $result;
}

but still get the message: Strange but there is no default language to work

logs confirm that wasn't enough

[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/domain/public_html/12wsjuY/includes/functions/extra_functions/easypopulate_functions.php on line 230
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning: mysqli_errno() expects exactly 1 parameter, 0 given in /home/domain/public_html/12wsjuY/includes/functions/extra_functions/easypopulate_functions.php on line 231
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in /home/domain/public_html/12wsjuY/easypopulate.php on line 389
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/domain/public_html/12wsjuY/includes/functions/extra_functions/easypopulate_functions.php on line 230
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning: mysqli_errno() expects exactly 1 parameter, 0 given in /home/domain/public_html/12wsjuY/includes/functions/extra_functions/easypopulate_functions.php on line 231
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning: mysql_num_rows() expects parameter 1 to be resource, null given in /home/domain/public_html/12wsjuY/easypopulate.php on line 398
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/domain/public_html/12wsjuY/includes/functions/extra_functions/easypopulate_functions.php on line 230
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning: mysqli_errno() expects exactly 1 parameter, 0 given in /home/domain/public_html/12wsjuY/includes/functions/extra_functions/easypopulate_functions.php on line 231
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in /home/domain/public_html/12wsjuY/easypopulate.php on line 411
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning: Invalid argument supplied for foreach() in /home/domain/public_html/12wsjuY/easypopulate.php on line 448
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/domain/public_html/12wsjuY/includes/functions/extra_functions/easypopulate_functions.php on line 230
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning: mysqli_errno() expects exactly 1 parameter, 0 given in /home/domain/public_html/12wsjuY/includes/functions/extra_functions/easypopulate_functions.php on line 231
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in /home/domain/public_html/12wsjuY/easypopulate.php on line 852
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/domain/public_html/12wsjuY/easypopulate.php:404) in /home/domain/public_html/12wsjuY/easypopulate.php on line 1200
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/domain/public_html/12wsjuY/easypopulate.php:404) in /home/domain/public_html/12wsjuY/easypopulate.php on line 1201
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/domain/public_html/12wsjuY/easypopulate.php:404) in /home/domain/public_html/12wsjuY/easypopulate.php on line 1207
[21-Mar-2015 04:29:11 America/Los_Angeles] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/domain/public_html/12wsjuY/easypopulate.php:404) in /home/domain/public_html/12wsjuY/easypopulate.php on line 1209

> 
> So any php/mysqli gurus want to give me some hints? I went back a few pages here but saw no info.

Yeah, sure, why not use a version of EasyPopulate that has already been written/rewritten to support ZC 1.5.3 and above? What is it about this version which hasn't been maintained that warrants it being upgraded over a version that has had continued support? (<http://www.zen-cart.com/showthread.php?190417-EasyPopulate-4-0-Support-Thread>)

Or could just basically copy the code from that version and revive this one... Not sure why that would be desired...

Comes down to there is more to converting functionality from mysql_ to mysqli_ than adding a letter or even adding the remaining parameter(s). For correct usage of the applicable mysqli_ functions, may I suggest performing an internet search on any of the above functions and looking over examples provided in the results as well as looking at the documentation between php versions to see the recommended actions to take to address the changes in version?
21 Mar 2015, 2:51 PM
#3719
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Easy Populate 1.2.5.4 support

adb34:

Out of all of this what I do not understand is that; I have already put this plugin into another website and I had no problems at all. I used the same ISP, zencart version, PHP version. I have said earlier I have similar problems with other plugins and again no problems with my test site. Do I have a problem with my SQL database?

And you're 100% sure that ly have the above version of EP installed and not some other in both stores? Care to provide a screen shot of the one that is working taking out any indication of your actual admin path? Say even a section that is "unique" to this version of EP?

21 Mar 2015, 3:06 PM
#3720
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Easy Populate 1.2.5.4 support

I can't figure out what easy populates are what. I did the upgrade 1.5.1 to 1.5.4. I don't care which one I use - at this point I just have to get this working again.

So this is supposed to be dead and we are going forward with 4? Switching versions can cause what problems? I don't see 4 has been uploaded to the zen cart plugins yet. You still working only out of github?