Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to delete an entity doesn't work #9

Open
wants to merge 2 commits into
base: 7.x-1.x
Choose a base branch
from

Conversation

TuWebO
Copy link
Contributor

@TuWebO TuWebO commented Jan 21, 2016

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