After creating content recommendation blocks at admin/config/search/apachesolr/mlt/add_block, there's no way in the user interface to delete them again. I would expect a link either
- on admin/config/search/apachesolr for the message "You currenly have n blocks." to a seperate admin screen
- or on admin/structure/block by being able to delete the blocks

CommentFileSizeAuthor
#4 1271964.patch2.6 KBnick_vh

Comments

pwolanin’s picture

Category: bug » feature
nick_vh’s picture

Initial take : This would be possible by doing a form_alter and add something like core does :

http://api.drupal.org/api/drupal/modules--block--block.admin.inc/functio...

   if ($block['module'] == 'apachesolr') {
     //Add some way to recognize MLT blocks
     if(strpos($block['delta'] , 'apachesolr-mlt')) {
        $form['blocks'][$key]['delete'] = array(
          '#type' => 'link', 
          '#title' => t('delete'), 
          '#href' => 'admin/apachesolr/'. $block['delta'] . '/delete',
        );
      }
    }
pwolanin’s picture

You would also have to check the block delta (or something) to be sure it's a mlt block, not some other apachesolr block.

nick_vh’s picture

Status: Active » Needs review
StatusFileSize
new2.6 KB

Attached patch enables the delete link in the blocks admin page again.

nick_vh’s picture

Status: Needs review » Fixed

Fixed and committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.