Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Testing/reference search listing #67

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8ad0527
Merge changes from develop.
sdpdeploy Dec 28, 2022
9b559b1
Merge changes from develop.
sdpdeploy Jan 12, 2023
e10f127
Merge changes from develop.
sdpdeploy Mar 14, 2023
fb8788a
Merge changes from develop.
sdpdeploy May 2, 2023
f6452fb
Merge changes from develop.
sdpdeploy May 9, 2023
c180d28
Merge changes from develop.
sdpdeploy May 23, 2023
1aea1aa
Merge changes from develop.
sdpdeploy Jun 1, 2023
01a18f4
Merge changes from develop.
sdpdeploy Jun 26, 2023
6a66380
Merge changes from develop.
sdpdeploy Jun 28, 2023
ecd1113
Merge changes from develop.
sdpdeploy Aug 10, 2023
1a0c514
Merge changes from develop.
sdpdeploy Aug 11, 2023
de3c05c
Merge changes from develop.
sdpdeploy Aug 11, 2023
18da624
Merge changes from develop.
sdpdeploy Aug 25, 2023
f1cd3b1
Merge changes from develop.
sdpdeploy Aug 27, 2023
f9b9182
Merge changes from develop.
sdpdeploy Sep 25, 2023
9f412ca
Merge changes from develop.
sdpdeploy Sep 25, 2023
92d1762
Merge changes from develop.
sdpdeploy Oct 1, 2023
e8568b0
Merge changes from develop.
sdpdeploy Nov 17, 2023
3fd2860
Merge changes from develop.
sdpdeploy Nov 30, 2023
7cfa4c7
Merge changes from develop.
sdpdeploy Dec 5, 2023
78d1a89
Merge changes from develop.
sdpdeploy Dec 7, 2023
34de7a2
Merge changes from develop.
sdpdeploy Jan 10, 2024
50f1615
Merge changes from develop.
sdpdeploy Jan 25, 2024
01a565e
added files
yeniatencio Feb 2, 2024
ec1b141
added files
yeniatencio Feb 2, 2024
35b3259
fixed typo
yeniatencio Feb 2, 2024
c4a0990
added field to operation
yeniatencio Feb 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"description": "Search configuration for Tide Drupal 10 distribution",
"extra": {
"drush": {
"services": {
"drush.services.yml": "^10"
}
},
"patches": {
"drupal/search_api": {
"Provide drush support to index a specific entity - https://www.drupal.org/project/search_api/issues/3016809": "https://www.drupal.org/files/issues/2020-02-08/search_api-index-specific-items-3016809-09.patch"
"drupal/data_pipelines": {
"CSV data header row whitespace needs to be cleaned up - https://drupal.org/project/data_pipelines/issues/3391214": "https://www.drupal.org/files/issues/2023-10-03/trim-whitespace-from-csv-header-names-3391214-2.patch"
},
"drupal/key": {
"KeyProviderInterface::getKeyValue() doesn't always return a string - https://www.drupal.org/project/key/issues/3356052#comment-15030602": "https://git.drupalcode.org/project/key/-/merge_requests/11/diffs.patch",
"Deprecated Function: strlen(): Passing null to parameter #1 ($string) - https://www.drupal.org/project/key/issues/3323238": "https://www.drupal.org/files/issues/2023-02-01/3323238-6.patch",
"Error: Call to a member function getKeyValue on null - https://www.drupal.org/project/key/issues/3385523": "https://www.drupal.org/files/issues/2023-09-06/3385523-4.patch"
"Error: Call to a member function getKeyValue on null - https://www.drupal.org/project/key/issues/3385523": "https://www.drupal.org/files/issues/2023-09-06/3385523-4.patch",
"KeyProviderInterface::getKeyValue() doesn't always return a string - https://www.drupal.org/project/key/issues/3356052#comment-15030602": "https://git.drupalcode.org/project/key/-/merge_requests/11/diffs.patch"
},
"drupal/data_pipelines": {
"CSV data header row whitespace needs to be cleaned up - https://drupal.org/project/data_pipelines/issues/3391214": "https://www.drupal.org/files/issues/2023-10-03/trim-whitespace-from-csv-header-names-3391214-2.patch"
}
},
"drush": {
"services": {
"drush.services.yml": "^10"
"drupal/search_api": {
"Provide drush support to index a specific entity - https://www.drupal.org/project/search_api/issues/3016809": "https://www.drupal.org/files/issues/2020-02-08/search_api-index-specific-items-3016809-09.patch"
}
}
},
Expand All @@ -29,13 +29,13 @@
}
},
"require": {
"dpc-sdp/tide_core": "^4.0.0",
"dpc-sdp/tide_landing_page": "^4.0.0",
"drupal/elasticsearch_connector": "^7.0",
"drupal/search_api": "^1.11",
"dpc-sdp/tide_core": "dev-reference",
"dpc-sdp/tide_landing_page": "dev-reference",
"drupal/data_pipelines": "1.0.0-alpha22",
"drupal/data_pipelines_elasticsearch": "^1.0@alpha",
"drupal/key": "^1.17"
"drupal/elasticsearch_connector": "^7.0",
"drupal/key": "^1.17",
"drupal/search_api": "^1.11"
},
"type": "drupal-module"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ langcode: en
status: true
dependencies:
config:
- field.field.node.tide_search_listing.field_above_results_content
- field.field.node.tide_search_listing.field_below_results_content
- field.field.node.tide_search_listing.field_custom_sort_configuration
- field.field.node.tide_search_listing.field_featured_image
Expand Down Expand Up @@ -146,6 +147,14 @@ content:
region: content
settings: { }
third_party_settings: { }
field_above_results_content:
type: text_textarea
weight: 6
region: content
settings:
rows: 5
placeholder: ''
third_party_settings: { }
field_below_results_content:
type: text_textarea
weight: 8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ langcode: en
status: true
dependencies:
config:
- field.field.node.tide_search_listing.field_above_results_content
- field.field.node.tide_search_listing.field_below_results_content
- field.field.node.tide_search_listing.field_custom_sort_configuration
- field.field.node.tide_search_listing.field_featured_image
Expand Down Expand Up @@ -41,6 +42,13 @@ content:
third_party_settings: { }
weight: -20
region: content
field_above_results_content:
type: text_default
label: above
settings: { }
third_party_settings: { }
weight: 16
region: content
field_below_results_content:
type: text_default
label: above
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ status: true
dependencies:
config:
- core.entity_view_mode.node.teaser
- field.field.node.tide_search_listing.field_above_results_content
- field.field.node.tide_search_listing.field_below_results_content
- field.field.node.tide_search_listing.field_custom_sort_configuration
- field.field.node.tide_search_listing.field_featured_image
Expand Down Expand Up @@ -45,6 +46,7 @@ content:
weight: 100
region: content
hidden:
field_above_results_content: true
field_below_results_content: true
field_custom_sort_configuration: true
field_featured_image: true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
uuid: ff5fcd98-93ee-4e69-9904-8e6801816587
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_above_results_content
- node.type.tide_search_listing
module:
- allowed_formats
- text
third_party_settings:
allowed_formats:
allowed_formats: { }
id: node.tide_search_listing.field_above_results_content
field_name: field_above_results_content
entity_type: node
bundle: tide_search_listing
label: 'Above results content'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: text_long
23 changes: 23 additions & 0 deletions config/optional/field.storage.node.field_above_results_content.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
uuid: 682991f1-5030-404e-877c-481f187932a2
langcode: en
status: true
dependencies:
module:
- field_permissions
- node
- text
third_party_settings:
field_permissions:
permission_type: public
id: node.field_above_results_content
field_name: field_above_results_content
entity_type: node
type: text_long
settings: { }
module: text
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
2 changes: 2 additions & 0 deletions src/TideSearchOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public function createSearchListingContentType(array $config_location) {
'field.storage.node.field_listing_results_config' => 'field_storage_config',
'field.storage.node.field_layout_component' => 'field_storage_config',
'field.storage.node.field_results_component' => 'field_storage_config',
'field.storage.node.field_above_results_content' => 'field_storage_config',
'field.storage.node.field_below_results_content' => 'field_storage_config',
'field.storage.node.field_custom_sort_configuration' => 'field_storage_config',
'field.field.node.tide_search_listing.field_featured_image' => 'field_config',
Expand All @@ -96,6 +97,7 @@ public function createSearchListingContentType(array $config_location) {
'field.field.node.tide_search_listing.field_listing_results_config' => 'field_config',
'field.field.node.tide_search_listing.field_layout_component' => 'field_config',
'field.field.node.tide_search_listing.field_results_component' => 'field_config',
'field.field.node.tide_search_listing.field_above_results_content' => 'field_config',
'field.field.node.tide_search_listing.field_below_results_content' => 'field_config',
'field.field.node.tide_search_listing.field_custom_sort_configuration' => 'field_config',
'core.entity_form_display.paragraph.search_listing_header_component.default' => 'entity_form_display',
Expand Down
34 changes: 34 additions & 0 deletions tide_search.install
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,37 @@ function tide_search_update_10001() {
$module_installer->install(['tide_data_pipeline']);
}
}

/**
* Adds field_above_results_content field to search api, and updates settings.
*/
function tide_search_update_10002() {
$config_factory = \Drupal::configFactory();
$config = $config_factory->getEditable('search_api.index.node');
$dependencies = $config->get('dependencies.config');
if (!in_array('field.storage.node.field_above_results_content', $dependencies)) {
$dependencies[] = 'field.storage.node.field_above_results_content';
$config->set('dependencies.config', $dependencies);
}
$field_settings = $config->get('field_settings');
if (!isset($field_settings['field_above_results_content'])) {
$field_settings['field_above_results_content'] = [
'label' => 'Above results content',
'datasource_id' => 'entity:node',
'property_path' => 'field_above_results_content',
'type' => 'text',
'dependencies' => [
'config' => [
'field.storage.node.field_above_results_content',
],
],
];
$config->set('field_settings', $field_settings);
}
$processor_settings = $config->get('processor_settings.html_filter.fields');
if (!in_array('field_above_results_content', $processor_settings)) {
$processor_settings[] = 'field_above_results_content';
$config->set('processor_settings.html_filter.fields', $processor_settings);
}
$config->save();
}
Loading