Skip to content

Trying to delete an entity doesn't work#9

Open
TuWebO wants to merge 2 commits into
plopesc:7.x-1.xfrom
TuWebO:7.x-1.x
Open

Trying to delete an entity doesn't work#9
TuWebO wants to merge 2 commits into
plopesc:7.x-1.xfrom
TuWebO:7.x-1.x

Conversation

@TuWebO

@TuWebO TuWebO commented Jan 21, 2016

Copy link
Copy Markdown
Contributor

When trying to delete an entity (instance of one of my types), I can see the form and the delete button, but the delete button doesn't work as expected, when I press it nothing happens (besides a redirection to the entity_module/id).
It should show the confirm_form (for deletion).

I've noticed that the path should include 'admin/content' in the my_entity_form_submit_delete() handler.

To get the propper path, we can hardcoded it because it is in the .module

'admin ui' => array(
      'path' => 'admin/content/my_entity',
      'file' => 'my_entity.entity.inc',
      'controller class' => '\Drupal\entity_boilerplate\Entity\MyEntity\MyEntityUIController',
      'menu wildcard' => '%my_entity'
    ),

or we can get that info from

entity_info -> [admin ui][path]

Right now it leave it hardcoded, because I don't know the best solution

Modify var name $property_info to avoid conflicts
No sure about to hardcoded that info or get it from entity_info() under [admin ui][path]. Maybe there is another way te get the admin/content path?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant