diff --git a/config/default/core.entity_form_display.paragraph_row.hs_flexible_page.default.yml b/config/default/core.entity_form_display.paragraph_row.hs_flexible_page.default.yml
deleted file mode 100644
index 0992834d2..000000000
--- a/config/default/core.entity_form_display.paragraph_row.hs_flexible_page.default.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-uuid: 2690a2c4-3af9-457d-963d-52d886b8fbc1
-langcode: en
-status: true
-dependencies:
- config:
- - field.field.paragraph_row.hs_flexible_page.field_hs_flexible_components
- - field.field.paragraph_row.hs_flexible_page.field_hs_flexible_row_style
- - react_paragraphs.paragraphs_row_type.hs_flexible_page
- module:
- - paragraphs
-id: paragraph_row.hs_flexible_page.default
-targetEntityType: paragraph_row
-bundle: hs_flexible_page
-mode: default
-content:
- field_hs_flexible_components:
- type: entity_reference_paragraphs
- weight: 1
- region: content
- settings:
- title: Paragraph
- title_plural: Paragraphs
- edit_mode: open
- add_mode: dropdown
- form_display_mode: default
- default_paragraph_type: ''
- third_party_settings: { }
- field_hs_flexible_row_style:
- type: options_select
- weight: 0
- region: content
- settings: { }
- third_party_settings: { }
-hidden:
- created: true
- status: true
diff --git a/config/default/core.entity_view_display.paragraph_row.hs_flexible_page.default.yml b/config/default/core.entity_view_display.paragraph_row.hs_flexible_page.default.yml
deleted file mode 100644
index a74baadb9..000000000
--- a/config/default/core.entity_view_display.paragraph_row.hs_flexible_page.default.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-uuid: 19ed6dcb-f767-4422-baa4-c563ee134d70
-langcode: en
-status: true
-dependencies:
- config:
- - field.field.paragraph_row.hs_flexible_page.field_hs_flexible_components
- - field.field.paragraph_row.hs_flexible_page.field_hs_flexible_row_style
- - react_paragraphs.paragraphs_row_type.hs_flexible_page
- module:
- - entity_reference_revisions
-id: paragraph_row.hs_flexible_page.default
-targetEntityType: paragraph_row
-bundle: hs_flexible_page
-mode: default
-content:
- field_hs_flexible_components:
- type: entity_reference_revisions_entity_view
- label: hidden
- settings:
- view_mode: default
- link: ''
- third_party_settings: { }
- weight: 0
- region: content
-hidden:
- field_hs_flexible_row_style: true
- search_api_excerpt: true
diff --git a/config/default/core.extension.yml b/config/default/core.extension.yml
index 93bf600dd..772cc65f1 100644
--- a/config/default/core.extension.yml
+++ b/config/default/core.extension.yml
@@ -181,7 +181,6 @@ module:
preprocess_event_dispatcher: 0
publishcontent: 0
rabbit_hole: 0
- react_paragraphs: 0
readonly_field_widget: 0
real_aes: 0
redirect: 0
diff --git a/config/default/field.field.paragraph_row.hs_flexible_page.field_hs_flexible_components.yml b/config/default/field.field.paragraph_row.hs_flexible_page.field_hs_flexible_components.yml
deleted file mode 100644
index d4d57195c..000000000
--- a/config/default/field.field.paragraph_row.hs_flexible_page.field_hs_flexible_components.yml
+++ /dev/null
@@ -1,96 +0,0 @@
-uuid: a4bc3c12-8a15-45e1-9007-4fb0b2704f8f
-langcode: en
-status: true
-dependencies:
- config:
- - field.storage.paragraph_row.field_hs_flexible_components
- - paragraphs.paragraphs_type.hs_callout_box
- - paragraphs.paragraphs_type.hs_carousel
- - paragraphs.paragraphs_type.hs_clr_bnd
- - paragraphs.paragraphs_type.hs_priv_text_area
- - paragraphs.paragraphs_type.hs_row
- - react_paragraphs.paragraphs_row_type.hs_flexible_page
- module:
- - entity_reference_revisions
-id: paragraph_row.hs_flexible_page.field_hs_flexible_components
-field_name: field_hs_flexible_components
-entity_type: paragraph_row
-bundle: hs_flexible_page
-label: Components
-description: ''
-required: false
-translatable: false
-default_value: { }
-default_value_callback: ''
-settings:
- handler: 'default:paragraph'
- handler_settings:
- target_bundles:
- hs_callout_box: hs_callout_box
- hs_priv_text_area: hs_priv_text_area
- hs_row: hs_row
- hs_carousel: hs_carousel
- hs_clr_bnd: hs_clr_bnd
- negate: 1
- target_bundles_drag_drop:
- hs_accordion:
- weight: -38
- enabled: false
- hs_banner:
- weight: -32
- enabled: false
- hs_callout_box:
- weight: -37
- enabled: true
- hs_carousel:
- weight: -33
- enabled: true
- hs_clr_bnd:
- weight: 26
- enabled: true
- hs_collection:
- weight: -36
- enabled: false
- hs_gradient_hero:
- weight: -35
- enabled: false
- hs_gradient_hero_slider:
- weight: -34
- enabled: false
- hs_hero_image:
- weight: -31
- enabled: false
- hs_postcard:
- weight: -29
- enabled: false
- hs_priv_text_area:
- weight: -28
- enabled: true
- hs_row:
- weight: -27
- enabled: true
- hs_spotlight:
- weight: -26
- enabled: false
- hs_testimonial:
- weight: -25
- enabled: false
- hs_text_area:
- weight: -39
- enabled: false
- hs_timeline:
- weight: -23
- enabled: false
- hs_timeline_item:
- weight: -24
- enabled: false
- hs_view:
- weight: -22
- enabled: false
- hs_webform:
- weight: -21
- enabled: false
- stanford_gallery:
- weight: -30
- enabled: false
-field_type: entity_reference_revisions
diff --git a/config/default/field.field.paragraph_row.hs_flexible_page.field_hs_flexible_row_style.yml b/config/default/field.field.paragraph_row.hs_flexible_page.field_hs_flexible_row_style.yml
deleted file mode 100644
index 70555d12e..000000000
--- a/config/default/field.field.paragraph_row.hs_flexible_page.field_hs_flexible_row_style.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-uuid: ad697c84-407e-4662-8e3a-3759e0fb0942
-langcode: en
-status: true
-dependencies:
- config:
- - field.storage.paragraph_row.field_hs_flexible_row_style
- - react_paragraphs.paragraphs_row_type.hs_flexible_page
- module:
- - options
-id: paragraph_row.hs_flexible_page.field_hs_flexible_row_style
-field_name: field_hs_flexible_row_style
-entity_type: paragraph_row
-bundle: hs_flexible_page
-label: 'Row Style'
-description: 'Allows you to add styles to the background of the row.'
-required: false
-translatable: false
-default_value: { }
-default_value_callback: ''
-settings: { }
-field_type: list_string
diff --git a/config/default/field.storage.paragraph_row.field_hs_flexible_components.yml b/config/default/field.storage.paragraph_row.field_hs_flexible_components.yml
deleted file mode 100644
index b464fbf1e..000000000
--- a/config/default/field.storage.paragraph_row.field_hs_flexible_components.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-uuid: 7c0719b4-81f3-44e2-a86d-49057f58c395
-langcode: en
-status: true
-dependencies:
- module:
- - entity_reference_revisions
- - paragraphs
- - react_paragraphs
-id: paragraph_row.field_hs_flexible_components
-field_name: field_hs_flexible_components
-entity_type: paragraph_row
-type: entity_reference_revisions
-settings:
- target_type: paragraph
-module: entity_reference_revisions
-locked: false
-cardinality: 4
-translatable: true
-indexes: { }
-persist_with_no_fields: false
-custom_storage: false
diff --git a/config/default/field.storage.paragraph_row.field_hs_flexible_row_style.yml b/config/default/field.storage.paragraph_row.field_hs_flexible_row_style.yml
deleted file mode 100644
index 38e456795..000000000
--- a/config/default/field.storage.paragraph_row.field_hs_flexible_row_style.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-uuid: 34a1eedf-a6a5-427a-a2f1-ee64e5b0f784
-langcode: en
-status: true
-dependencies:
- module:
- - field_permissions
- - options
- - react_paragraphs
-third_party_settings:
- field_permissions:
- permission_type: custom
-id: paragraph_row.field_hs_flexible_row_style
-field_name: field_hs_flexible_row_style
-entity_type: paragraph_row
-type: list_string
-settings:
- allowed_values:
- -
- value: well
- label: 'Well Limited-width'
- -
- value: well-full-width
- label: 'Well Full-width'
- allowed_values_function: ''
-module: options
-locked: false
-cardinality: 1
-translatable: true
-indexes: { }
-persist_with_no_fields: false
-custom_storage: false
diff --git a/config/default/react_paragraphs.paragraphs_row_type.hs_flexible_page.yml b/config/default/react_paragraphs.paragraphs_row_type.hs_flexible_page.yml
deleted file mode 100644
index 4aff41048..000000000
--- a/config/default/react_paragraphs.paragraphs_row_type.hs_flexible_page.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-uuid: b7ebab4b-0196-4f18-b01a-a43b32a7f7a5
-langcode: en
-status: true
-dependencies: { }
-id: hs_flexible_page
-label: 'Flexible Page'
-description: ''
-behavior_plugins: { }
diff --git a/config/default/rest.resource.entity.paragraph_row.yml b/config/default/rest.resource.entity.paragraph_row.yml
deleted file mode 100644
index 94e3e36d3..000000000
--- a/config/default/rest.resource.entity.paragraph_row.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-uuid: 0706c02b-b198-4d4f-ad85-4f063756d452
-langcode: en
-status: true
-dependencies:
- module:
- - react_paragraphs
- - serialization
- - user
-id: entity.paragraph_row
-plugin_id: 'entity:paragraph_row'
-granularity: resource
-configuration:
- methods:
- - GET
- formats:
- - json
- authentication:
- - cookie
diff --git a/config/default/rest.resource.react_paragraphs.yml b/config/default/rest.resource.react_paragraphs.yml
deleted file mode 100644
index 3d94044f9..000000000
--- a/config/default/rest.resource.react_paragraphs.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-uuid: cef9901c-190f-451e-814a-23cd2d905a76
-langcode: en
-status: true
-dependencies:
- module:
- - react_paragraphs
- - serialization
- - user
-_core:
- default_config_hash: 8eTQ2Rt2BxewKlFZcwaE1mGx77CC2UvTg1_N6Z9ICUM
-id: react_paragraphs
-plugin_id: react_paragraphs
-granularity: method
-configuration:
- GET:
- supported_formats:
- - json
- supported_auth:
- - cookie
diff --git a/docroot/modules/humsci/hs_migrate/tests/src/Unit/Plugin/migrate/process/SubProcessTest.php b/docroot/modules/humsci/hs_migrate/tests/src/Unit/Plugin/migrate/process/SubProcessTest.php
index 47b23fbe3..86b318c90 100644
--- a/docroot/modules/humsci/hs_migrate/tests/src/Unit/Plugin/migrate/process/SubProcessTest.php
+++ b/docroot/modules/humsci/hs_migrate/tests/src/Unit/Plugin/migrate/process/SubProcessTest.php
@@ -3,6 +3,7 @@
namespace Drupal\Tests\hs_migrate\Unit\Plulgin\migrate\process;
use Drupal\hs_migrate\Plugin\migrate\process\SubProcess as HsSubProcess;
+use Drupal\migrate\MigrateException;
use Drupal\migrate\MigrateExecutable;
use Drupal\migrate\Plugin\migrate\process\SubProcess as OrigSubProcess;
use Drupal\migrate\Row;
@@ -30,8 +31,8 @@ public function testTranform() {
$value = simplexml_load_string('akey');
$new_value = $hs_plugin->transform($value, $migrate_executable, $row, 'field_foo');
- $this->assertArrayEquals(['' => []], $new_value);
- $this->expectException(\Error::class);
+ $this->assertEquals(['' => []], $new_value);
+ $this->expectException(MigrateException::class);
$original_plugin->transform($value, $migrate_executable, $row, 'field_foo');
}
diff --git a/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.post_update.php b/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.post_update.php
index cb91b8eb5..48f4d3c47 100644
--- a/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.post_update.php
+++ b/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.post_update.php
@@ -181,7 +181,8 @@ function su_humsci_profile_post_update_9200() {
$parent_type = $spotlight->get('parent_type')->getString();
$parent_id = $spotlight->get('parent_id')->getString();
- if (!$parent_type || !\Drupal::entityTypeManager()->hasDefinition($parent_type)) {
+ if (!$parent_type || !\Drupal::entityTypeManager()
+ ->hasDefinition($parent_type)) {
continue;
}
$parent = \Drupal::entityTypeManager()
@@ -243,3 +244,66 @@ function su_humsci_profile_post_update_9201() {
_su_humsci_profile_disable_paragraph('node', 'hs_basic_page', 'field_hs_page_components', 'hs_row');
_su_humsci_profile_enable_paragraph('node', 'hs_basic_page', 'field_hs_page_components', 'stanford_gallery');
}
+
+/**
+ * Delete any react pararaphs fields.
+ */
+function su_humsci_profile_post_update_9202() {
+ $react_paragraphs_fields = [];
+ foreach (FieldConfig::loadMultiple() as $field) {
+ if (
+ $field->getType() == 'entity_reference_revisions' &&
+ $field->getSetting('handler') == 'default:paragraph_row'
+ ) {
+ $react_paragraphs_fields[$field->getName()] = $field;
+ }
+ }
+ if ($react_paragraphs_fields) {
+ $paragraphs = \Drupal::entityTypeManager()
+ ->getStorage('paragraph')
+ ->loadByProperties(['parent_field_name' => array_keys($react_paragraphs_fields)]);
+ foreach ($paragraphs as $paragraph) {
+ $paragraph->delete();
+ }
+ }
+ $rows = \Drupal::entityTypeManager()
+ ->getStorage('paragraph_row')
+ ->loadMultiple();
+ foreach ($rows as $row) {
+ $row->delete();
+ }
+ foreach ($react_paragraphs_fields as $field) {
+ $field->delete();
+ }
+ $row_types = \Drupal::entityTypeManager()
+ ->getStorage('paragraphs_row_type')
+ ->loadMultiple();
+ foreach ($row_types as $row_type) {
+ $row_type->delete();
+ }
+ \Drupal::service('module_installer')->uninstall(['react_paragraphs']);
+}
+
+/**
+ * Fix reference to private files component that doesn't exist.
+ */
+function su_humsci_profile_post_update_9203() {
+ $paragraph_types = \Drupal::entityTypeManager()
+ ->getStorage('paragraphs_type')
+ ->loadMultiple();
+ foreach (FieldConfig::loadMultiple() as $field) {
+ if (
+ $field->getType() == 'entity_reference_revisions' &&
+ $field->getSetting('handler') == 'default:paragraph'
+ ) {
+ $handler_settings = $field->getSetting('handler_settings');
+ if ($missing_paragraph_types = array_diff($handler_settings['target_bundles'], array_keys($paragraph_types))) {
+ foreach ($missing_paragraph_types as $unknown_paragraph_type) {
+ unset($handler_settings['target_bundles'][$unknown_paragraph_type]);
+ unset($handler_settings['target_bundles_drag_drop'][$unknown_paragraph_type]);
+ }
+ $field->setSetting('handler_settings', $handler_settings)->save();
+ }
+ }
+ }
+}
diff --git a/patches/htaccess.patch b/patches/htaccess.patch
index 88578c901..4813d8184 100644
--- a/patches/htaccess.patch
+++ b/patches/htaccess.patch
@@ -1,5 +1,5 @@
diff --git a/docroot/.htaccess b/docroot/.htaccess
-index b1ee36bf..a2fe0fa9 100644
+index 4d19147c..80b4a625 100644
--- a/docroot/.htaccess
+++ b/docroot/.htaccess
@@ -1,3 +1,24 @@
@@ -27,7 +27,7 @@ index b1ee36bf..a2fe0fa9 100644
#
# Apache/PHP/Drupal settings:
#
-@@ -62,6 +83,54 @@ AddEncoding gzip svgz
+@@ -67,6 +88,54 @@ AddEncoding gzip svgz
RewriteEngine on
@@ -82,7 +82,7 @@ index b1ee36bf..a2fe0fa9 100644
# Set "protossl" to "s" if we were accessed via https://. This is used later
# if you enable "www." stripping or enforcement, in order to ensure that
# you don't bounce between http and https.
-@@ -139,6 +208,8 @@ AddEncoding gzip svgz
+@@ -144,6 +213,8 @@ AddEncoding gzip svgz
RewriteCond %{REQUEST_URI} !/core/[^/]*\.php$
# Allow access to test-specific PHP files:
RewriteCond %{REQUEST_URI} !/core/modules/system/tests/https?\.php
diff --git a/tests/codeception/functional/Install/Content/FlexiblePageCest.php b/tests/codeception/functional/Install/Content/FlexiblePageCest.php
index e5c1d548c..20e636470 100644
--- a/tests/codeception/functional/Install/Content/FlexiblePageCest.php
+++ b/tests/codeception/functional/Install/Content/FlexiblePageCest.php
@@ -33,7 +33,7 @@ public function testHeroParagraph(FunctionalTester $I) {
$I->waitForText('Add or select media');
$I->dropFileInDropzone(dirname(__FILE__, 3) . '/logo.jpg');
$I->click('Upload and Continue');
- $I->waitForText('Alternative text');
+ $I->waitForText('Decorative Image');
$I->click('Save and insert', '.ui-dialog-buttonset');
$I->waitForText('The maximum number of media items have been selected');
$I->click('.paragraph-type--hs-hero-image summary');
@@ -75,7 +75,7 @@ public function testPhotoAlbum(FunctionalTester $I) {
$I->waitForText('Add or select media');
$I->dropFileInDropzone(dirname(__FILE__, 3) . '/logo.jpg');
$I->click('Upload and Continue');
- $I->waitForText('Alternative text');
+ $I->waitForText('Decorative Image');
$I->click('Save and insert', '.ui-dialog-buttonset');
$I->waitForElementVisible('.media-library-item__preview img');
$I->click('Save');
diff --git a/tests/codeception/functional/MediaCest.php b/tests/codeception/functional/MediaCest.php
index 15f5a4688..594b8f55e 100644
--- a/tests/codeception/functional/MediaCest.php
+++ b/tests/codeception/functional/MediaCest.php
@@ -45,6 +45,7 @@ public function testImages(FunctionalTester $I) {
$I->dropFileInDropzone(__DIR__ . '/logo.jpg');
$I->click('Upload');
$I->fillField('Name', 'Logo File');
+ $I->uncheckOption('Decorative Image');
$I->fillField('Alternative text', 'Stanford Logo');
$I->click('Save');
$I->canSee('Saved 1 Media Items');