Skip to content

Instantly share code, notes, and snippets.

View behat-mail-login.patch
diff --git a/../vendor/drupal/drupal-extension/src/Drupal/DrupalExtension/Context/RawDrupalContext.php b/../vendor/drupal/drupal-extension/src/Drupal/DrupalExtension/Context/RawDrupalContext.php
index d0ab556..a5362b9 100644
--- a/../vendor/drupal/drupal-extension/src/Drupal/DrupalExtension/Context/RawDrupalContext.php
+++ b/../vendor/drupal/drupal-extension/src/Drupal/DrupalExtension/Context/RawDrupalContext.php
@@ -474,7 +474,7 @@ public function login() {
$this->getSession()->visit($this->locatePath('/user'));
$element = $this->getSession()->getPage();
- $element->fillField($this->getDrupalText('username_field'), $this->user->name);
+ $element->fillField($this->getDrupalText('username_field'), $this->user->mail);
View WFM-187-selective-cache-flush.patch
diff --git a/core/includes/common.inc b/core/includes/common.inc
index 323a666..68795e3 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -1085,7 +1085,25 @@ function drupal_flush_all_caches() {
// sufficient, since new extensions cannot have any primed caches yet.
$module_handler->invokeAll('cache_flush');
foreach (Cache::getBins() as $service_id => $cache_backend) {
- $cache_backend->deleteAll();
+ // Do not delete flysystem data cache.
View salesforce_pull_override_updated_date.patch
diff --git a/modules/salesforce_pull/salesforce_pull.module b/salesforce/modules/salesforce_pull/salesforce_pull.module
index f8af62b..1e06ffa 100644
--- a/modules/salesforce_pull/salesforce_pull.module
+++ b/modules/salesforce_pull/salesforce_pull.module
@@ -334,7 +334,8 @@ function salesforce_pull_process_records($sf_object) {
$entity_updated = isset($entity->updated) ? $entity->updated : $mapping_object->entity_updated;
$sf_object_updated = strtotime($sf_object['LastModifiedDate']);
- if ($sf_object_updated > $entity_updated) {
+ $allow_all_pull_updates = variable_get('gghh_salesforce_allow_all_pull_updates', 0);
View remove_file_field_description_help.patch
diff --git a/docroot/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php b/docroot/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
index b2386b4..32d4956 100644
--- a/docroot/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
+++ b/docroot/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
@@ -397,7 +397,6 @@ public static function process($element, FormStateInterface $form_state, $form)
'#title' => t('Description'),
'#value' => isset($item['description']) ? $item['description'] : '',
'#maxlength' => $config->get('description.length'),
- '#description' => t('The description may be used as the label of the link to the file.'),
);
View gist:7d27a8a545927b62101dede04c686790
diff --git a/docroot/modules/contrib/field_collection/src/FieldCollectionItemAccessControlHandler.php b/docroot/modules/contrib/field_collection/src/FieldCollectionItemAccessControlHandler.php
index 4c79e3d..41339d8 100644
--- a/docroot/modules/contrib/field_collection/src/FieldCollectionItemAccessControlHandler.php
+++ b/docroot/modules/contrib/field_collection/src/FieldCollectionItemAccessControlHandler.php
@@ -23,9 +23,13 @@ protected function checkAccess(EntityInterface $entity, $operation, AccountInter
}
// Here we will be if host entity was not set and entity is not new.
elseif (!$entity->isNew()) {
+ // Applications that were migrated throw errors on first save though
+ // the ui. This is a temporary work around for that.
@sheise
sheise / gist:091f6cf9b2deb7b21c8c7c7eca81a7b4
Created March 10, 2017 16:01
ACF-323: workaround for admin errors on new field collection creation
View gist:091f6cf9b2deb7b21c8c7c7eca81a7b4
diff --git a/src/Entity/FieldCollectionItem.php b/src/Entity/FieldCollectionItem.php
index b3f7279..33f64ca 100644
--- a/src/Entity/FieldCollectionItem.php
+++ b/src/Entity/FieldCollectionItem.php
@@ -329,6 +329,13 @@ public function getHostRevisionId() {
$query->range(0, 1);
$result = $query->execute()->fetch();
+ // This is a workaround because when admins create applications
+ // on new hosts, code will get here and find no host causing errors.