Closed Joobs closed 2 years ago
I was trying to flush/update the index via the command line.
The .env
variable for the Admin API key isn't working with this method, I had to hard code it. However, the Application ID works as a .env
variable. So I'm not sure why variable works and the other doesn't.
I ended up flushing and rebuilding the indexes through the Utilities section.
Hey @Joobs That's strange, as the Utility will just use the same config and thus the same variables as the command line interface.
Are your logs showing anything when you try to save the settings?
The settings for the key fields are all environment variable aware, I use environment variables for all three in my Scout config.
'application_id' => '$ALGOLIA_APPLICATION_ID',
'admin_api_key' => '$ALGOLIA_ADMIN_API_KEY',
'search_api_key' => '$ALGOLIA_SEARCH_API_KEY'
Which works OK, there is no reason why the admin key shouldn't work as an env var, as it's being put through parseEnv. You're not missing the $ sign before the environment name or happen to have typo with the environment name at all?
Closing this for now, feel free to re-open if the issue is still happening and is scout related.
I'm not sure why but Scout stopped pulling in the .env variables. I thought it might be a caching issue so I went to the plugin settings page and went to save and it tells me "unable to save plugin settings"
It was working before, and i've not changed anything regarding Scout.
Not sure how I can diagnose the issue?
Craft: 3.7.44 Scout: 2.7.2