Description
It's not possible to edit a Content Type with ezobjectrelation field type that has a deleted starting location defined.
Steps to reproduce:
1. Login as admin
2. Go to Admin -> Content Types
3. Open "Content" group
4. Start creating a new Content Type. Enter:
- Name: TestCt
- Identifier: testct
5. Add field type: "Content relations (multiple)" (or single)
6. Select starting location for that field type: Media/Multimedia
7. Save
8. Navigate to "Media/Multimedia" Content
9. Send it to Trash
10. Go to Admin -> Content Types -> Content -> TestCt
11. Click on the pencil to edit
12. Expand FieldDefinition (by clicking the arrow)
Result:
[2019-02-26 12:25:04] php.CRITICAL: Call to a member function getName() on null {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to a member function getName() on null at /home/vagrant/ee_demo/vendor/ezsystems/ezplatform-admin-ui/src/bundle/Controller/ContentTypeController.php:462)"} []