<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                # 常見問題 三 ## 38,js報錯 Uncaught ReferenceError: Base64 is not defined 2.2.6升級到2.3.0后,后臺主題編輯頁面 打不開 js有報錯 > Uncaught ReferenceError: Base64 is not defined 解決辦法: 找到下面這幾個文件 ~~~ > /vendor/magento/module-email/view/adminhtml/ui_component/design_config_form.xml > /vendor/magento/module-catalog/view/adminhtml/ui_component/design_config_form.xml > /vendor/magento/module-backend/view/adminhtml/ui_component/design_config_form.xml > /vendor/magento/module-swatches/view/adminhtml/ui_component/design_config_form.xml > /vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml ~~~ 把 ``` formElement="fileUploader" ``` 替換成 ``` formElement="imageUploader" ``` 都保存后,再重新deploy下 就好了。 參考 https://github.com/magento/magento2/issues/19549 ## 39,js報錯 Uncaught Error: Script error for: tinymce 2.2.6升級到2.3.0后,后臺第三方插件頁面打不開,js報錯 ``` Uncaught Error: Script error for: tinymce ``` 這是因為2.3.0里,升級tinymce了,升級到tinymce4了。之前舊的tinymce廢棄了,所以需要把`tinymce`的改成`tinymce4`就行。 比如 ``` define([ "jquery", "tinymce", ``` 改成 ``` define([ "jquery", "tinymce4", ``` ## 40,Unique constraint violation found > Unique constraint violation found {"exception":"[object] (Magento\\Framework\\Exception\\AlreadyExistsException(code: 0): Unique constraint violation found at /www/wwwroot/newbestyle.com/vendor/magento/framework/Model/ResourceModel/Db/AbstractDb.php:426, Magento\\Framework\\DB\\Adapter\\DuplicateException(code: 1062): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0-8144-product' for key 'GOOGLEOPTIMIZER_CODE_STORE_ID_ENTITY_ID_ENTITY_TYPE', query was: INSERT INTO `googleoptimizer_code` (`entity_id`, `entity_type`, `store_id`, `experiment_script`) VALUES (?, ?, ?, ?) at 解決辦法: 1, Go to admin -> Stores -> Configuration -> Sales -> Google API section 2, Change the configuration Enable Content Experiments to "No" ## 41,Argument 4 passed to Magento\Developer\Model\View\Asset\PreProcessor\FrontendCompilation > FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Argument 4 passed to Magento\De veloper\Model\View\Asset\PreProcessor\FrontendCompilation::processContent() must be an instance of Magento\Framework\View\Asset\File\FallbackContext, in stance of Magento\Framework\View\Asset\File\Context given, called in /home/www/magento2/vendor/magento/module-developer/Model/View/Asset/Pr eProcessor/FrontendCompilation.php on line 90 and defined in /home/www/magento2/vendor/magento/module-developer/Model/View/Asset/PreProcess or/FrontendCompilation.php:107 Stack trace: #0 /home/www/magento2/vendor/magento/module-developer/Model/View/Asset/PreProcessor/FrontendCompilation.php(90): Magento\Developer\Model\Vi ew\Asset\PreProcessor\FrontendCompilation->processContent('e3054c302a868e8...', '@import 'source...', '', Object(Magento\Framework\View\Asset\File\Conte xt)) 這是因為你在developer模式下,并且開啟了merge css/js功能,導致出問題了。 解決辦法有2種: 1,改成production模式,保留merge css/js功能 2,或者在developer模式下,把`dev/js/merge_files`和`dev/css/merge_css_files`設為0,也就是不merge css/js。 ## 42,main.CRITICAL: No linked stock found 2.3.1才有這問題,需要設置多源庫存。 常見于分類頁面或者產品頁面報錯 甚至不顯示。 解決辦法: 1,Try going into Stores > Inventory > Sources and adding in a source. Maybe call it your business name, then fill in a country and zip value. 2,Then, try going into Stores > Inventory > Stocks. Call it "Default Stock" and apply it to all websites (if multi store) and hit save. 設置個默認倉庫就行了。 ## 43,Fatal error: Uncaught TypeError: Return value of Magento\\Framework\\Encryption\\Adapter\\SodiumChachaIetf::decrypt() must be of the type string 這是m2的一個bug,在2.3.0里特殊環境下會發生。 解決辦法: 修改 `vendor/magento/framework/Encryption/Adapter/SodiumChachaIetf.php` ~~~ $plainText = sodium_crypto_aead_chacha20poly1305_ietf_decrypt( $payload, $nonce, $nonce, $this->key ); if ($plainText == false) { return ""; } return $plainText; ~~~ 參考:[https://github.com/magento/magento2/issues/19590](https://github.com/magento/magento2/issues/19590) ## 44, 2.3.1后臺產品列表里無法更新所有產品的屬性 2.3.1里產品列表 `Select All`,再 `Update Attributes`,發現只更新了20個(當前一頁)的產品。而不是所有的產品。 這是2.3.1的一個bug,2.3.2里還沒修復。 [https://github.com/magento/magento2/issues/22004](https://github.com/magento/magento2/issues/22004) [https://github.com/magento/magento2/commit/0f29a266256cca24cd7dd1082aa4aa31a3a9eacd](https://github.com/magento/magento2/commit/0f29a266256cca24cd7dd1082aa4aa31a3a9eacd) 直接修改`vendor/magento/module-ui/view/base/web/js/grid/massactions.js` 把 ``` if (itemsType === 'excluded' && data.selected && data.selected.length) { itemsType = 'selected'; data[itemsType] = _.difference(data.selected, data.excluded); } ``` 這幾段代碼注釋掉就行了。 ## 45, 2.2.6/2.2.7版本后臺上傳 placeholder圖片,不能保存 ![](https://box.kancloud.cn/c95a29d41429ef0920b15837306bc84b_1640x550.png) 這是m2的一個bug,在2.2.6和2.2.7里出現,在2.3.0里修復了。 如果可以升級版本的話,就直接升級到最新版本。 如果不能升級版本的話,就修改下源代碼: 把`vendor/magento/module-config/Model/Config.php`內容替換為: [https://raw.githubusercontent.com/magento/magento2/be9fa4a73b85022565db991f11dfceeecf40edae/app/code/Magento/Config/Model/Config.php](https://raw.githubusercontent.com/magento/magento2/be9fa4a73b85022565db991f11dfceeecf40edae/app/code/Magento/Config/Model/Config.php) 參考 [https://magento.stackexchange.com/questions/247775/cant-upload-product-placeholder-images-in-magento-2](https://magento.stackexchange.com/questions/247775/cant-upload-product-placeholder-images-in-magento-2) ## 46, bundle產品和簡單(可配置)產品一起購買下單,創建invoice時簡單(可配置)產品會丟失,導致支付的金額不對。 這是2.3.1的bug。在2.3.2里修復了。 [https://github.com/magento/magento2/issues/22246](https://github.com/magento/magento2/issues/22246) [https://github.com/magento/magento2/commit/ec2c6ca7df68de9aaccecfb899b102a2a3eaa631](https://github.com/magento/magento2/commit/ec2c6ca7df68de9aaccecfb899b102a2a3eaa631) ## 47, Type Error occurred when creating object: Magento\\Framework\\Locale\\Resolver 這是2.3.1的bug。在2.3.2里修復了。 ``` Type Error occurred when creating object: Magento\\Framework\\Locale\\Resolver, Return value of Magento\\Framework\\Encrypt ion\\Adapter\\SodiumChachaIetf::decrypt() must be of the type string, boolean returned \[\] ``` 見 https://github.com/magento/magento2/issues/19590 修改了 `vendor/magento/framework/Encryption/Adapter/SodiumChachaIetf.php` ``` public function decrypt(string $data): string { $nonce = mb_substr($data, 0, SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES, '8bit'); $payload = mb_substr($data, SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES, null, '8bit'); try { $plainText = sodium_crypto_aead_chacha20poly1305_ietf_decrypt( $payload, $nonce, $nonce, $this->key ); } catch (\SodiumException $e) { $plainText = ''; } return $plainText !== false ? $plainText : ''; } ``` ## 48, Front controller reached 100 router match iterations ~~~ Exception #0 (LogicException): Front controller reached 100 router match iterations ~~~ 這一般是2個插件同名,導致沖突了。 比如2個blog插件,`Magefan_Blog`和`MGS_Blog`,這2個的frontend/routes.xml 都是`blog`。 并且都重寫了前臺路由: ``` MGS\Blog\Controller\Router Magefan\Blog\Controller\Router ``` 導致沖突了。禁用一個,保留一個就行。 [https://devdocs.magento.com/guides/v2.3/extension-dev-guide/routing.html](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/routing.html) [https://github.com/magento/magento2/issues/21580](https://github.com/magento/magento2/issues/21580) ## 49, Session data file is not created by your uid ``` Warning: SessionHandler::read(): Session data file is not created by your uid ``` 這個是權限問題,php的session默認放在/tmp下的,給/tmp權限即可。 或者m2里可以指定session存放路徑,在app/etc/env.php里添加: ``` 'session' => [ 'save' => 'files', 'save_path' => '/var/www/toncen-test/var/session' ], ``` ## 50,Elasticsearch pagination 分頁有問題 這是2.3.3的一個bug。 見 [https://github.com/magento/magento2/issues/25038](https://github.com/magento/magento2/issues/25038) 里面有解決方案 ## 51,apache下403 Forbidden > Forbidden > > You don't have permission to access /webfiles on this server. Server unable to read htaccess file, denying access to be safe 這是權限問題,需要給magento2根目錄755的權限 `sudo chmod 755 /var/www/magento2` [https://stackoverflow.com/questions/27890751/magento-new-host-403-forbidden-server-unable-to-read-htaccess-file](https://stackoverflow.com/questions/27890751/magento-new-host-403-forbidden-server-unable-to-read-htaccess-file) ## 52,Magento\Framework\View\Page\Config\Renderer::canTypeBeFont() must be of the type string, null given > PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to Ma gento\Framework\View\Page\Config\Renderer::canTypeBeFont() must be of the type string, null given, called in /home/www/magento2/vendor/magento/framework/View/Page/Config/Renderer.php on line 347 and defined in /home/www/magento2/vendor/magento/framewor k/View/Page/Config/Renderer.php:426 這是因為layout渲染html的時候發現沒有找到對應的css或者js文件。一般多發生于新安裝的插件。 需要deploy下。 ## 53,Call to a member function getIsResizeEnabled() on null > PHP message: PHP Fatal error: Uncaught Error: Call to a member function getIsResizeEnabled() on null in vendor/magento/module-backend/view/adminhtml/templates/media/uploader.phtml:16 這個在v2.3.x版本里會出現,是因為你安裝的某個插件有調用上傳圖片的類,少傳了一個參數。 你肯定首先要找到插件的代碼,一般類似這樣 ``` $this->addChild('uploader', 'Magento\Backend\Block\Media\Uploader'); ``` 你改成 ``` $_objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $imageUploadConfigDataProvider = $_objectManager->get(\Magento\Backend\Block\DataProviders\ImageUploadConfig::class); $this->addChild( 'uploader', \Magento\Backend\Block\Media\Uploader::class, ['image_upload_config_data' => $imageUploadConfigDataProvider] ); ``` 這樣就行了。 參考 [https://github.com/magento/magento2/issues/22394](https://github.com/magento/magento2/issues/22394)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看