Page 4 of 4 FirstFirst ... 234
Results 31 to 39 of 39
  1. #31
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: PHP Fatal error: 1366:Incorrect integer value

    Quote Originally Posted by Georgecy View Post
    Hi Guys trying to reset all products master master directory ids in 1.5.7c php 7.4 mysql 5.7 (ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION)
    I get PHP Fatal error: 1366:Incorrect integer value as shown in the log below.

    Code:
    [17-Oct-2021 13:25:56 UTC] Request URI: /admin/index.php?cmd=store_manager&action=update_all_master_categories_id, IP address: xx.xx.xx.xx
    #1 trigger_error() called at [/includes/classes/db/mysql/query_factory.php:170]
    #2 queryFactory->show_error() called at [/includes/classes/db/mysql/query_factory.php:142]
    #3 queryFactory->set_error() called at [/includes/classes/db/mysql/query_factory.php:269]
    #4 queryFactory->Execute() called at [/admin/store_manager.php:175]
    #5 require(/admin/store_manager.php) called at [/admin/index.php:11]
    --> PHP Fatal error: 1366:Incorrect integer value: '' for column 'master_categories_id' at row 1 :: UPDATE products SET master_categories_id='' WHERE products_id='2691' ==> (as called by) /admin/store_manager.php on line 175 <== in /includes/classes/db/mysql/query_factory.php on line 170.
    While the existence of the log is likely because of strict mode, the real problem is that product 2691 has an undefined master category. Considering that there are or were some previous 2690 other product in your store, you likely have categories in your store. By having a master category effectively set to 0, that means you have a product within a category that has categories... A central design consideration of Zen Cart is that product are not to exist in a category that has categories.

    That product needs to have its master category changed to one of the categories at the end of a branch. One way to do this is to manually navigate to any product in your store to support editing that product.

    Then once on the product edit page, change the browser address so that pID=2691 and load that page.

    At the top of the listing, the product likely is assigned to more than one category and a dropdown will be provided with the first option identifying something like an "error" or some other description that I can not remember at the moment. The dropdown is associated with the category(ies) to which it is assigned. Pick one of the other categories, preferably the one to which this product really should be assigned.

    If that dropdown is not available, then the issue is "resolvable" (though I've found not so easily so in more recent versions of ZC) by use of the multiple categories Link manager that in 1.5.7 I find accessible through at least 2 methods. One is to navigate to a category that has product (which shouldnt have a category in it if all things have been managed "properly") and then select to copy a product.

    Scroll down to the bottom of the right side window, select the button: Multiple Categories Link Manager.

    Then on the right side, click the button: Select Another Product by ID# and then enter in 2691.

    Now, from here it is where there may be some difficulties. I haven't sussed out why/when there are problems, but I know that in more recent versions it has not been as user friendly to reassign the master category and/or to add the product to another category so that the master category can be modified/reset. But, there is an option to update the product master category and below that there is an option to link the product to another category. In my past experience with this version of ZC, one or more of these operations just results in error messages either on screen or in the logs directory because of the way it has been reworked to also provide more options and in a way for the code to appear easier to understand. At any rate, should be able to get there after some in store operations instead of having to access the database directly.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #32
    Join Date
    Jan 2015
    Location
    Cyprus
    Posts
    46
    Plugin Contributions
    0

    Default Re: PHP Fatal error: 1366:Incorrect integer value

    Thanks a lot,
    Based on your instructions I discover more than one disabled product without a master category (Warning: No Master Category ID has been set for this Product). Unfortunately ZC does not allow me to either delete the product(as is not needed) or add the Master category to the product. Any further help will be appreciated.

    Quote Originally Posted by mc12345678 View Post
    While the existence of the log is likely because of strict mode, the real problem is that product 2691 has an undefined master category. Considering that there are or were some previous 2690 other product in your store, you likely have categories in your store. By having a master category effectively set to 0, that means you have a product within a category that has categories... A central design consideration of Zen Cart is that product are not to exist in a category that has categories.

    That product needs to have its master category changed to one of the categories at the end of a branch. One way to do this is to manually navigate to any product in your store to support editing that product.

    Then once on the product edit page, change the browser address so that pID=2691 and load that page.

    At the top of the listing, the product likely is assigned to more than one category and a dropdown will be provided with the first option identifying something like an "error" or some other description that I can not remember at the moment. The dropdown is associated with the category(ies) to which it is assigned. Pick one of the other categories, preferably the one to which this product really should be assigned.

    If that dropdown is not available, then the issue is "resolvable" (though I've found not so easily so in more recent versions of ZC) by use of the multiple categories Link manager that in 1.5.7 I find accessible through at least 2 methods. One is to navigate to a category that has product (which shouldnt have a category in it if all things have been managed "properly") and then select to copy a product.

    Scroll down to the bottom of the right side window, select the button: Multiple Categories Link Manager.

    Then on the right side, click the button: Select Another Product by ID# and then enter in 2691.

    Now, from here it is where there may be some difficulties. I haven't sussed out why/when there are problems, but I know that in more recent versions it has not been as user friendly to reassign the master category and/or to add the product to another category so that the master category can be modified/reset. But, there is an option to update the product master category and below that there is an option to link the product to another category. In my past experience with this version of ZC, one or more of these operations just results in error messages either on screen or in the logs directory because of the way it has been reworked to also provide more options and in a way for the code to appear easier to understand. At any rate, should be able to get there after some in store operations instead of having to access the database directly.

  3. #33
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: PHP Fatal error: 1366:Incorrect integer value

    Quote Originally Posted by Georgecy View Post
    Thanks a lot,
    Based on your instructions I discover more than one disabled product without a master category (Warning: No Master Category ID has been set for this Product). Unfortunately ZC does not allow me to either delete the product(as is not needed) or add the Master category to the product. Any further help will be appreciated.
    It is helpful to identify what has been attempted to add/modify the master category. For example, in the checkboxes that are presented, was the product attempted to be linked to another category?
    What about back at the products/category listing for the root of the store, does the lone product appear possibly at the last page of categories so that it could be copied as a linked product to another category?

    Again, explaining what has been tried (please be as specific as possible) it is eaiser to describe what to try and what may work. I *am* going to try in a little bit to populate a test store with a product that has an "empty" master category that is not linked elsewhere and see what can be done. This was previously something relatively easily resolved, but in streamlining the code to operate "normally" such issues are now harder to resolve from within the admin.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #34
    Join Date
    Jan 2015
    Location
    Cyprus
    Posts
    46
    Plugin Contributions
    0

    Default Re: PHP Fatal error: 1366:Incorrect integer value

    The link manager shows no links. And when trying to move the product in a new category it has no effect. It seems around 10 products which are related have no master category id

  5. #35
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: PHP Fatal error: 1366:Incorrect integer value

    Did you try following the advice I gave you to use the Audit plugin?
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  6. #36
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: PHP Fatal error: 1366:Incorrect integer value

    Quote Originally Posted by Georgecy View Post
    The link manager shows no links. And when trying to move the product in a new category it has no effect. It seems around 10 products which are related have no master category id
    So, I created a product assigned to the test examples category. I then set the master_categories_id to '' for that product. I then went to Catalog->Categories/Products. Then I typed in the products_id that was associated with that product in the search field. The product appeared in the list. I then copied the product as a linked product to the category desired (at this point it was back to the Test Examples category). I then again went to "copy" the product but this time going to the link manager, I was presented with the product and the ability to change the master category through the dropdown selection.

    So, then I followed the consideration previously described by lat9 about the products_to_categories table having bad information. In this case I removed all information from that table associated with my "problem" product. I again reset the master category to ''. So basically, the database would have data that there is a "product" but it isn't associated with anything.

    This time, when I went through the copy as a linked product process, it appeared "successful" but the product did not appear anywhere other than by searching on its products_id. I then again attempted to access the link manager from the copy product action, and this time the series of checkboxes did not appear, but the product was shown at the top of the list and that there was an invalid master category assigned.

    I admit that in a way I gave up trying to find a way to create a record in the products_to_categories table for this product at this point. But of course I thought, what about possibly moving the product? Nope, that wasn't a success either even though no message was provided on screen. A debug log was generated, but...

    When I then added a record to the products_to_categories table for this one product even if it was to the main category I was then able to correct the issue as described above. So, yeah, first thing/important thing is to ensure that the products_id exists in the products_to_categories table in order to move forwards even if correcting this within the admin is otherwise not so easy, it still can be done until those options too are removed.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #37
    Join Date
    Jan 2015
    Location
    Cyprus
    Posts
    46
    Plugin Contributions
    0

    Default Re: PHP Fatal error: 1366:Incorrect integer value

    Hi Scott,
    Sorry I did not see the initial post but the Audit plug in worked great and solved all the issues. I manage to fix and delete the problematic items and the reset of Master category ids worked without problem.
    Thank you all guys for the great work you are doing.

  8. #38
    Join Date
    Jan 2015
    Location
    Cyprus
    Posts
    46
    Plugin Contributions
    0

    Default Re: PHP Fatal error: 1366:Incorrect integer value

    Hi Guys, suddenly I can not enter any products in Zencart 1.5.7d. The error is PHP Fatal error: 1366:Incorrect integer value: '' for column 'products_xsell_sort_order' at row 1 and the log is below.
    [25-Jul-2022 10:34:34 UTC] Request URI: /macadmin1/index.php?cmd=product&cPath=402&action=insert_product, IP address: xxx
    #1 trigger_error() called at [/includes/classes/db/mysql/query_factory.php:171]
    #2 queryFactory->show_error() called at [/includes/classes/db/mysql/query_factory.php:143]
    #3 queryFactory->set_error() called at [/includes/classes/db/mysql/query_factory.php:270]
    #4 queryFactory->Execute() called at [/includes/functions/database.php:44]
    #5 zen_db_perform() called at [/admin/includes/modules/update_product.php:72]
    #6 require(/admin/includes/modules/update_product.php) called at [/admin/product.php:33]
    #7 require(/admin/product.php) called at [/admin1/index.php:11]
    --> PHP Fatal error: 1366:Incorrect integer value: '' for column 'products_xsell_sort_order' at row 1 :: INSERT INTO products (products_quantity, products_type, products_model, products_xsell_sort_order, products_price, products_date_available, products_weight, products_status, products_virtual, products_tax_class_id, manufacturers_id, products_quantity_order_min, products_quantity_order_units, products_priced_by_attribute, product_is_free, product_is_call, products_quantity_mixed, product_is_always_free_shipping, products_qty_box_status, products_quantity_order_max, products_sort_order, products_discount_type, products_discount_type_from, products_price_sorter, products_image, products_date_added, master_categories_id) VALUES ('0', '1', '', '', '84.0336', null, '0', '1', '0', '1', '0', '1', '1', '0', '0', '0', '1', '0', '1', '0', '0', '0', '0', '0', 'Apple Watch 7 + AirPods 2 June Offer CampaignFB.jpg', now(), '402') ==> (as called by) /includes/functions/database.php on line 44 <== in /includes/classes/db/mysql/query_factory.php on line 171.

  9. #39
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,685
    Plugin Contributions
    9

    Default Re: PHP Fatal error: 1366:Incorrect integer value

    Quote Originally Posted by Georgecy View Post
    Hi Guys, suddenly I can not enter any products in Zencart 1.5.7d. The error is PHP Fatal error: 1366:Incorrect integer value: '' for column 'products_xsell_sort_order' at row 1 and the log is below.
    [25-Jul-2022 10:34:34 UTC] Request URI: /macadmin1/index.php?cmd=product&cPath=402&action=insert_product, IP address: xxx
    #1 trigger_error() called at [/includes/classes/db/mysql/query_factory.php:171]
    #2 queryFactory->show_error() called at [/includes/classes/db/mysql/query_factory.php:143]
    #3 queryFactory->set_error() called at [/includes/classes/db/mysql/query_factory.php:270]
    #4 queryFactory->Execute() called at [/includes/functions/database.php:44]
    #5 zen_db_perform() called at [/admin/includes/modules/update_product.php:72]
    #6 require(/admin/includes/modules/update_product.php) called at [/admin/product.php:33]
    #7 require(/admin/product.php) called at [/admin1/index.php:11]
    --> PHP Fatal error: 1366:Incorrect integer value: '' for column 'products_xsell_sort_order' at row 1 :: INSERT INTO products (products_quantity, products_type, products_model, products_xsell_sort_order, products_price, products_date_available, products_weight, products_status, products_virtual, products_tax_class_id, manufacturers_id, products_quantity_order_min, products_quantity_order_units, products_priced_by_attribute, product_is_free, product_is_call, products_quantity_mixed, product_is_always_free_shipping, products_qty_box_status, products_quantity_order_max, products_sort_order, products_discount_type, products_discount_type_from, products_price_sorter, products_image, products_date_added, master_categories_id) VALUES ('0', '1', '', '', '84.0336', null, '0', '1', '0', '1', '0', '1', '1', '0', '0', '0', '1', '0', '1', '0', '0', '0', '0', '0', 'Apple Watch 7 + AirPods 2 June Offer CampaignFB.jpg', now(), '402') ==> (as called by) /includes/functions/database.php on line 44 <== in /includes/classes/db/mysql/query_factory.php on line 171.
    the problem looks to be with a paid plugin. specifically this one here:

    https://www.thatsoftwareguy.com/zenc...ed_family.html

    my guess is that you are running into a problem with mysql strict mode. you can either turn off mysql strict mode, or contact the developer for an updated version.

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

 

 
Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. v156 MySQLi error 1366: Incorrect string value
    By chadlly2003 in forum General Questions
    Replies: 19
    Last Post: 3 Jan 2020, 05:57 AM
  2. Replies: 7
    Last Post: 22 Dec 2019, 07:07 PM
  3. v154 Issue with Authorize.net AIM updating table - error 1366 incorrect integer value
    By inklingsolutions in forum Built-in Shipping and Payment Modules
    Replies: 48
    Last Post: 29 Dec 2016, 09:09 PM
  4. Replies: 2
    Last Post: 22 Jun 2013, 03:48 AM
  5. 1366 Incorrect integer value Problems with MySQL 5 strict-mode
    By Max70 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 13
    Last Post: 10 Dec 2009, 07:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR