Jump to content

An error occurred while creating object. product [Solved]


Recommended Posts

Solution: Run the following SQL commands/Statements:

 

ALTER TABLE product_shop ADD `redirect_type` ENUM('', '404', '301', '302') NOT NULL DEFAULT '' AFTER `active` ;
ALTER TABLE product ADD `redirect_type` ENUM('', '404', '301', '302') NOT NULL DEFAULT '' AFTER `active` ;

Edited by Alldo Group (see edit history)
  • Like 2
Link to comment
Share on other sites

EDIT: (disregard the message bellow) - clean install of ps 152, imported db, upgraded to 1.5.3.1. works.

 

I still have "An error occurred while creating object. product"

Using ps 1.5.3.1. The database was populated in ps 1.5.2.0, then imported via myphpadmin.

 

I tried the following, nothing works:

1:

alter table ps_product add column redirect_type int (10) ;# 449 rows affected.

alter table ps_product_shop add column redirect_type int (10) ;# 449 rows affected.

 

2:

alter table ps_product DROP column redirect_type ;

alter table ps_product_shop DROP column redirect_type ;

 

3:

ALTER TABLE ps_product ADD `redirect_type` ENUM('', '404', '301', '302') NOT NULL DEFAULT '' AFTER `active` ;

ALTER TABLE ps_product_shop ADD `redirect_type` ENUM('', '404', '301', '302') NOT NULL DEFAULT '' AFTER `active` ;

 

Help, anyone? Please?

 

Server information

 

Server information: Windows NT build 7601 (Windows 7 Ultimate Edition Service Pack 1) AMD64

Server software version: Apache/2.4.2 (Win64) PHP/5.4.3

PHP version: 5.4.3

Memory limit: 128M

Max execution time: 30

Database information

 

MySQL version: 5.5.24-log

MySQL engine: InnoDB

Tables prefix: ps_

Store information

 

Prestashop version: 1.5.3.1

Shop URL: http://localhost:8080/presta_n/

Current theme in use: default

Edited by igor.i (see edit history)
Link to comment
Share on other sites

  • 8 months later...

EDIT: (disregard the message bellow) - clean install of ps 152, imported db, upgraded to 1.5.3.1. works.

 

I still have "An error occurred while creating object. product"

Using ps 1.5.3.1. The database was populated in ps 1.5.2.0, then imported via myphpadmin.

 

I tried the following, nothing works:

1:

alter table ps_product add column redirect_type int (10) ;# 449 rows affected.

alter table ps_product_shop add column redirect_type int (10) ;# 449 rows affected.

 

2:

alter table ps_product DROP column redirect_type ;

alter table ps_product_shop DROP column redirect_type ;

 

3:

ALTER TABLE ps_product ADD `redirect_type` ENUM('', '404', '301', '302') NOT NULL DEFAULT '' AFTER `active` ;

ALTER TABLE ps_product_shop ADD `redirect_type` ENUM('', '404', '301', '302') NOT NULL DEFAULT '' AFTER `active` ;

 

Help, anyone? Please?

 

Server information

 

Server information: Windows NT build 7601 (Windows 7 Ultimate Edition Service Pack 1) AMD64

Server software version: Apache/2.4.2 (Win64) PHP/5.4.3

PHP version: 5.4.3

Memory limit: 128M

Max execution time: 30

Database information

 

MySQL version: 5.5.24-log

MySQL engine: InnoDB

Tables prefix: ps_

Store information

 

Prestashop version: 1.5.3.1

Shop URL: http://localhost:8080/presta_n/

Current theme in use: default

Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

In most cases this error occurs when the ps_products table or ps_product_shop table is missing some column(s).

 

To know the exact column you are missing - It would be wise to set development mode to true - then the exact error message that is descriptive will be shown.

 

open config/defines.inc and find this line define('_PS_MODE_DEV_', false); change it to define('_PS_MODE_DEV_', true);

 

This should display the column, table that is missing - which can then be added

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...