In looking at the usasearch module and it's configuration options I see the "Drawer Handle" and "i14y API Secret Token" fields which are only useful if the usasearch_api module is enabled. I also see in usasearch_form_node_type_form_alter() and usasearch_form_node_form_alter() additions of checkboxes to include node types and individual nodes in the search index, though that setting isn't used unless the usasearch_api module is installed. Could we get the UI options moved to the usasearch_api module

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jrglasgow created an issue. See original summary.

schiavone’s picture

Category: Bug report » Task

Agree the code can be better organized but I wouldn't call this a bug. Code organization is taking place during the port to Drupal 8. Co re-organization might be included in future releases of 7.x-5.x branch if they can be made without affecting the current installed base.

brockfanning’s picture

Status: Active » Needs review
FileSize
7.24 KB

Here is an attempt at this, which is along similar lines as the D8 version, where there is an "i14y_enabled" variable. This also allows dev/staging sites to have $conf['usasearch_i14y_enabled'] = FALSE; in the settings.php file to prevent accidental indexing of non-production content.

brockfanning’s picture

Tweak to have it default to enabled, so existing behavior won't change.

brockfanning’s picture

Status: Needs review » Active

Looking back on this, my patch wasn't really doing what the original request described: moving the i14y configuration into the usasearch_api module (which I do agree is a good idea). I'll move my stuff into a separate ticket.