OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform Extending UserController Method Error

This topic contains 3 replies, has 2 voices, and was last updated by  Rodolfo 9 years, 2 months ago.

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

  • Creator
    Topic
  • #36845

    Rodolfo
    Participant

    Hi Oro Friends,

    Please a I need a help to extend this method: https://github.com/orocrm/platform/blob/master/src/Oro/Bundle/UserBundle/Controller/UserController.php#L177-L197

    I tried using ‘$output = parent::view();’ but didn’t work. So I decided to try copying all the logic from the original method.
    So, what am I doing wrong?

    My error is:
    Strict standards: Declaration of Acme\Bundle\TestBundle\Controller\UserController::view() should be compatible with Oro\Bundle\UserBundle\Controller\UserController::view(Oro\Bundle\UserBundle\Entity\User $entity, $editRoute = ”) in /www/orocrm/src/Acme/Bundle/TestBundle/Controller/UserController.php on line 8

    And

    Unable to generate a URL for the named route “oro_user_security_login” as such route does not exist.
    500 Internal Server Error – RouteNotFoundException

    Thanks guys!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #36846

    Rodolfo
    Participant

    Hello!
    I managed to solve the problem with the follow code:

    And oro/routing.yml

    #36847

    Yevhen Shyshkin
    Participant

    Hello, Rodolfo.

    That’s great! As for routing inheritance – we’ve added precise file reference, so now you shouldn’t use direct path – instead you should use relative precise path (@!OroUserBundle/Controller). This week there will be a webinar about bundle extension – this feature will be introduced there.

    #36848

    Rodolfo
    Participant

    Thank you @yshyshkin

    I’ll be there!

    Rodolfo

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

The forum ‘OroPlatform’ is closed to new topics and replies.

Back to top