This topic contains 2 replies, has 2 voices, and was last updated by msalmi.kais 6 years, 3 months ago.
- Topic
I wanted to change frontend theme so I started by installing a new Bundle:
123456Php app/console generate:bundleAre you planning on sharing this bundle… => YesBundle namespace: Kais/Bundle/SpgThemeBundleBundle name : SpgThemeBundleTarget Directory : srcConfiruration format : ymlI noticed the following changes:
1234##app\config\routing.yml##kais_spg_theme:resource: "@KaisSpgThemeBundle/Resources/config/routing.yml"prefix: /12##appkernel.php##new Kais\Bundle\SpgThemeBundle\KaisSpgThemeBundle(),123##config.yml##oro_theme:active_theme: spgthemebundle structure
123456789101112131415161718192021222324252627282930Kais/Bundle/├─SpgThemeBundle│ ├─ Controller/└─DefaultController.php│ ├─ DependencyInjection/└─Configuration.php└─SpgThemeExtension.php│ ├─ Resources/├─config/├─oro/└─bundles.yml└─routing.yml└─services.yml├─Public/├─Themes/├─Spgtheme/├─css/└─spg.css├─images/└─favicon.ico└─logo.png└─settings.yml├─views/├─Default/└─index.html.twig│ ├─Tests/├─Controller/└─DefaultControllerTest.php└─SpgThemeBundle.php1234##bundles.yml##bundles:# priority should be higher then priority of OroFrontendBundle- { name: Kais\Bundle\SpgThemeBundle\SpgThemeBundle, priority: 10 }1234##routing.yml##spg_theme_homepage:path: /defaults: { _controller: SpgThemeBundle:Default:index }123456##settings.yml##label: Kais Spg Themeicon: bundles/kaisspgtheme/themes/spgtheme/images/favicon.icologo: bundles/kaisspgtheme/themes/spgtheme/images/logo.pngstyles:- bundles/kaisspgtheme/themes/spgtheme/css/spg.csswhen i run the php app / console cache: clear I get this error:
12[LogicException]Trying to register two bundles with the same name "SpgThemeBundle"in the web page
1234567891011Fatal error: Uncaught LogicException: Trying to register two bundles withthe same name "SpgThemeBundle" in C:\EasyPHP-Devserver-17\eds-www\oro-commerce\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php:433 Stack trace: #0 C:\EasyPHP-Devserver-17\eds-www\oro-commerce\vendor\oro\platform\src\Oro\Bundle\DistributionBundle\OroKernel.php(37): Symfony\Component\HttpKernel\Kernel->initializeBundles() #1C:\EasyPHP-Devserver-17\eds-www\oro-commerce\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php(130):Oro\Bundle\DistributionBundle\OroKernel->initializeBundles() #2 C:\EasyPHP-Devserver-17\eds-www\oro-commerce\vendor\oro\platform\src\Oro\Bundle\DistributionBundle\OroKernel.php(228): Symfony\Component\HttpKernel\Kernel->boot() #3C:\EasyPHP-Devserver-17\eds-www\oro-commerce\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php(182):Oro\Bundle\DistributionBundle\OroKernel->boot() #4 C:\EasyPHP-Devserver-17\eds-www\oro-commerce\web\app.php(23):Symfony\Component\HttpKernel\Kernel->han in C:\EasyPHP-Devserver-17\eds-www\oro-commerce\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php on line 433How to solve this problem ? thank you
The forum ‘OroCommerce’ is closed to new topics and replies.