簡體   English   中英

在構建或管理 web 面板上找不到 Orocommerce 捆綁包主題

[英]Orocommerce bundle theme not found on build or admin webpanel

我有多個失敗的意圖來創建一個沒有成功結果的包。

首先,我在 https://doc.oroinc.com/4.1/backend/setup/dev-environment/ 上安裝類似信息的orocommerce (在https://github.com/juankav89/orocommerce-application上創建項目,執行composer install -- prefer-distphp bin/console oro:install --env=prod --timeout=2000

接下來我創建包文件夾和文件,當嘗試激活包時,顯示下一個結果(首先執行清除緩存命令,然后執行php bin/console oro:assets:build bogota ):



Building assets.
'/usr/local/bin/node' './node_modules/webpack/bin/webpack.js' '--hide-modules' '--env.theme=my_theme' '--env.stats=' '--env.symfony=dev' '--colors'
/home/juan/atlantictSoft/orocommerce/node_modules/webpack-cli/bin/cli.js:93
                                throw err;
                                ^

Error: Theme "my_theme" doesn't exists. Existing themes:admin.demo, admin.oro, blank, embedded_default, default, custom, view-switcher

當我嘗試安裝捆綁包時(使用php bin/console oro:assets:install命令),不顯示錯誤,但不包括php bin/console debug:container --parameter=kernel.bundles --format=json上的捆綁包結果。

接下來我包括我的包的結構:

orocommerce
...
├── src
│   ├── AppCache.php
│   ├── AppKernel.php
│   ├── Bogota
│   │   └── Bundle
│   │       └── NewBundle
│   │           ├── BogotaNewBundle.php
│   │           └── Resources
│   │               └── config
│   │                   └── oro
│   │                       └── bundles.yml
│   ├── MedellinBundle
│   │   └── Resources
│   │       ├── public
│   │       │   └── images
│   │       │       ├── descarga.png:Zone.Identifier
│   │       │       └── logo.png
│   │       └── views
│   │           └── layouts
│   │               └── first_theme
│   │                   └── theme.yml
│   └── teste
│       └── Bundle
│           └── TesteBundle
│               ├── Resources
│               │   ├── config
│               │   │   └── teste
│               │   │       ├── bundles.yml
│               │   │       └── bundles.yml:Zone.Identifier
│               │   ├── public
│               │   │   └── theme
│               │   │       ├── favicons
│               │   │       │   ├── favicon.ico
│               │   │       │   └── favicon.ico:Zone.Identifier
│               │   │       ├── images
│               │   │       │   ├── logo.svg
│               │   │       │   └── logo.svg:Zone.Identifier
│               │   │       └── scss
│               │   │           ├── components
│               │   │           │   ├── top-bar.scss
│               │   │           │   └── top-bar.scss:Zone.Identifier
│               │   │           ├── settings
│               │   │           │   ├── _colors.scss
│               │   │           │   ├── _colors.scss:Zone.Identifier
│               │   │           ├── styles.scss
│               │   │           ├── styles.scss:Zone.Identifier
│               │   │           └── variables
│               │   │               ├── top-bar-config.scss
│               │   │               └── top-bar-config.scss:Zone.Identifier
│               │   └── views
│               │       └── layouts
│               │           └── theme
│               │               ├── config
│               │               │   ├── assets.yml
│               │               │   └── assets.yml:Zone.Identifier
│               │               ├── theme.yml
│               │               └── theme.

我驗證名稱空間和文件名稱是否正確定義; 波哥大捆綁包

src/波哥大/Bundle/NewBundle/Resources/config/oro/bundles.yml

bundles:
    - Bogota\Bundle\NewBundle\BogotaNewBundle

src/波哥大/Bundle/NewBundle/BogotaNewBundle.php

<?php
namespace Bogota\Bundle\NewBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class BogotaNewBundle extends Bundle
{
}

最后,我嘗試檢查“http://localhost/app_dev.php/”,但返回 4040 和 **http://localhost/admin/config/system on Configuration->Commerce->Desing->Theme ** 但不顯示自定義包

請注意,所提供的結構中只有正確的 bundle 定義是BogotaNewBundle 其中所做的定義是正確的,它將成功地在應用程序中注冊捆綁包。

MedellinBundle項目不是 Symfony 捆綁包,至於 Oro 的主題,它依賴於捆綁包並且必須在其中定義。


建議稍微准確地學習下 一篇 https://doc.oroinc.com/master/frontend/storefront/quick-start文章的內容,然后再學習 https: //doc.oroinc.com/master/frontend/storefront中的所有其他主題


這是帶有正確主題定義的簡單工作包存檔的鏈接

!!!注意src/Bogota/Bundle/NewBundle/Resources/views/layouts/first_theme文件夾。 first_theme是主題的名稱,如果你只想為它運行構建,它必須與php bin/console oro:assets:build命令一起使用。 此外,此命令要求之前使用php bin/console oro:assets:install命令將資產安裝到公用文件夾中。 運行oro:assets:install包括構建例程。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM