API Key getting removed on 1.3 to 1.4 update
This has happened to me on several test sites and two live sites recently.
All of them are running Drupal 7 and PHP 7.2.
When upgrading to version 1.4 from 1.3 (either through the UI or getting a more recent version here with some bug fixes) after running the DB updater the extension stops working and the configuration page becomes unreachable (PHP error on a white screen) with the following error:
Civi\Crypto\Exception\CryptoException: Cannot decrypt token. Invalid format.
Sorry I didn't save a screenshot. If I upgrade a test site again I will add it here.
Further digging of log messages leads me to think the API key is getting deleted at some point.
The only fix I have found so far is to
- Downgrade back to 1.3 (Overwrite new files with the old 1.3 files)
- Access the configuration page
- Re-enter and save the Sparkpost API key
- Re-upgrade (Overwrite the 1.3 files)
Then it seems to all work fine again.
Re-entering the API key isn't such a worry but not being able to access the extension configuration page to do it was a real headache to get around.