Skip to content

Commit

Permalink
CRUDController::editAction now respects $id param (#3961)
Browse files Browse the repository at this point in the history
  • Loading branch information
curry684 authored and greg0ire committed Jun 17, 2016
1 parent c5d657c commit be82d59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Controller/CRUDController.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public function deleteAction($id)
/**
* Edit action.
*
* @param int|string|null $id
* @param int|string|null $id Optional ID to use instead of globally provided default.
*
* @return Response|RedirectResponse
*
Expand All @@ -234,7 +234,7 @@ public function editAction($id = null)
// the key used to lookup the template
$templateKey = 'edit';

$id = $request->get($this->admin->getIdParameter());
$id = $id ?: $request->get($this->admin->getIdParameter());
$object = $this->admin->getObject($id);

if (!$object) {
Expand Down

5 comments on commit be82d59

@jforet
Copy link

@jforet jforet commented on be82d59 Jun 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regression when using child admin.
Please revert.

when you browse "admin/entityparent/id/entitychild/idchild/edit"
you will edit the entitychild with the "$id" instead of "$idchild"

@rande
Copy link
Member

@rande rande commented on be82d59 Jun 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@soullivaneuh @greg0ire @jforet is actually right. There is a regression now ...

@soullivaneuh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Erf, sorry about that. :-/

Can this be quickly fixed? If not I will revert this and push a new release tomorrow.

cc @curry684

@soullivaneuh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jforet @rande Please see: #3965

@soullivaneuh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.