Jump to content
thirty bees forum
  • 0

Can't add new category > missing column in database?


Question

Posted

Hi there,

I noticed that I can't add new categories on a shop and guess it's probably a migration-error (Database).

After turning on the developer mode it says: ``` Unknown column 'displayfromsub' in 'field list'

INSERT INTO ps_category (nleft, nright, level_depth, active, display_from_sub, id_parent, id_shop_default, is_root_category, position, date_add, date_upd) VALUES ('0', '0', '3', '1', '1', '3', '1', '0', '0', '2018-06-23 11:51:48', '2018-06-23 11:51:48')```

``` Can somebody tell me which SQL command could fix this? :slightlysmilingface:

I found something like this for a similar problem concerning products: ``` ALTER TABLE ps_product ADD pack_stock_type int(11) UNSIGNED DEFAULT '3'; ALTER TABLE ps_product_shop ADD pack_stock_type int(11) UNSIGNED DEFAULT '3'; ALTER TABLE ps_pack ADD id_product_attribute_item int(10) UNSIGNED NOT NULL AFTER id_product_item; ALTER TABLE ps_pack DROP PRIMARY KEY;

7 answers to this question

Recommended Posts

  • 0
Posted

Something similar issue I am facing. When i creates first category on fresh installation it is shewing on front end but 2nd category onward there is NO changes on front end.

  • 0
Posted

You're manipulating the database directly? Uh-oh :-/

It'd be better to create categories using web requests mimicking a manual creation. Or to write some PHP code calling the appropriate methods. Which code to write? See AdminCategoriesController.php

  • 0
Posted

hi .. this unfortunately does not help when import csv .. when importing csv, an error is always reported.. the first import on clean installation will be fine.. the second import is already faulty..

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...