this is a duplicate of Prompt user to confirm deleting block when an existing block reference is linked to the block @Bader