OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Grid delete is not working

This topic contains 6 replies, has 3 voices, and was last updated by  cardiac 5 years, 11 months ago.

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

  • Creator
  • #34060



    adding another grid, I am facing another issue:
    I added the more or less default behavior of a delete action to the datagrid.

    When I click on the delete action button, the dialog shows up and when clicking ok the element is deleted in the UI. But after the reload the element is present again.

    So I checked the networking and the delete request won’t be fired. I checked the delete-action.js and checked the URL for the request and it seems to be okay.

    Where to debug next? Why is the delete request missing?

    Best regards

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
  • #34061


    Hi @cardiac

    1) I would verify if the route exists on your application. If not, double check your routing annotations or yml.

    php app/console debug:route | grep app_api_delete_customerprojectarticle

    2) I would figure out why don’t have ACL parameter for delete action

    3) Since using the browser inspector you don’t see any network request to delete route, I would double check if cleaning cache command are generating the new .js route files.

    4) Also I would add a breakpoint on delete controller action



    Hi Rodolfo,

    that’s things I checked before, but here are the results:


    2) I wanted to figure out if ACL is the problem
    Adding (or removing) ACL app_customerprojectarticle_delete makes no difference.

    3) The first thing I do having problems with Oro is a complete platform update.

    3) The delete controller action is not triggered at all. But sure, I added a breakpoint there and see no change


    Yevhen Shyshkin

    Hello, cardiac.

    If request isn’t triggered from the frontend part – then this is JS issue. Please, check if DeleteAction::doDelete action in delete-action.js really triggers request via model.destroy, and if not – why it happens.



    I tried to debug the whole thing:

    Logging ModelAction.getLink(): /api/rest/latest/customerprojectarticles/2

    DeleteAction::doDelete is triggered: console.log("Success"); in delete-action.js Line 53, but console.log(this); returns undefined here.

    Logging console.log(this.model); in line 44 of DeleteAction::doDelete:

    I bet there is a check somewhere in the JS parts where it relies on a column named id which doesn’t exist.


    Yevhen Shyshkin

    > I bet there is a check somewhere in the JS parts where it relies on a column named id which doesn’t exist.
    Look’s like you are right, and I think I found an issue – Backbone checks for identifier field (“id” by default) to find out if model is new, and if it’s not – delete will not be triggered.

    That’s our issue, thank you very much for reporting – we need to fix it ASAP. For now you should specify identifier alias called “id” and pass it as a property.



    Thanks Yevhen

    I renamed the “caId” to “id” as the alias, and it’s working.

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

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

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

Yes No