Results 1 to 4 of 4
  1. #1
    Join Date
    May 2007
    Posts
    124
    Plugin Contributions
    0

    Default Can't Add any new categories?

    Fresh Install 1.5.6c
    PHP 7.1

    All of a sudden Can't add any new categories.
    [14-Feb-2020 21:02:14 UTC] Request URI: /admin/categories.php?action=insert_category&cPath=, IP address: 100.2.167.42#1 trigger_error() called at [/home/teer/public_html/includes/classes/db/mysql/query_factory.php:171]
    #2 queryFactory->show_error() called at [/home/teer/public_html/includes/classes/db/mysql/query_factory.php:143]
    #3 queryFactory->set_error() called at [/home/teer/public_html/includes/classes/db/mysql/query_factory.php:270]
    #4 queryFactory->Execute() called at [/home/teer/public_html/admin/includes/functions/database.php:51]
    #5 zen_db_perform() called at [/home/teer/public_html/admin/categories.php:103]
    --> PHP Fatal error: 1364:Field 'categories_promotion_id' doesn't have a default value :: insert into categories (sort_order, parent_id, date_added) values ('0', '0', now()) ==> (as called by) /home/teer/public_html/admin/includes/functions/database.php on line 51 <== in /home/teer/public_html/includes/classes/db/mysql/query_factory.php on line 171.
    the files in question have not been touched.
    Thanx
    Mike

  2. #2
    Join Date
    May 2007
    Posts
    124
    Plugin Contributions
    0

    Default Re: Can't Add any new categories?

    My SQL mode is

    MySQL Mode: 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

    is this the problem?

  3. #3
    Join Date
    May 2007
    Posts
    124
    Plugin Contributions
    0

    Default Re: Can't Add any new categories?

    With PHPmyadmin
    In the Categories Table I changed the Default value for the field categories_promotion_id from none to Null.
    Everything is working now.
    Why did i get this error now after many new categories were added?
    thanx
    Mike

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,622
    Plugin Contributions
    123

    Default Re: Can't Add any new categories?

    The field categories_promotion_id is not native to Zen Cart, so it's not handled by the Zen Cart core code.
    When you added it, it was added with no default, probably under MySQL 5.6.
    Your hoster updated to MySQL 5.7. Now, this is not allowed - you either have to set the value in the insert, or say null is allowed, or have a default value.

    That's why.
    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.

 

 

Similar Threads

  1. v151 Botched my EZ pages - can't add any new ones
    By PJWings in forum Basic Configuration
    Replies: 6
    Last Post: 29 Mar 2013, 11:20 PM
  2. Can not add new categories
    By mrtorrez in forum Upgrading from 1.3.x to 1.3.9
    Replies: 1
    Last Post: 15 Nov 2010, 05:02 PM
  3. Can't add new categories or products
    By rezerekted in forum General Questions
    Replies: 2
    Last Post: 25 Jul 2010, 07:44 PM
  4. Can't add new categories
    By hrsteel in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 12 Dec 2009, 02:42 AM
  5. Can't add new categories
    By Berserker in forum General Questions
    Replies: 1
    Last Post: 15 Apr 2007, 06:01 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