Saya telah mencoba untuk mengatasi Kode Area ini tidak membuat kesalahan dan memiliki referensi yang lain di sini, tetapi memiliki masalah untuk melacaknya.
saya telah mencoba untuk memutakhirkan 2.0.7 ke 2.1.0 dan ketika saya sampai pada titik di mana saya menjalankan:
setup php bin / magento: upgrade -vvv
Saya mendapatkan ini sebagai kesalahan.
[Magento \ Framework \ Exception \ SessionException] Kode area tidak disetel: Kode area harus disetel sebelum memulai sesi.
Jejak pengecualian: () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Session/SessionManager.php:176 Magento \ Framework \ Session \ SessionManager-> start () di / opt / bitnami / apps / magento / htdocs / var / generation / Magento / Framework / Session / Generic / Interceptor.php: 50 Magento \ Framework \ Session \ Generic \ Interceptor-> start () di / opt / bitnami / apps / magento / htdocs / vendor / magento /framework/Session/SessionManager.php:130 Magento \ Framework \ Session \ SessionManager -> __ construct () di /opt/bitnami/apps/magento/htdocs/var/generation/Magento/Framework/Session/Generic/Interceptor.php: 14 Magento \ Framework \ Session \ Generic \ Interceptor -> __ construct () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:93 Magento \ Framework \ ObjectManager \ Factory \ AbstractFactory->createObject () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:89 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer-> create () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / ObjectManager / ObjectManager.php: 71 Magento \ Framework \ ObjectManager \ ObjectManager-> get () di / opt / bitnami / apps / magento / htdocs / vendor / magento /framework/ObjectManager/Factory/AbstractFactory.php:126 Magento \ Framework \ ObjectManager \ Factory \ AbstractFactory-> resolArgument () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / ObjectManager / Factory / Dynamic / Developer.php: 53 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer -> _ resolArguments () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:82 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer-> create () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/ObjectManager.php:71 Magento \ Framework \ ObjectManager \ > dapatkan () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:126 Magento \ Framework \ ObjectManager \ Factory \ AbstractFactory-> resolArgument () di / opt / bitnami / /apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:53 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer -> _ resolArguments () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / ObjectManager / Factory / Dynamic / Developer.php: 82 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer->buat () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/ObjectManager.php:71 Magento \ Framework \ ObjectManager \ ObjectManager-> dapatkan () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / ObjectManager / Factory / AbstractFactory.php: 126 Magento \ Framework \ ObjectManager \ Factory \ AbstractFactory-> resolArgument () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / ObjectManager /Factory/Dynamic/Developer.php:53 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer -> _ resolArguments () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / ObjectManager / Factory / Dynamic / Developer.php: 82 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer-> create () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/ObjectManager.php:71 Magento \ Framework \ ObjectManager \ ObjectManager-> dapatkan () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:126 Magento \ Framework \ ObjectManager \ Factory \ AbstractFactory- > resolArgument () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:53 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer -> _ resolArguments () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:82 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer-> create () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / ObjectManager / ObjectManager.php: 71 Magento \ Framework \ ObjectManager \ ObjectManager->dapatkan () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:126 Magento \ Framework \ ObjectManager \ Factory \ AbstractFactory-> resolArgument () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / ObjectManager / Factory / Dynamic / Developer.php: 53 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer -> _ resolArguments () di / opt / bitnami / apps / magento / htdocs /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:82 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer-> create () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / ObjectManager / ObjectManager.php: 71 Magento \ Framework \ ObjectManager \ ObjectManager-> dapatkan () di /opt/bitnami/apps/magento/htdocs/app/code/J2t/Rewardpoints/Observer/ProcessSaveModel.php:21 J2t \ Rewardpoints \ Observer \ ProcessSaveModel-> eksekusi () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Event/Invoker/InvokerDefault.php:73 Magento \ Framework \ Event \ Invoker \ InvokerDefault- > _callObserverMethod () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Event/Invoker/Invoker/Invoker/InvokerDefault.php:61 Magento \ Framework \ Event \ Invoker \ InvokerDefault-> dispatch () di / opt / bitnami / /apps/magento/htdocs/vendor/magento/framework/Event/Manager.php:66 Magento \ Framework \ Event \ Manager-> dispatch () di / opt / bitnami / apps / magento / htdocs / var / generation / Magento / Framework / Event / Manager / Proxy.php: 95 Magento \ Framework \ Event \ Manager \ Proxy-> dispatch () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Model/AbstractModel.php:800 Magento \ Framework \ Model \ AbstractModel->afterSave () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Model/ResourceModel/Db/AbstractDb.php:818 Magento \ Framework \ Model \ ResourceModel \ Db \ AbstractDb-> prosesAfterSaves () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / Model / ResourceModel / Db / AbstractDb.php: 408 Magento \ Framework \ Model \ ResourceModel \ Db \ AbstractDb-> save () di / opt / bitnami / apps /magento/htdocs/vendor/magento/framework/Model/AbstractModel.php:631 Magento \ Framework \ Model \ AbstractModel-> save () di / opt / bitnami / apps / magento / htdocs / vendor / magento / module-indexer / Setup / Recurring.php: 108 Magento \ Indexer \ Setup \ Recurring-> install () di /opt/bitnami/apps/magento/htdocs/setup/src/Magento/Setup/Model/Installer.php:871 Magento \ Setup \ Model \ Installer->handleDBSchemaData () di /opt/bitnami/apps/magento/htdocs/setup/src/Magento/Setup/Model/Installer.php:779 Magento \ Setup \ Model \ Installer-> installSchema () di / opt / bitnami / apps / magento / htdocs / setup / src / Magento / Setup / Console / Command / UpgradeCommand.php: 89 Magento \ Setup \ Console \ Command \ UpgradeCommand-> jalankan () di / opt / bitnami / apps / magento / htdocs / vendor / symfony /console/Symfony/Component/Console/Command/Command.php:257 Symfony \ Component \ Console \ Command \ Command-> run () di / opt / bitnami / apps / magento / htdocs / vendor / symfony / console / Symfony / Component / Console / Application.php: 874 Symfony \ Component \ Console \ Application-> doRunCommand () di /opt/bitnami/apps/magento/htdocs/vendor/symfony/console/Symfony/Component/Console/Application.php195 Symfony \ Component \ Console \ Application->doRun () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Console/Cli.php:96 Magento \ Framework \ Console \ Cli-> doRun () di / opt / bitnami / apps / magento / htdocs / vendor / symfony / console / Symfony / Component / Console / Application.php: 126 Symfony \ Component \ Console \ Application-> run () di / opt / bitnami / apps / magento / htdocs / bin / magento: 23
[Magento \ Framework \ Exception \ LocalizedException] Kode area tidak disetel
Jejak pengecualian: () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/App/State.php:139 Magento \ Framework \ App \ State-> getAreaCode () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / Session / SessionManager.php: 174 Magento \ Framework \ SessionManager-> start () di / opt / bitnami / apps / magento / htdocs / var / generation / Magento / Framework / Session /Generic/Interceptor.php:50 Magento \ Framework \ Session \ Generic \ Interceptor-> start () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Session/SessionManager.php:130 Magento \ Framework \ Session \ SessionManager -> __ construct () di /opt/bitnami/apps/magento/htdocs/var/generation/Magento/Framework/Session/Generic/Interceptor.php14 Magento \ Framework \ Session \ Generic \ Interceptor->>__construct () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:93 Magento \ Framework \ ObjectManager \ Factory \ AbstractFactory-> createObject () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / ObjectManager / Factory / Dynamic / Developer.php: 89 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer-> create () di / opt / bitnami / apps / magento / htdocs /vendor/magento/framework/ObjectManager/ObjectManager.php:71 Magento \ Framework \ ObjectManager \ ObjectManager-> get () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / ObjectManager / Factory / AbstractFactory. php: 126 Magento \ Framework \ ObjectManager \ Factory \ AbstractFactory-> resolArgument () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:53 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer -> _ resolArguments () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:82 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer-> create () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/ObjectManager/ObjectManager.php:71 Magento \ Framework \ ObjectManager \ ObjectManager-> dapatkan () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:126 Magento \ Framework \ ObjectManager \ Factory \ AbstractFactory-> resolArgument () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / ObjectManager / Factory / Dynamic / Developer.php: 53 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer->_resolveArguments () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:82 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer-> create () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / ObjectManager / ObjectManager.php: 71 Magento \ Framework \ ObjectManager \ ObjectManager-> get () di / opt / bitnami / apps / magento / htdocs / vendor / magento /framework/ObjectManager/Factory/AbstractFactory.php:126 Magento \ Framework \ ObjectManager \ Factory \ AbstractFactory-> resolArgument () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / ObjectManager / Factory / Dynamic / Developer.php: 53 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer -> _ resolArguments () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:82 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer-> create () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/ObjectManager.php:71 Magento \ Framework \ ObjectManager \ > dapatkan () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:126 Magento \ Framework \ ObjectManager \ Factory \ AbstractFactory-> resolArgument () di / opt / bitnami / /apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:53 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer -> _ resolArguments () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / ObjectManager / Factory / Dynamic / Developer.php: 82 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer->buat () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/ObjectManager.php:71 Magento \ Framework \ ObjectManager \ ObjectManager-> dapatkan () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / ObjectManager / Factory / AbstractFactory.php: 126 Magento \ Framework \ ObjectManager \ Factory \ AbstractFactory-> resolArgument () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / ObjectManager /Factory/Dynamic/Developer.php:53 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer -> _ resolArguments () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / ObjectManager / Factory / Dynamic / Developer.php: 82 Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer-> create () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/ObjectManager.php:71 Magento \ Framework \ ObjectManager \ ObjectManager-> get () di /opt/bitnami/apps/magento/htdocs/app/code/J2t/Rewardpoints/Observer/ProcessSaveModel.php:21 J2t \ Rewardpoints \ Observer \ ProcessSaveModel-> dieksekusi () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Event/Invoker/InvokerDefault.php:73 Magento \ Framework \ Event \ Invoker \ InvokerDefault -> _ callObserverMethod () di / opt / bitnami / apps /magento/htdocs/vendor/magento/framework/Event/Invoker/InvokerDefault.php:61 Magento \ Framework \ Event \ Invoker \ InvokerDefault-> dispatch () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / Event / Manager.php: 66 Magento \ Framework \ Event \ Manager-> dispatch () di /opt/bitnami/apps/magento/htdocs/var/generation/Magento/Framework/Event/Manager/Proxy.php:95 Magento \ Framework \ Event \ Manager \ Proxy->kirim () di /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Model/AbstractModel.php:800 Magento \ Framework \ Model \ AbstractModel-> afterSave () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / Model / ResourceModel / Db / AbstractDb.php: 818 Magento \ Framework \ Model \ ResourceModel \ Db \ AbstractDb-> processAfterSaves () di / opt / bitnami / apps / magento / htdocs / vendor / magento /framework/Model/ResourceModel/Db/AbstractDb.php:408 Magento \ Framework \ Model \ ResourceModel \ Db \ AbstractDb-> save () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / Model / AbstractModel.php: 631 Magento \ Framework \ Model \ AbstractModel-> save () di /opt/bitnami/apps/magento/htdocs/vendor/magento/module-indexer/Setup/Recurring.php:108 Magento \ Indexer \ Setup \ Berulang->instal () di /opt/bitnami/apps/magento/htdocs/setup/src/Magento/Setup/Model/Installer.php:871 Magento \ Setup \ Model \ Installer-> handleDBSchemaData () di / opt / bitnami / apps / magento / htdocs / setup / src / Magento / Setup / Model / Installer.php: 779 Magento \ Setup \ Model \ Installer-> installSchema () di / opt / bitnami / apps / magento / htdocs / setup / src / Magento / Setup /Console/Command/UpgradeCommand.php:89 Magento \ Setup \ Console \ Command \ UpgradeCommand-> eksekusi () di / opt / bitnami / apps / magento / htdocs / vendor / symfony / console / Symfony / Komponen / Console / Command / Command.php: 257 Symfony \ Component \ Console \ Command \ Command-> run () di /opt/bitnami/apps/magento/htdocs/vendor/symfony/console/Symfony/Component/Console/Application.php:874 Symfony \ Komponen \ Konsol \ Aplikasi->doRunCommand () di /opt/bitnami/apps/magento/htdocs/vendor/symfony/console/Symfony/Component/Console/Application.php:195 Symfony \ Component \ Console \ Application-> doRun () di / opt / bitnami / apps / magento / htdocs / vendor / magento / framework / Console / Cli.php: 96 Magento \ Framework \ Console \ Cli-> doRun () di / opt / bitnami / apps / magento / htdocs / vendor / symfony / console / Symfony /Component/Console/Application.php:126 Symfony \ Component \ Console \ Application-> run () di / opt / bitnami / apps / magento / htdocs / bin / magento: 23jalankan () di / opt / bitnami / apps / magento / htdocs / bin / magento: 23jalankan () di / opt / bitnami / apps / magento / htdocs / bin / magento: 23
setup: upgrade [--keep-generate] [--magento-init-params = "..."]
Jadi kalau ada yang bisa membantu ke mana harus mencari, ini akan bagus
Terima kasih sebelumnya
sumber
Jawaban:
Lihatlah di sini:
Sepertinya modul ini mencoba mengambil Object Manager yang mungkin memicu kesalahan jika kode area itu tidak disetel. Dalam komentar saya, saya menautkan ke solusi yang saya temukan untuk kesalahan ini untuk ekstensi yang saya gunakan. Mungkin bisa membantu Anda di sini saat panggilan ke Object Manager terjadi di Observer.
Berikut tautan itu lagi: peringatan Magento 2 "Kode area tidak disetel" di modul pihak ke-3
sumber
Saya baru saja mengalami masalah ini berjalan
bin/magento setup:upgrade
, dan pengecualian dilemparkan olehmodule-config
.Area code is not set {"exception":"[object] (Magento\\Framework\\Exception\\State\\InvalidTransitionException(code: 0): Area code is not set at /magento/htdocs/vendor/magento/module-config/Model/Config/Importer.php:137
Ternyata saya memiliki beberapa pengaturan
app/etc/env.php
yang tidak disukai importir konfigurasi. Menetapkan breakpoint pada baris itu menunjukkan kepada saya data mana yang mencoba diperbarui, dan menghapusnya dariapp/etc/env.php
memperbaiki masalah bagi saya.Semoga ini bisa membantu seseorang!
sumber
Punya masalah yang sama. Menambahkan var_export () untuk melihat apa itu buzzy.
Kemudian ia mengembalikan beberapa pengaturan dari app saya / dll / env.php
Dihapus dan berfungsi lagi.
sumber