when I have a view linked to an index, if I revert the index, I get the message:
[warning] The following views were using the index es_node_index: search_es. You should disable or delete them.

This message should be displayed only if the index is deleted.
in fact, while reverting the index, the process execute the same code, so a test should be added to prevent this message

A revert flag is already set by the hook search_api_search_api_index_delete().
So my solution is to be sure that the hook search_api_views_search_api_index_delete() is called after the previous one.

Then this hook should test the revert flag before checking the index.

Comments

Fabien.Godineau created an issue. See original summary.

Fabien.Godineau’s picture

Status: Active » Needs review
StatusFileSize
new1.39 KB
drunken monkey’s picture

StatusFileSize
new693 bytes

The check is just a single method call, I don't think avoiding to do that twice is really worth mucking around with hook_module_implements_alter().

Fabien.Godineau’s picture

I agree with you. It is simpler.
Thank you

drunken monkey’s picture

Status: Needs review » Fixed

Good to hear, thanks for the feedback!
Committed.

Status: Fixed » Closed (fixed)

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