OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions Extending OroCRMSalesBundle

This topic contains 2 replies, has 2 voices, and was last updated by  acll19 5 years, 5 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
  • #25025


    I’m new to oroCRM, I need to extend the OroCRMSalesBundle and I just read the documentation for extending a bundle and did it but I get the following exception:

    An exception has been thrown during the rendering of a template (“Unable to generate a URL for the named route “orocrm_sales_lead_index” as such route does not exist.”) in OroNavigationBundle:Shortcut:shortcuts.html.twig at line 207.

    my bundle looks like this:

    namespace CustomCrm\Bundle\SalesBundle;

    use Symfony\Component\HttpKernel\Bundle\Bundle;

    class CustomSalesBundle extends Bundle {

    public function getParent() {
    return 'OroCRMSalesBundle';

    my question is: Do I have do anything else to get it to work?

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #25026


    Hi @acll19,

    1) I would change the name of your class to: CustomCrmSalesBundle
    2) Check if that route exist using: php app/console router:debug | grep orocrm_sales_lead_index
    3) Check if your custom extension is loaded properly. According with the doc using that app_dev.php debug window.
    4) cache:clear is fundamental to see your custom extension active

    Hope these tips help you



    Thanks for your help Rodolfo.
    My extension was loaded properly but when I ran php app/console router:debug | grep orocrm_sales_index I found out that symfony Kernel was not loading the parent bundle routes so I did a google search and I found this link http://stackoverflow.com/questions/9373433/symfony2-bundle-inheritance-losing-parent-bundles-routes It turns out that “… if you use @ as prefix for the controller this will pass to the kernel resolver which will return ONLY the child resource if the parent resource has been overridden.” And that’s what was happining to me. Another thing to I had to do was to place my routing.yml file into Resources//config/oro folder, otherwise it won’t work.

    Thanks for your tips again.

Viewing 2 replies - 1 through 2 (of 2 total)

The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.

You will be redirected to [title]. Would you like to continue?

Yes No