OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Use oro_form.update_handler service in simple CRUD

This topic contains 4 replies, has 2 voices, and was last updated by  adriwan_kenoby 4 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
  • #34559

    adriwan_kenoby
    Participant

    In order to use all features provide by Oro I want to use the service oro_form.update_handler.

    An exemple using the deprecated oro_form.model.update_handler :

    I want to implement the same logic (with redirection to index or view page) but i don’t understand how it work…

    Example :

    This always redirect me to the login page with the error You have lost your access to organization "ORO". Please relogin.

    Could you point me what i am doing wrong ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #34560

    ibratsilo
    Moderator

    Hi,

    Could you please clarify which version of application you are using?
    Did you try to use new handler for other forms?

    I can not reproduce such error using new handler, maybe the reason is in your form. Actually such error “You have lost your access to organization…” is not triggered by handler itself but by Oro\Bundle\SecurityBundle\Http\Firewall\ContextListener in case if wrong organization stored in token (and no appropriate organization in user).

    #34561

    adriwan_kenoby
    Participant

    Hi,

    I use orocommerce version 1.6, i have never tried the new handler service before.

    Could you provide a working example ?

    #34563

    ibratsilo
    Moderator

    I found old handler usage and just replaced it on new oro_form.update_handler. For example in this place – https://github.com/oroinc/orocommerce/blob/42c8aa0d33e441b4a17479bb4ac8dec8eafeeed5/src/Oro/Bundle/CMSBundle/Controller/ContentBlockController.php#L93

    And all worked as expected on UI.

    I suggest you to try to do it in same way. Just temporary replace in your vendor folder https://github.com/oroinc/orocommerce/blob/42c8aa0d33e441b4a17479bb4ac8dec8eafeeed5/src/Oro/Bundle/CMSBundle/Controller/ContentBlockController.php#L93 this to “oro_form.update_handler”.

    Go Marketing -> Content Blocks -> Edit (on any) and check whatever save works.

    #34564

    adriwan_kenoby
    Participant

    Thank you ibratsilo

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

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

Back to top

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

Yes No

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

Yes No