Searchstax config page does not behave as expected when overridden by settings

Created on 6 June 2025, 3 months ago

Problem/Motivation

Per storing-private-information-file-system, the key and endpoint should most likely be stored in secrets or nobackup directory. Regardless of which solution you choose, you still need to override in your settings.php.

Steps to reproduce

Per the docs,

* create /mnt/gfs/[sitename].[env]/nobackup dir
* create api_key.php file
* update with keys

<?php

// Set SearchStax config values
putenv('SEARCHSTAX_UPDATE_ENDPOINT=https://searchcloud-****');
putenv('SEARCHSTAX_UPDATE_TOKEN=1234');

* update settings.php

// Get acquia secrets.
if (file_exists('../acquia-files/nobackup/api_keys.php')) {
  require '../acquia-files/nobackup/api_keys.php';
}

$config['search_api.server.searchstax']['backend_config']['connector_config']['update_endpoint'] = getenv('SEARCHSTAX_UPDATE_ENDPOINT');
$config['search_api.server.searchstax']['backend_config']['connector_config']['update_token'] = getenv('SEARCHSTAX_UPDATE_TOKEN');

I have confirmed that the config by running `drush cget search_api.server.searchstax backend_config.connector_config --include-overridden`.

However, the form, which has ajax, does not behave like is being overridden and I can submit data from the UI which updates active config.

Proposed resolution

Make the searchstax config form behave like other forms when they are overridden. Here is an example of the performance page when it is overridden

🐛 Bug report
Status

Active

Version

1.7

Component

General code

Created by

🇺🇸United States robpowell Boston

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024