I've searched the issue queue, but I haven't found an issue dealing with my question:
Let's say a user created an FPP on a page and then the FPP is deleted through the listing under admin/structure/filedable-panels-panes/example-pane/delete. You end up with a "Placeholder for empty or inaccessible "Deleted/removed entity pane" on the page where the FPP was initially added.
Is there a way to handle the deletion of FPP's and also delete any references to the FPP on any pages?
Can I for instance implement a hook_entity_delete() that deletes any rows with the corresponding FPP id (fpid) from the panels_pane table or is that solution too crude?
If there is no way for that: is there any negative impact on performance resulting from the references to non-existing FPP's?
Comments
Comment #1
Marty2081 CreditAttribution: Marty2081 commentedComment #2
Marty2081 CreditAttribution: Marty2081 commentedI've implemented the following and that seems to do the trick:
Is there any reason not to implement it like this?
Comment #3
rozh CreditAttribution: rozh commentedFPP's also can be deleted with contextual links. And it is not obvious that you have to edit panel page and delete empty placeholder after you have deleted FPP entity.
I know nothing about performance impact but with error messages enabled I can see notices about missing FPP's:
Notice: Undefined index: bundle in fieldable_panels_panes_load_from_subtype() (line 995 of /home/d1ncj/www/sites/default/modules/fieldable_panels_panes/fieldable_panels_panes.module)