Здравствуйте, ребята, я получал ошибки в своем магазине Magento 2. Такие, как Failed API Requests, Swagger выдает 500, Stylesheets и JS-файлы не загружаются и т. Д.
Наконец я нашел, что лучшее решениесоздать новую установку Magento со свежими файлами тем и просто скопировать pub/media
из файлов и перейти в режим обслуживания, чтобы удалить все таблицы с префиксами customers_
, catalog_
, sales_
и eav_
Этот шаг заставил мой новый магазин работать очень хорошо, но я получил новый тип ошибок .. Я не могу запустить setup:upgrade
, он показывает сообщение с:
[PDOException] SQLSTATE[HY000]: General error: 1823 Failed to add the foreign key constraint 'porosec_pororom/CAT_CTGR_PRD_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID' to system tables
Ошибка при запуске php -f bin/magento setup:db-schema:upgrade
Команда, которая появляется предыдущее сообщение
также когда язапустите composer update
, он обновит многие зависимости, но для этого потребуется запустить setup:upgrade
.
Swagger Error 500
{"0": "Пожалуйста, обновите базу данных: Запустите \" bin / magento setup: upgrade \ "из корневого каталога Magento. \ NСледующееДулы устарели: \ nKlarna_Core data: текущая версия - 4.1.5, необходимая версия - 4.2.3 \ nKlarna_Ordermanagement данные: текущая версия - 4.1.2, необходимая версия - 4.1.3 "," 1 ":" # 0 / home /porosec / public_html / test / vendor / magento / framework / Interception / Interceptor.php (121): Magento \ Framework \ Module \ Plugin \ DbStatusValidator-> beforeDispatch (Объект (Magento \ Framework \ App \ FrontController \ Interceptor), Объект (Magento\ Framework \ App \ Request \ Http)) \ n # 1 /home/porosec/public_html/test/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento \ Framework \App \ FrontController \ Interceptor-> Magento \ Framework \ Interception \ {closure} (Объект (Magento \ Framework \ App \ Request \ Http)) \ n # 2 / home / porosec / public_html / test / vendor / magento / framework / Interception/Interceptor.php(135): Magento \ PageCache \ Model \ App \ FrontController \ BuiltinPlugin-> aroundDispatch (Объект (Magento \ Framework \ App \ FrontController \ Interceptor), Объект (Закрытие), Объект (Magento \ Framework \ App \ Request)\ Http)) \ n # 3 / home / porosec / public_html / test / vendor / magento / framework / Interception / Interceptor.php (153): Magento \ Framework \ App \ FrontController \ Interceptor-> Magento \ Framework \ Interception \ {closure} (Объект (Magento \ Framework \ App \ Request \)Http)) \ n # 4 /home/porosec/public_html/test/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento \ Framework \ App \ FrontController \ Interceptor -> ___ callPlugins ('отправка)', Array, Array) \ n # 5 /home/porosec/public_html/test/vendor/magento/framework/App/Http.php(135): Magento \ Framework \ App \ FrontController \ Interceptor-> dispatch (Object (Magento)\ Framework \ App \ Request \ Http)) \ n # 6 /home/porosec/public_html/test/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento \ Framework \ App \ Http-> launch () \ n # 7 /home/porosec/public_html/test/vendor/magento/framework/App/Bootstrap.php(256): Magento \ Framework \ App \ Http \ Interceptor-> launch () \ n # 8/home/porosec/public_html/test/index.php(39): Magento \ Framework \ App \ Bootstrap-> run (Объект (Magento \ Framework \ App \ Http \ Interceptor)) \ n #9 {main} "," url ":" / test / swagger "," script_name ":" / test / index.php "}
Журнал ошибок Swagger
Также вот что я получил в панели администратора
Ошибка панели администратора
[2018-06-04 23:18:09] main.CRITICAL: Report ID: webapi-5b15c8b17792e; Message: Class "array" does not exist. Please note that namespace must be specified. {"exception":"[object] (Exception(code: 0): Report ID: webapi-5b15c8b17792e; Message: Class \"array\" does not exist. Please note that namespace must be specified. at /home/porosec/public_html/test/vendor/magento/framework/Webapi/ErrorProcessor.php:205, LogicException(code: 0): Class \"array\" does not exist. Please note that namespace must be specified. at /home/porosec/public_html/test/vendor/magento/framework/Reflection/TypeProcessor.php:139)"} []
Журнал ошибок панели администратора