Kode area tidak disetel


10

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


Lihatlah dulu di sini: magento-quickies.alanstorm.com/post/142652104930/... Saya tidak tahu apakah ini akan berhasil untuk Anda, seperti dalam kasus yang dijelaskan dia membuat modul CLI pelanggan. Juga, melihat-lihat jejak stack Anda, saya tidak melihat modul pihak ke-3. Apakah Anda menggunakan? Itulah pemicu berikutnya untuk jenis kesalahan ini. Itulah yang aku berlari ke beberapa minggu lalu: magento.stackexchange.com/questions/128658/...
circlesix

1
ada, dua, jadi saya akan mendukung mereka dan melihat ke mana perginya.
David Aschenbrener

Hal lain yang muncul di kepala saya, pastikan Anda membersihkan folder di / var saat Anda menguji. Jika kesalahan menendang di var / generasi, bahkan jika Anda memperbaiki masalah dalam kode, folder ini terlihat ketika Anda melakukan perintah CLI lainnya, dan dapat membuat Anda tersandung saat Anda pergi.
circleix

forsure melakukan itu, jadi apa yang akhirnya saya lakukan adalah menonaktifkan modul J2t, dan jalankan lagi.
David Aschenbrener

Saya mengalami kesalahan kecil. Tetapi ketika Magento mencoba memperbarui ekstensi asli "Magento_Cms", saya mendapat: Kunci URL halaman berisi huruf kapital atau simbol yang tidak dibolehkan. tetapi mengikuti magento.stackexchange.com/questions/123364/... ini memperbaikinya dan shazaam, saya ditingkatkan.
David Aschenbrener

Jawaban:


5

Lihatlah di sini:

Magento \ Framework \ ObjectManager \ ObjectManager-> get () di / opt / bitnami / apps / magento / htdocs / app / code / J2t / Rewardpoints / Observer / ProcessSaveModel.php: 21

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


1
Saya memiliki masalah yang sama, tetapi dalam kasus saya, saya tidak melihat modul bagian ketiga dari jejak pengecualian. Semua baris dari jejak pengecualian adalah Magento \ Framework \ ObjectManager ..... Dapatkah saya melacak lebih banyak kesalahan dari log excep opsi -vvv ini?
Magento Learner

Itu tempat pertama untuk memulai. Saya telah melihat masalah ini muncul karena alasan lain di luar pertanyaan khusus ini. Ada baiknya mencoba untuk mendapatkan laporan yang lebih verbal dan kemudian memposting pertanyaan baru.
circleix

3

Saya baru saja mengalami masalah ini berjalan bin/magento setup:upgrade, dan pengecualian dilemparkan oleh module-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.phpyang tidak disukai importir konfigurasi. Menetapkan breakpoint pada baris itu menunjukkan kepada saya data mana yang mencoba diperbarui, dan menghapusnya dari app/etc/env.phpmemperbaiki masalah bagi saya.

Semoga ini bisa membantu seseorang!


0

Punya masalah yang sama. Menambahkan var_export () untuk melihat apa itu buzzy.

        } catch (\Exception $e) {
        var_export($data);
        throw new InvalidTransitionException(__('%1', $e->getMessage()), $e);

Kemudian ia mengembalikan beberapa pengaturan dari app saya / dll / env.php

array (
  'default' => 
  array (
    'dev' => 
    array (
      'debug' => 
      array (
        'debug_logging' => '0',
      ),
    ),
  ),
)

Dihapus dan berfungsi lagi.

Dengan menggunakan situs kami, Anda mengakui telah membaca dan memahami Kebijakan Cookie dan Kebijakan Privasi kami.
Licensed under cc by-sa 3.0 with attribution required.