Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Wanere authored Oct 29, 2019
1 parent e2c457e commit a12065c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ $builder->add('content', PanelType::class, [

#### Troubleshooting block deletion
Blocks are only removed on the `preUpdate` of the parent entity: if the only modification done on the form is the deletion of a block, the preUpdate event is not triggered, so the block will not be removed.

To solve this, you need to create an event on `preUpdate` (in your Sonata Admin for example), to be triggered when you save the form.
```php
public function preUpdate($object)
Expand Down

0 comments on commit a12065c

Please sign in to comment.