Zen Cart Logo
Forums / General Questions / sql upload will not work for 1 file

sql upload will not work for 1 file

Views: 1,035

Results 1 to 8 of 8
27 Feb 2015, 12:41 AM
#1
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

sql upload will not work for 1 file

I have just done an upgrade from 1.3.9h to 1.5.1 and all is well except the configuration sql file for the template I am using will not upload via the admin. I get this warning on an otherwise blank page (not the sql upload screen) - 'WARNING: An Error occurred, please refresh the page and try again'. This file was uploaded in the test site initially but when testing the site the configuration tab was missing in admin/configuration. I loaded the test site to the live site anyway because I tried uploading the same file in the live site admin and it responded that the file was duplicated so I figured at least it would upload also after loading test site.

The site is working and the template is working however I cannot configure the template as it doesn't show in admin/configuration.

Is there another way to upload the file?

cheers, Mike

site is https://www.treeoflifejewellery.com.au and the template being used is Responsive All Business by Picaflor Azul.

27 Feb 2015, 3:07 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: sql upload will not work for 1 file

Error like that means have an error log. http://www.zen-cart.com/content.php?311-warning-an-error-occurred-please-refresh-the-page-and-try-again

Now that you have upgraded to 1.5.1+ the error logs are found in the logs directory... Find the myDebug file(s) and as necessary post the content for us to help. If it contains admin directory information or other information not to publicly post obscure the admin directory name or associated info.

Oh, I probably should have mentioned that if this is directly related to installing a template, then perhaps it should be posted in the template thread/forum.

27 Feb 2015, 6:52 AM
#3
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: sql upload will not work for 1 file

Here are some errors from the error log directory - the first one has about 15 occurrences (would fit in with the number of times I tried to upload the sql file, the second one has only 2 or 3 and the third has about 6 or so. (they are not my smiley faces)

[27-Feb-2015 11:22:09 Australia/Melbourne] PHP Fatal error: 1062:Duplicate entry 'RAB_SLIDES_STATUS' for key 'unq_config_key_zen' :: INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES (NULL, 'Slides JS Slideshow', 'RAB_SLIDES_STATUS', 'true', 'Activate Slides JS Slideshow', @configuration_group_id, 1, NOW(), NULL, 'zen_cfg_select_option(array('true', 'false'),'), (NULL, 'Play Interval', 'RAB_SLIDES_PLAY', '5000', 'Play interval', @configuration_group_id, 2, NOW(), NULL, NULL), (NULL, 'Banner Display Groups - Rabslide1', 'SHOW_BANNERS_GROUP_SETRAB1', 'rabslide1', 'Rabslide 1', @configuration_group_id, 30, NOW(), NULL, NULL), (NULL, 'Banner Display Groups - Rabslide2', 'SHOW_BANNERS_GROUP_SETRAB2', 'rabslide2', 'Rabslide 2', @configuration_group_id, 31, NOW(), NULL, NULL), (NULL, 'Banner Display Groups - Rabslide3', 'SHOW_BANNERS_GROUP_SETRAB3', 'rabslide3', 'Rabslide 3', @configuration_group_id, 32, NOW(), NULL, NULL), (NULL, 'Banner Display Groups - Rabslide4', 'SHOW_BANNERS_GROUP_SETRAB4', 'rabslide4', 'Rabslide 4', @configuration_group_id, 33, NOW(), NULL, NULL), (NULL, 'Banner Display Groups - Rabslide5', 'SHOW_BANNERS_GROUP_SETRAB5', 'rabslide5', 'Rabslide 5', @configuration_group_id, 34, NOW(), NULL, NULL), ('Define About Us Status', 'DEFINE_ABOUT_US_STATUS', '1', 'Enable the Defined About Us Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', 25, 59, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''0'', ''1'', ''2'', ''3''),'), (NULL, '<font color="#0044ff">ACTIVATE Responsive Template by selecting Column Widths</font>', 'COLUMN_WIDTH', '2', 'Width of the Left and Right Columns<br />0 = Use Default Template Settings<br />1 = 75px<br />2 = 180px<br />3 = 225px',@configuration_group_id, NULL, NOW(), NULL, 'zen_cfg_select_option(array('0', '1', '2', '3'),'); in /home/xxxxxx/public_html/includes/classes/db/mysql/query_factory.php on line 120

[27-Feb-2015 09:06:49 Australia/Melbourne] PHP Fatal error: 1062:Duplicate entry 'ZEN_LIGHTBOX_STATUS' for key 'unq_config_key_zen' :: INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, '<b>Zen Lightbox</b>', 'ZEN_LIGHTBOX_STATUS', 'true', '<br />If true, all product images on the following pages will be displayed within a lightbox:<br /><br />- document_general_info<br />- document_product_info<br />- page (EZ-Pages)<br />- product_free_shipping_info<br />- product_info<br />- product_music_info<br />- product_reviews<br />- product_reviews_info<br />- product_reviews_write<br /><br /><b>Default: true</b>', @cgi, 100, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''), '), (NULL, 'Overlay Opacity', 'ZEN_LIGHTBOX_OVERLAY_OPACITY', '0.8', '<br />Controls the transparency of the overlay.<br /><br /><b>Default: 0.8</b>', @cgi, 101, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''0'', ''0.1'', ''0.2'', ''0.3'', ''0.4'', ''0.5'', ''0.6'', ''0.7'', ''0.8'', ''0.9'', ''1''), '), (NULL, 'Overlay Fade Duration', 'ZEN_LIGHTBOX_OVERLAY_FADE_DURATION', '400', '<br />Controls the fade duration of the overlay.<br /><br />Note: This value is measured in milliseconds.<br /><br /><b>Default: 400</b><br />', @cgi, 102, NOW(), NOW(), NULL, NULL), (NULL, 'Resize Duration', 'ZEN_LIGHTBOX_RESIZE_DURATION', '400', '<br />Controls the speed of the image resizing.<br /><br />Note: This value is measured in milliseconds.<br /><br /><b>Default: 400</b><br />', @cgi, 103, NOW(), NOW(), NULL, NULL), (NULL, 'Resize Transition', 'ZEN_LIGHTBOX_RESIZE_TRANSITION', 'false', '<br />Allows for custom control over the transition effect used to animate the lightbox.<br /><br /><b>Default: false</b><br />', @cgi, 104, NOW(), NOW(), NULL, NULL), (NULL, 'Initial Width', 'ZEN_LIGHTBOX_INITIAL_WIDTH', '250', '<br />If Enable Resize Animations is set to true, the lightbox will resize its width from this value to the current image width, when first displayed.<br /><br />Note: This value is measured in pixels.<br /><br /><b>Default: 250</b><br />', @cgi, 105, NOW(), NOW(), NULL, NULL), (NULL, 'Initial Height', 'ZEN_LIGHTBOX_INITIAL_HEIGHT', '250', '<br />If Enable Resize Animations is set to true, the lightbox will resize its height from this value to the current image height, when first displayed.<br /><br />Note: This value is measured in pixels.<br /><br /><b>Default: 250</b><br />', @cgi, 106, NOW(), NOW(), NULL, NULL), (NULL, 'Image Fade Duration', 'ZEN_LIGHTBOX_IMAGE_FADE_DURATION', '400', '<br />Controls the fade duration of images.<br /><br />Note: This value is measured in milliseconds.<br /><br /><b>Default: 400</b><br />', @cgi, 107, NOW(), NOW(), NULL, NULL), (NULL, 'Caption Animation Duration', 'ZEN_LIGHTBOX_CAPTION_ANIMATION_DURATION', '400', '<br />Controls the animation duration of the caption.<br /><br />Note: This value is measured in milliseconds.<br /><br /><b>Default: 400</b><br />', @cgi, 108, NOW(), NOW(), NULL, NULL), (NULL, 'Display Image Counter', 'ZEN_LIGHTBOX_COUNTER', 'true', '<br />If true, the image counter will be displayed (below the caption of each image) within the lightbox.<br /><br /><b>Default: true</b>', @cgi, 109, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),'), (NULL, 'Close on Image Click', 'ZEN_LIGHTBOX_CLOSE_IMAGE', 'false', '<br />If true, the lightbox will close when the image being displaying is clicked.<br /><br /><b>Default: false</b>', @cgi, 110, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''), '), (NULL, 'Close on Overlay Click', 'ZEN_LIGHTBOX_CLOSE_OVERLAY', 'false', '<br />If true, the lightbox will close when the overlay is clicked.<br /><br /><b>Default: false</b>', @cgi, 111, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''), '), (NULL, 'Always show Prev / Next', 'ZEN_LIGHTBOX_PREV_NEXT', 'false', '<br />If true, the lightbox will always show Previous & Next buttons when using additional images. NOTE: This setting will be overwritten automatically when Close on Image Click is set to TRUE.<br /><br /><b>Default: false</b>', @cgi, 112, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''), '), (NULL, '<b>Keyboard Navigation</b>', 'ZEN_LIGHTBOX_KEYBOARD_NAVIGATION', 'true', '<br />If true, keyboard inputs will also be used to control the lightbox.<br /><br /><b>Default: true</b>', @cgi, 200, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''), '), (NULL, 'Close Lightbox', 'ZEN_LIGHTBOX_ESCAPE_KEYS', '27,88,67', '<br />The lightbox will close when any of these keys are pressed.<br /><br />Note: Only <a href="http://en.wikipedia.org/wiki/ASCII" target="_blank">ASCII</a> decimal values should be entered and separated with a comma (if listing multiple values).<br /><br /><b>Default: 27,88,67</b><br />', @cgi, 201, NOW(), NOW(), NULL, NULL), (NULL, 'Previous Image', 'ZEN_LIGHTBOX_PREVIOUS_KEYS', '37,80', '<br />The lightbox will display the previous image (if available) when any of these keys are pressed.<br /><br />Note: Only <a href="http://en.wikipedia.org/wiki/ASCII" target="_blank">ASCII</a> decimal values should be entered and separated with a comma (if listing multiple values).<br /><br /><b>Default: 37,80</b><br />', @cgi, 202, NOW(), NOW(), NULL, NULL), (NULL, 'Next Image', 'ZEN_LIGHTBOX_NEXT_KEYS', '39,78', '<br />The lightbox will display the next image (if available) when any of these keys are pressed.<br /><br />Note: Only <a href="http://en.wikipedia.org/wiki/ASCII" target="_blank">ASCII</a> decimal values should be entered and separated with a comma (if listing multiple values).<br /><br /><b>Default: 39,78</b><br />', @cgi, 203, NOW(), NOW(), NULL, NULL), (NULL, '<b>Gallery Mode</b>', 'ZEN_LIGHTBOX_GALLERY_MODE', 'true', '<br />If true, the lightbox will allow additional images to quickly be displayed using previous and next buttons.<br /><br /><b>Default: true</b>', @cgi, 300, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),'), (NULL, 'Include Main Image in Gallery', 'ZEN_LIGHTBOX_GALLERY_MAIN_IMAGE', 'true', '<br />If true, the main product image will be included in the lightbox gallery.<br /><br /><b>Default: true</b>', @cgi, 301, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),'), (NULL, '<b>EZ-Pages Support</b>', 'ZEN_LIGHTBOX_EZPAGES', 'true', '<br />If true, the lightbox effect will be used for linked images on all EZ-Pages.<br /><br /><b>Default: true</b>', @cgi, 400, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),'), (NULL, 'File Types', 'ZEN_LIGHTBOX_FILE_TYPES', 'jpg,png,gif', '<br />On EZ-Pages, the lightbox effect will be applied to all images with one of the following file types.<br /><br /><b>Default: jpg,png,gif</b><br />', @cgi, 401, NOW(), NOW(), NULL, NULL); in /home/xxxxxxx/public_html/teststore/includes/classes/db/mysql/query_factory.php on line 120

[27-Feb-2015 14:28:34 Australia/Melbourne] PHP Warning: Creating default object from empty value in /home/xxxxxxx/public_html/includes/modules/shipping_estimator.php on line 117

27 Feb 2015, 10:10 AM
#4
rodg avatar

rodg

Deceased

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

Re: sql upload will not work for 1 file

The 'Duplicate Entry' Errors can be safely ignored.

The 'Creating default object from empty value ' error isn't SQL related. See here:

http://www.zen-cart.com/showthread.php?200601-Done-v1-5-4-PHP-5-4-PHP-Warning-Creating-default-object-from-empty-value

Cheers
RodG

27 Feb 2015, 8:05 PM
#5
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: sql upload will not work for 1 file

RodG:

The 'Duplicate Entry' Errors can be safely ignored.

The 'Creating default object from empty value ' error isn't SQL related. See here:

http://www.zen-cart.com/showthread.php?200601-Done-v1-5-4-PHP-5-4-PHP-Warning-Creating-default-object-from-empty-value

Cheers
RodG

Thanks for that Rod - in the case of an sql file not uploading via admin is there another way to upload an sql file, e.g. can it be manually loaded to the database? if so how is that done and do you need a lot of experience with database workings?

cheers, Mike

28 Feb 2015, 12:05 AM
#6
drbyte avatar

drbyte

Sensei

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

Re: sql upload will not work for 1 file

shags38:

Thanks for that Rod - in the case of an sql file not uploading via admin is there another way to upload an sql file, e.g. can it be manually loaded to the database? if so how is that done and do you need a lot of experience with database workings?

  1. "Duplicate entry" means ... it already exists.
    So ... if it already exists, why do you need to add it?

  2. If you want to remove the entries because you think they're bad/wrong, then use the uninstall script provided by whomever gave you that install script ... if they thought that far ahead.

  3. Given that these problems are specific to a certain template contributor, perhaps they have some insights about common problems they find people encountering, and have discussed those in their support thread or in the readme/docs for that template?

28 Feb 2015, 12:26 AM
#7
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: sql upload will not work for 1 file

DrByte:

  1. "Duplicate entry" means ... it already exists.
    So ... if it already exists, why do you need to add it?

  2. If you want to remove the entries because you think they're bad/wrong, then use the uninstall script provided by whomever gave you that install script ... if they thought that far ahead.

  3. Given that these problems are specific to a certain template contributor, perhaps they have some insights about common problems they find people encountering, and have discussed those in their support thread or in the readme/docs for that template?

Thanks Doc - just got the following advice from template support forum which I will try soon - Check in your admin_pages table to see that the configuration group id matches the one in your configuration_group table.

28 Feb 2015, 10:12 AM
#8
rodg avatar

rodg

Deceased

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

Re: sql upload will not work for 1 file

shags38:

Thanks for that Rod - in the case of an sql file not uploading via admin is there another way to upload an sql file, e.g. can it be manually loaded to the database? if so how is that done and do you need a lot of experience with database workings?

Yes, this is possible. You can use a tool such as phpmyadmin, which gives you the ability to either cut 'n' paste the SQL commands, or to simply import them.

You don't need an in depth knowledge of the database workings, but you may need to edit the SQL before using this method because the 'manual' method will use the code 'as is', whereas the admin 'Install SQL patch' tool will adjust the code so that the correct table prefixes are used (if applicable).

At least that is my understanding of things. I'm sure DrByte (or someone) will correct me if this information is incorrect.

shags38:

Thanks Doc - just got the following advice from template support forum which I will try soon - Check in your admin_pages table to see that the configuration group id matches the one in your configuration_group table.

Did they tell you what to do if the group id doesn't match?

Cheers
RodG