Page 2 of 2 FirstFirst 12
Results 11 to 20 of 39

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,532
    Plugin Contributions
    127

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

    You may be able to track down some of these anomalies using the Audit tool:

    https://www.zen-cart.com/downloads.php?do=file&id=2261
    That Software Guy. My Store: Zen Cart Support
    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.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,817
    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...

  3. #3
    Join Date
    Jan 2015
    Location
    Cyprus
    Posts
    83
    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.

 

 
Page 2 of 2 FirstFirst 12

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

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