When updating facets from an older version (~alpha4), I get this error when running update hook 8001:
'facets_facet_source' entity with ID 'search_api_views__indexed_articles__search_articles' already exists.
It seems the facets_update_8001() is not idempotent. It assumes that the existing facet sources need to be upgraded without actually examining them to ensure that's the case, so if they already match the new format for same reason the update hook will fail.
While this is pretty clearly the proximal cause of the error, I have no idea what the root cause is, i.e. why our facet sources already seem to be updated.
Comment | File | Size | Author |
---|---|---|---|
#2 | facets-2880948-2.patch | 859 bytes | Dane Powell |
Comments
Comment #2
Dane Powell CreditAttribution: Dane Powell at Acquia commentedThis fixes the immediate error by simply checking if the target facet source already exists before attempting to create it. Like I mentioned earlier, I have no idea how this condition might arise or what other bugs this might cover up or create.
Comment #3
borisson_Looks good
Comment #4
capynet CreditAttribution: capynet commented#2 patch worked for me.
Comment #6
borisson_Committed, thanks!