Skip to content

Commit

Permalink
Merge pull request #719 from yalesites-org/v150
Browse files Browse the repository at this point in the history
Release v1.5.0
  • Loading branch information
vinmassaro authored Aug 14, 2024
2 parents 615342a + 1b77a86 commit d81c402
Show file tree
Hide file tree
Showing 31 changed files with 684 additions and 102 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From f046b109bdaa308f3063980026c0b63227469012 Mon Sep 17 00:00:00 2001
From: David Blankenship <[email protected]>
Date: Mon, 29 Jul 2024 11:15:16 -0400
Subject: [PATCH] apply saved

---
.../layout_builder/src/Form/ConfigureBlockFormBase.php | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/core/modules/layout_builder/src/Form/ConfigureBlockFormBase.php b/core/modules/layout_builder/src/Form/ConfigureBlockFormBase.php
index 8dd6333269..16b0a8cd70 100644
--- a/core/modules/layout_builder/src/Form/ConfigureBlockFormBase.php
+++ b/core/modules/layout_builder/src/Form/ConfigureBlockFormBase.php
@@ -365,7 +365,15 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
$block_content = $form['settings']['block_form']['#block'];
$block_content->setReusable();
$block_content->setInfo($block_info);
- $block_content->save();
+ $saved = $block_content->save();
+
+ // If it didn't save, it's probably because we're using the same cloned
+ // item somewhere else with different revisions. So, we'll create a new
+ // block_content item to make sure it's fresh and won't interfere.
+ if (!$saved) {
+ $block_content = $block_content->createDuplicate();
+ $block_content->save();
+ }

$block_label_display = $form_state->getValue('settings')['label_display'];
$this->block = $this->blockManager->createInstance('block_content:' . $block_content->uuid(), [
--
2.45.2

64 changes: 0 additions & 64 deletions patches/smart_date/107.patch

This file was deleted.

10 changes: 5 additions & 5 deletions web/profiles/custom/yalesites_profile/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"drupal/selective_better_exposed_filters": "3.0.2",
"drupal/simple_sitemap": "4.1.6",
"drupal/single_content_sync": "1.4.4",
"drupal/smart_date": "4.0.3",
"drupal/smart_date": "4.1.4",
"drupal/twig_tweak": "3.2.1",
"drupal/typogrify": "1.2",
"drupal/upgrade_status": "4.0.0",
Expand All @@ -105,8 +105,8 @@
"jjj/chosen": "2.2.1",
"laminas/laminas-escaper": "2.12",
"northernco/ckeditor5-anchor-drupal": "0.4.0",
"yalesites-org/ai_engine": "1.2.2",
"yalesites-org/atomic": "1.33.0",
"yalesites-org/ai_engine": "1.2.3",
"yalesites-org/atomic": "1.34.1",
"yalesites-org/yale_cas": "1.0.4"
},
"minimum-stability": "dev",
Expand All @@ -127,6 +127,7 @@
"drupal/core": {
"plural results summary https://www.drupal.org/project/drupal/issues/2888320": "https://www.drupal.org/files/issues/2021-12-15/2888320-78.patch",
"Add reusable option to inline block creation https://www.drupal.org/project/drupal/issues/2999491": "https://git.drupalcode.org/issue/drupal-2999491/-/commit/1330eff91b1234979cf697a66a48e34eb116b441.patch",
"Update \"Add reusable option to inline block creation\" patch with local changes to save block if it didn't save": "patches/layout_builder/1330eff91b1234979cf697a66a48e34eb116b441-1.patch",
"Prevent empty block_content info fields from causing php deprecation notices": "https://www.drupal.org/files/issues/2023-07-21/3340159-empty-block-label_0.patch"
},
"drupal/entity_redirect": {
Expand Down Expand Up @@ -164,8 +165,7 @@
"Add grouping of reusable blocks (3409153) and add fallback images (3408935) - can't use both patches from d.o would cause merge conflict, combined patch": "patches/layout_builder_browser/3408935-and-3409153-8.patch"
},
"drupal/smart_date": {
"Fix deprecation:": "https://git.drupalcode.org/project/smart_date/-/merge_requests/63.diff",
"Warning: Trying to access array offset on value of type null https://www.drupal.org/project/smart_date/issues/3354858": "patches/smart_date/107.patch"
"Fix deprecation:": "https://git.drupalcode.org/project/smart_date/-/merge_requests/63.diff"
},
"drupal/migrate_plus": {
"Allow callback for Url source, and single item Json plugin https://www.drupal.org/project/migrate_plus/issues/3040427": "https://www.drupal.org/files/issues/2023-02-15/3040427-42-migrate_plus_multiple_urls.patch"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
uuid: b692caf5-825e-4c39-b6d7-762778de4b6d
langcode: en
status: true
dependencies:
module:
- entity_redirect
third_party_settings:
entity_redirect:
redirect:
add:
active: 0
destination: default
url: ''
external: ''
edit:
active: 0
destination: default
url: ''
external: ''
delete:
active: 0
destination: default
url: ''
external: ''
anonymous:
active: 0
destination: default
url: ''
external: ''
id: inline_message
label: 'In-Line Message'
revision: 0
description: 'Add a non-dismissible message box in your content to draw attention to important information or warnings.'
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
uuid: d9afb06f-c30e-42f6-a92c-4a4978070a45
langcode: en
status: true
dependencies:
config:
- block_content.type.inline_message
- field.field.block_content.inline_message.field_heading
- field.field.block_content.inline_message.field_link
- field.field.block_content.inline_message.field_style_color
- field.field.block_content.inline_message.field_text
module:
- allowed_formats
- hide_revision_field
- linkit
- maxlength
- text
id: block_content.inline_message.default
targetEntityType: block_content
bundle: inline_message
mode: default
content:
field_heading:
type: text_textfield
weight: 2
region: content
settings:
size: 60
placeholder: ''
third_party_settings:
allowed_formats:
hide_help: '1'
hide_guidelines: '1'
maxlength:
maxlength_js: 50
maxlength_js_label: 'Content recommended length set to @limit characters, remaining: <strong>@remaining</strong>'
maxlength_js_enforce: false
field_link:
type: linkit
weight: 6
region: content
settings:
placeholder_url: ''
placeholder_title: ''
linkit_profile: default
linkit_auto_link_text: false
third_party_settings:
maxlength:
maxlength_js: null
maxlength_js_label: 'Content limited to @limit characters, remaining: <strong>@remaining</strong>'
maxlength_js_enforce: false
field_style_color:
type: options_select
weight: 3
region: content
settings: { }
third_party_settings: { }
field_text:
type: text_textarea
weight: 4
region: content
settings:
rows: 5
placeholder: ''
third_party_settings:
allowed_formats:
hide_help: '1'
hide_guidelines: '1'
maxlength:
maxlength_js: 500
maxlength_js_label: 'Content limited to @limit characters, remaining: <strong>@remaining</strong>'
maxlength_js_enforce: true
info:
type: string_textfield
weight: -5
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
revision_log:
type: hide_revision_field_log_widget
weight: 80
region: content
settings:
rows: 5
placeholder: ''
show: true
default: ''
permission_based: false
allow_user_settings: true
third_party_settings: { }
hidden: { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
uuid: 69ecb1b1-12f7-4a55-b10e-1cbd689243f2
langcode: en
status: true
dependencies:
config:
- block_content.type.inline_message
- field.field.block_content.inline_message.field_heading
- field.field.block_content.inline_message.field_link
- field.field.block_content.inline_message.field_style_color
- field.field.block_content.inline_message.field_text
module:
- link
- options
- text
id: block_content.inline_message.default
targetEntityType: block_content
bundle: inline_message
mode: default
content:
field_heading:
type: text_default
label: hidden
settings: { }
third_party_settings: { }
weight: 0
region: content
field_link:
type: link_separate
label: hidden
settings:
trim_length: null
url_only: false
url_plain: false
rel: '0'
target: '0'
third_party_settings: { }
weight: 4
region: content
field_style_color:
type: list_key
label: hidden
settings: { }
third_party_settings: { }
weight: 1
region: content
field_text:
type: text_default
label: hidden
settings: { }
third_party_settings: { }
weight: 3
region: content
hidden:
search_api_excerpt: true
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ settings:
- heading
- '|'
- link
- subscript
- superscript
- '|'
- anchor
- '|'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
uuid: e0182b01-e1be-4396-be2b-573e171a1c45
langcode: en
status: true
dependencies:
config:
- block_content.type.inline_message
- field.storage.block_content.field_heading
- filter.format.heading_html
module:
- text
id: block_content.inline_message.field_heading
field_name: field_heading
entity_type: block_content
bundle: inline_message
label: Heading
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
allowed_formats:
- heading_html
field_type: text
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
uuid: 0512509f-d16a-4d0c-b210-583c4ef81115
langcode: en
status: true
dependencies:
config:
- block_content.type.inline_message
- field.storage.block_content.field_link
module:
- link
id: block_content.inline_message.field_link
field_name: field_link
entity_type: block_content
bundle: inline_message
label: Link
description: 'For more information about linking content, view our resource <a href="https://yalesites.yale.edu/resource-library/linking-content-on-yalesites" target="_blank">Linking Content on YaleSites</a>.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
title: 2
link_type: 17
field_type: link
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
uuid: 1ca64dda-9397-4c21-800a-4f3732021700
langcode: en
status: true
dependencies:
config:
- block_content.type.inline_message
- field.storage.block_content.field_style_color
module:
- options
id: block_content.inline_message.field_style_color
field_name: field_style_color
entity_type: block_content
bundle: inline_message
label: Theme
description: ''
required: true
translatable: false
default_value: { }
default_value_callback: ys_themes_default_value_function
settings: { }
field_type: list_string
Loading

0 comments on commit d81c402

Please sign in to comment.