With verbose error output, it is not possible to change view cacheability settings because of PHP Notice:

Notice: Undefined index: title in .../core/modules/views/src/Views.php on line 153

This happens because `search_api_views_plugins_cache_alter()` doesn't set the title for 'base' plugin (and there is no annotated class that declares plugin with this ID)

  $plugins['search_api']['base'] = $bases;

Suggested solution

Set the title in the hook

Remaining tasks

- Write the patch (will be submitted in the first comment)
- This issue may need follow up - why this hook is needed at all, if it mentions non-existing cache plugin?

Comments

valthebald created an issue. See original summary.

valthebald’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new396 bytes
drunken monkey’s picture

StatusFileSize
new483 bytes

Thanks for reporting this!
The reason is quite simple: When we added the hook, we only had the one cache plugin. Apparently, we forgot to update it when we split the plugin into two.

borisson_’s picture

Status: Needs review » Reviewed & tested by the community

Yep, looks good.

  • drunken monkey committed c319238 on 8.x-1.x
    Issue #2989689 by drunken monkey, valthebald, borisson_: Fixed bug in...
drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Good to hear, thanks for reviewing!
Committed.

Status: Fixed » Closed (fixed)

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