*

aponeo

  • *
  • 4 posts
Plugins install problems
« on: June 25, 2025, 03:45:36 PM »
Hello

Have bought the Gamma Osclass Theme with the Plugins included. Now the QR Codes, Profile Picture works without problems. But, when i want to install :

1.
Cars attributes i get the error : Plugin couldn't be installed because of: Error importSQL::ModelCars
cars_attributes/struct.sql

2.
Real state attributes i get the error : Plugin couldn't be installed because of: 1050 - Table 'yjmv_t_item_house_attr' already exists

What should i do? I use Hostinger. Website Treguu.com

Thanks!

*

MB Themes

Re: Plugins install problems
« Reply #1 on: June 26, 2025, 04:37:32 PM »
Download latest version for OsclassPoint (just to be sure).
This error usually happen when you use table engine different to "InnoDB".
Usually happens when Osclass is installed by some hosting installer.

Anyway we've just updated all free attributes plugins to work slightly better in terms of installation... so 2nd error should not be visible in future.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

aponeo

  • *
  • 4 posts
Re: Plugins install problems
« Reply #2 on: June 30, 2025, 01:43:13 PM »
Thanks

I have deleted all. New Manuell install without hosting installer.
After the install i have activated the Theme "Gamma Osclass 1.8.1 and tried to install the Plugins.

Again the same error :

Plugin couldn't be installed because of: 1005 - Can't create table `u316781274_Treguu`.`oc_t_item_house_description_attr` (errno: 150 "Foreign key constraint is incorrectly formed")

and

Plugin couldn't be installed because of: Error importSQL::ModelCars
cars_attributes/struct.sql

Have tried the new plugins update.


*

MB Themes

Re: Plugins install problems
« Reply #3 on: July 01, 2025, 10:40:44 AM »
This error usually happen when you use table engine different to "InnoDB".

... make sure to check your database.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

aponeo

  • *
  • 4 posts
Re: Plugins install problems
« Reply #4 on: July 02, 2025, 12:31:18 PM »
So i have checked  on phpMyAdmin "SQL" with the command "SHOW TABLE STATUS;" and everywhere is the Engine InnoDB on, Where do I still need to check or change it

*

MB Themes

Re: Plugins install problems
« Reply #5 on: July 02, 2025, 02:07:28 PM »
That's good, t_item is most important.
I just checked all 5 free attributes plugins and could install/uninstall without issues (latest versions).

If does not work for you, go to struct.sql of plugin and run those statements one by one on your database. You should get some error you can take to mysql help (or use chatgpt to identify what's wrong).
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

aponeo

  • *
  • 4 posts
Re: Plugins install problems
« Reply #6 on: July 03, 2025, 11:00:11 AM »
So it works now, will test it on Real estate now. Hops this help for future updates:


Here the Summary:

1. Replaced placeholder /*TABLE_PREFIX*/ with the actual table prefix oc_

    Osclass plugins often use /*TABLE_PREFIX*/ in their struct.sql file.

    Your Osclass setup uses oc_ as the real prefix.

    This placeholder must be manually replaced in the SQL file. Osclass sometimes fails to do this automatically.

Chatgpt have send me this struct from Car Plugin:

"SET FOREIGN_KEY_CHECKS=0;

DROP TABLE IF EXISTS oc_t_item_car_attr;
DROP TABLE IF EXISTS oc_t_item_car_model_attr;
DROP TABLE IF EXISTS oc_t_item_car_make_attr;
DROP TABLE IF EXISTS oc_t_item_car_vehicle_type_attr;

CREATE TABLE oc_t_item_car_vehicle_type_attr (
  pk_i_id INT(2) UNSIGNED NOT NULL,
  fk_c_locale_code CHAR(5) NOT NULL,
  s_name VARCHAR(255),
  PRIMARY KEY (pk_i_id, fk_c_locale_code),
  FOREIGN KEY (fk_c_locale_code) REFERENCES oc_t_locale (pk_c_code) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE oc_t_item_car_make_attr (
  pk_i_id INT(2) UNSIGNED NOT NULL AUTO_INCREMENT,
  s_name VARCHAR(255),
  PRIMARY KEY (pk_i_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE oc_t_item_car_model_attr (
  pk_i_id INT(2) UNSIGNED NOT NULL AUTO_INCREMENT,
  fk_i_make_id INT(2) UNSIGNED NOT NULL,
  s_name VARCHAR(255),
  PRIMARY KEY (pk_i_id),
  FOREIGN KEY (fk_i_make_id) REFERENCES oc_t_item_car_make_attr (pk_i_id) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE oc_t_item_car_attr (
  fk_i_item_id INT(10) UNSIGNED NOT NULL,
  i_year INT(4) UNSIGNED,
  i_doors INT(1) UNSIGNED,
  i_seats INT(4) UNSIGNED,
  i_mileage INT(10) UNSIGNED,
  i_engine_size INT(10) UNSIGNED,
  fk_i_make_id INT(2) UNSIGNED,
  fk_i_model_id INT(2) UNSIGNED,
  i_num_airbags INT(2) UNSIGNED,
  e_transmission ENUM('MANUAL', 'AUTO'),
  e_fuel ENUM('DIESEL', 'GASOLINE', 'ELECTRIC-HIBRID', 'OTHER'),
  e_seller ENUM('DEALER', 'OWNER'),
  b_warranty BOOLEAN,
  b_new BOOLEAN,
  i_power INT(10) UNSIGNED,
  e_power_unit ENUM('KW', 'CV', 'CH', 'KM', 'HP', 'PS', 'PK', 'CP'),
  i_gears INT(1) UNSIGNED,
  fk_vehicle_type_id INT(10) UNSIGNED,
  INDEX (fk_i_item_id),
  PRIMARY KEY (fk_i_item_id),
  FOREIGN KEY (fk_i_item_id) REFERENCES oc_t_item (pk_i_id) ON DELETE CASCADE ON UPDATE CASCADE,
  FOREIGN KEY (fk_i_make_id) REFERENCES oc_t_item_car_make_attr (pk_i_id) ON DELETE CASCADE ON UPDATE CASCADE,
  FOREIGN KEY (fk_i_model_id) REFERENCES oc_t_item_car_model_attr (pk_i_id) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

SET FOREIGN_KEY_CHECKS=1;"

*

MB Themes

Re: Plugins install problems
« Reply #7 on: July 03, 2025, 11:02:32 AM »
yes /*TABLE_PREFIX*/ is used as magic word and replaced automatically.
For me, this never failed.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots