Skip to content

Commit

Permalink
Merge branch 'internal/behat-mail-spool-debug' into feature/3232848-r…
Browse files Browse the repository at this point in the history
…eplace-swift-mailer
  • Loading branch information
Robert Ragas committed Aug 23, 2023
2 parents 16ee80b + 2d6bccb commit 03f4088
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,11 @@ jobs:
mv html/profiles/contrib/social/tests/behat/logs/* $OUTPUT_FOLDER/
fi
# Move files from the mail spool to the output folder if they exist
if (shopt -s nullglob; f=(html/profiles/contrib/social/tests/behat/mail-spool/*); ((${#f[@]}))); then
mv html/profiles/contrib/social/tests/behat/mail-spool/* $OUTPUT_FOLDER/
fi
# Dump the database with the state of the test failure to allow for
# local inspection.
drush sql-dump > $OUTPUT_FOLDER/at-test-failure.sql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ processor_settings:
ignorecase:
all_fields: true
fields:
- language_with_fallback
- field_group_description
- field_group_location
- field_profile_first_name
Expand Down Expand Up @@ -332,6 +333,7 @@ processor_settings:
transliteration:
all_fields: true
fields:
- language_with_fallback
- field_group_description
- field_group_location
- field_profile_first_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,13 @@ display:
link_to_item: false
multi_separator: ', '
filters:
language_with_fallback:
id: language_with_fallback
search_api_language:
id: search_api_language
table: search_api_index_social_all
field: language_with_fallback
relationship: none
group_type: group
admin_label: ''
plugin_id: search_api_language
operator: in
value:
'***LANGUAGE_language_interface***': '***LANGUAGE_language_interface***'
Expand Down Expand Up @@ -193,6 +192,7 @@ display:
default_group: All
default_group_multiple: { }
group_items: { }
plugin_id: search_api_language
sorts:
search_api_relevance:
id: search_api_relevance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,13 @@ display:
min: ''
max: ''
plugin_id: search_api_date
language_with_fallback:
id: language_with_fallback
search_api_language:
id: search_api_language
table: search_api_index_social_content
field: language_with_fallback
relationship: none
group_type: group
admin_label: ''
plugin_id: search_api_language
operator: in
value:
'***LANGUAGE_language_interface***': '***LANGUAGE_language_interface***'
Expand All @@ -300,7 +299,7 @@ display:
use_operator: false
operator: ''
operator_limit_selection: false
operator_list: { }
operator_list: { }
identifier: ''
required: false
remember: false
Expand All @@ -318,8 +317,9 @@ display:
multiple: false
remember: false
default_group: All
default_group_multiple: { }
group_items: { }
default_group_multiple: { }
group_items: { }
plugin_id: search_api_language
sorts:
search_api_relevance:
id: search_api_relevance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,13 @@ display:
group_items: { }
reduce_duplicates: false
plugin_id: search_api_options
language_with_fallback:
id: language_with_fallback
search_api_language:
id: search_api_language
table: search_api_index_social_groups
field: language_with_fallback
relationship: none
group_type: group
admin_label: ''
plugin_id: search_api_language
operator: in
value:
'***LANGUAGE_language_interface***': '***LANGUAGE_language_interface***'
Expand All @@ -192,7 +191,7 @@ display:
use_operator: false
operator: ''
operator_limit_selection: false
operator_list: { }
operator_list: { }
identifier: ''
required: false
remember: false
Expand All @@ -210,8 +209,9 @@ display:
multiple: false
remember: false
default_group: All
default_group_multiple: { }
group_items: { }
default_group_multiple: { }
group_items: { }
plugin_id: search_api_language
sorts:
search_api_relevance:
id: search_api_relevance
Expand Down
32 changes: 32 additions & 0 deletions modules/social_features/social_search/social_search.install
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,35 @@ function social_search_update_11402(): string {
// Output logged messages to related channel of update execution.
return $updateHelper->logger()->output();
}

/**
* Revert search_api_language filter name/id change.
*/
function social_search_update_11403() : void {
// In social_search_update_11402
// (https://github.com/goalgorilla/open_social/pull/3470/) we changed the
// search_api_language filter to a language_with_fallback filter to ensure
// that users could find matching content in different languages if no version
// in their own language was available. However, this also changed the IDs of
// the filter which can break existing sites that might rely on that filter.
// Below we go through the views and change the filter back to the ID it had,
// just with the new field added to the index.
$views = [
"views.view.search_all",
"views.view.search_content",
"views.view.search_group",
];

foreach ($views as $view) {
$config = \Drupal::configFactory()->getEditable($view);
$display = $config->get("display");

$filter = $display['default']['display_options']['filters']['language_with_fallback'];
$filter['id'] = "search_api_language";
$display['default']['display_options']['filters']["search_api_language"] = $filter;
unset($display['default']['display_options']['filters']['language_with_fallback']);

$config->set('display', $display);
$config->save(TRUE);
}
}

0 comments on commit 03f4088

Please sign in to comment.