Где возникла проблема: CS-Cartv4.17.2.SP1 RU ULT
В базе данных возникает ошибка
База данных (Ошибка)
Ошибка: Unknown column ‘locations.store_type’ in ‘where clause’ (1054)
Запрос: SELECT descriptions.city AS city FROM cscart_store_locations AS locations LEFT JOIN cscart_store_location_descriptions AS descriptions ON locations.store_location_id = descriptions.store_location_id INNER JOIN cscart_ult_objects_sharing ON (cscart_ult_objects_sharing.share_object_id = locations.store_location_id AND cscart_ult_objects_sharing.share_company_id = 1 AND cscart_ult_objects_sharing.share_object_type = ‘store_locations’) WHERE descriptions.lang_code = ‘ru’ AND locations.status IN (‘A’) AND locations.store_type != ‘W’ GROUP BY city LIMIT 0, 10
Отслеживание››
index.php (fn_dispatch): 19
app/functions/fn.control.php (fn_run_controller): 458
app/functions/fn.control.php (include): 722
app/addons/store_locator/controllers/frontend/store_locator.php (fn_get_store_location_cities): 83
app/addons/store_locator/func.php (db_get_fields): 395
app/functions/fn.database.php (getColumn): 85
app/Tygh/Database/Connection.php (query): 479
app/Tygh/Database/Connection.php (execQuery): 699
app/Tygh/Database/Connection.php (throwError): 1489
Суть проблемы:
Оказывается, колонка store_type - добавляется когда установлен модуль Склады. Но если модуль не установлен, в БД периодически ошибка.
Как воспроизвести проблему:
Установите модуль store_locator, и не устанавливается модуль Склады. Хотя по коду функции и так видно, что нет проверки на активность модуля Склады