After updating to search_api-8.x-1.0-beta-4 I have pending tasks that cannot be executed. On the status report page, a warning is displayed, but not the "Execute now" link. I cannot call the search_api.execute_tasks route because the _search_api_tasks requirement fails. Drupal\search_api\Task\TaskManager::getTasksCount() is called without conditions from the requirements check and with these conditions from the access check:

Array
(
    [type] => Array
        (
            [0] => addIndex
            [1] => updateIndex
            [2] => removeIndex
            [3] => deleteItems
            [4] => deleteAllIndexItems
        )

)

The value in the search_api_task.type column is "search_api.entity_datasource.trackItemsInserted".

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

morenstrat created an issue. See original summary.

drunken monkey’s picture

Component: General code » Framework
Status: Active » Needs review
FileSize
2.29 KB

Oh, you're right, thanks for reporting!
Apparently, while creating this general tasks system in #2574611: Unify our two task systems, we forgot to update that access check to use the new, general tasks manager instead of the server-specific one.
The attached patch should fix this. Please test! (Needs a cache-clear.)

morenstrat’s picture

Status: Needs review » Reviewed & tested by the community

Thank you! Applied the patch. The link is now displayed on the status report page and I can access the route and execute the pending tasks.

  • drunken monkey committed fab5f7c on 8.x-1.x
    Issue #2841550 by drunken monkey: Fixed execution of pending tasks.
    
drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Good to hear, thanks a lot for testing and reporting back!
Committed.

Status: Fixed » Closed (fixed)

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