Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master into develop after V1.1.0 release #595

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .ci/github/deploy_release_sites
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -eo pipefail

push_code() {
git_path=$(terminus connection:info "$site_with_env" --field=git_url)
git_path=$(terminus connection:info "$site_machine_name".dev --field=git_url)
git remote add "$site_machine_name" "$git_path"
git fetch "$site_machine_name"
git push "$site_machine_name" "$RELEASE_BRANCH:$RELEASE_BRANCH" --force
Expand Down
28 changes: 10 additions & 18 deletions .github/workflows/build_deploy_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref || github.ref_name }}

- name: Set bash_env env var
run: echo BASH_ENV=${RUNNER_TEMP}/bash_env.txt >> $GITHUB_ENV

- name: Cache bash_env.txt
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-bash-env
with:
Expand Down Expand Up @@ -88,12 +88,12 @@ jobs:
YALESITES_BUILD_TOKEN: ${{ secrets.YALESITES_BUILD_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref || github.ref_name }}

- name: Cache composer cache
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-composer-cache
with:
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
needs: [configure_env_vars, static_tests]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref || github.ref_name }}
fetch-depth: 0
Expand All @@ -148,7 +148,7 @@ jobs:
run: echo BASH_ENV=${RUNNER_TEMP}/bash_env.txt >> $GITHUB_ENV

- name: Cache bash_env.txt
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-bash-env
with:
Expand All @@ -160,7 +160,7 @@ jobs:
${{ runner.os }}-

- name: Cache composer cache
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-composer-cache
with:
Expand All @@ -172,23 +172,15 @@ jobs:
${{ runner.os }}-

- name: Cache vendor folder
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-vendor
with:
path: ./vendor
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }}

# - name: Cache web folder
# uses: actions/cache@v3
# env:
# cache-name: cache-web
# with:
# path: ./web
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.run_number }}

- name: Cache drush folder
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-drush
with:
Expand All @@ -201,7 +193,7 @@ jobs:
run: /build-tools-ci/scripts/set-environment

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16.13'

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install
run: npm install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ index 9331cae..376d953 100644
+ $block_categories['reusable_blocks']['#type'] = 'details';
+ $block_categories['reusable_blocks']['#attributes']['class'][] = 'js-layout-builder-category';
+ $block_categories['reusable_blocks']['#open'] = $blockcat->getOpened();
+ $block_categories['reusable_blocks']['#title'] = $this->t('Global Blocks');
+ $block_categories['reusable_blocks']['#title'] = $this->t('Reusable Blocks');
+ }
+ else {
+ // Only add the information if the category has links.
Expand Down
4 changes: 2 additions & 2 deletions web/profiles/custom/yalesites_profile/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"jjj/chosen": "2.2.1",
"laminas/laminas-escaper": "2.12",
"northernco/ckeditor5-anchor-drupal": "0.4.0",
"yalesites-org/atomic": "1.26.0",
"yalesites-org/atomic": "1.27.0",
"yalesites-org/yale_cas": "1.0.4"
},
"minimum-stability": "dev",
Expand Down Expand Up @@ -171,7 +171,7 @@
"Fix cloning of inline blocks and paragraphs: https://www.drupal.org/project/quick_node_clone/issues/3100117": "https://www.drupal.org/files/issues/2023-04-25/quick-node-clone--inline-blocks--3100117-32.patch"
},
"drupal/layout_builder_browser": {
"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-7.patch"
"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/section_library": {
"Fix access check issues on add_to_template link: https://www.drupal.org/project/section_library/issues/3241715": "https://www.drupal.org/files/issues/2022-09-21/3241715-6.patch"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ targetEntityType: node
bundle: page
mode: search_result
content:
field_external_source:
type: link_separate
label: hidden
settings:
trim_length: 80
url_only: false
url_plain: false
rel: ''
target: ''
third_party_settings: { }
weight: 2
region: content
field_teaser_text:
type: text_default
label: hidden
Expand All @@ -34,7 +46,6 @@ content:
weight: 0
region: content
hidden:
field_external_source: true
field_login_required: true
field_metatags: true
field_tags: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ targetEntityType: node
bundle: post
mode: search_result
content:
field_external_source:
type: link_separate
label: hidden
settings:
trim_length: 80
url_only: false
url_plain: false
rel: ''
target: ''
third_party_settings: { }
weight: 2
region: content
field_teaser_text:
type: text_default
label: hidden
Expand All @@ -39,7 +51,6 @@ content:
hidden:
field_author: true
field_category: true
field_external_source: true
field_login_required: true
field_metatags: true
field_publish_date: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,18 @@ content:
third_party_settings: { }
weight: 2
region: content
field_external_source:
type: link_separate
label: hidden
settings:
trim_length: 80
url_only: false
url_plain: false
rel: '0'
target: '0'
third_party_settings: { }
weight: 2
region: content
field_media:
type: entity_reference_entity_view
label: hidden
Expand Down Expand Up @@ -113,7 +125,6 @@ content:
region: content
hidden:
field_address: true
field_external_source: true
field_first_name: true
field_honorific_prefix: true
field_last_name: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ targetEntityType: node
bundle: profile
mode: search_result
content:
field_external_source:
type: link_separate
label: hidden
settings:
trim_length: 80
url_only: false
url_plain: false
rel: ''
target: ''
third_party_settings: { }
weight: 2
region: content
field_teaser_text:
type: text_default
label: hidden
Expand All @@ -54,7 +66,6 @@ hidden:
field_affiliation: true
field_department: true
field_email: true
field_external_source: true
field_first_name: true
field_honorific_prefix: true
field_last_name: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ auto_added_reusable_block_content_bundles:
button_link: button_link
callout: callout
content_spotlight: content_spotlight
content_spotlight_portrait: content_spotlight_portrait
cta_banner: cta_banner
custom_cards: custom_cards
directory: directory
Expand All @@ -28,5 +29,7 @@ auto_added_reusable_block_content_bundles:
webform: webform
wrapped_image: wrapped_image
group_reusable_blocks_together: true
reusable_image_fallback: ''
reusable_image_fallback_alt: ''
image_fallback: /profiles/custom/yalesites_profile/modules/custom/ys_core/images/preview-icons/fallback-global-block.jpg
image_fallback_alt: ''
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ field_settings:
event: default
page: default
post: default
profile: default
status:
label: null
label: status
datasource_id: 'entity:node'
property_path: status
type: boolean
Expand All @@ -53,7 +54,7 @@ field_settings:
module:
- node
uid:
label: null
label: uid
datasource_id: 'entity:node'
property_path: uid
type: integer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,23 @@ function ys_core_update_9003() {

}

/**
* Implements hook_update().
*
* This update will convert an alias'd front page to a node based one.
*/
function ys_core_update_9004() {
$frontPage = \Drupal::config('system.site')->get('page.front');

if ($frontPage && strpos($frontPage, '/node') === FALSE) {
// Path should be already the form we need: /node/<number>.
$path = \Drupal::service('path_alias.manager')->getPathByAlias($frontPage);
if ($path) {
\Drupal::configFactory()->getEditable('system.site')->set('page.front', $path)->save();
}
}
}

/**
* Sanitizes the value of an array object with allowed_tags.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ public function build() {

if ($route && $node) {
// Profile fields.
$email = ($node->field_email->first()) ? $node->field_email->first()->getValue()['value'] : NULL;
$phone = ($node->field_telephone->first()) ? $node->field_telephone->first()->getValue()['value'] : NULL;
$address = ($node->field_address->first()) ? $node->field_address->first()->getValue()['value'] : NULL;
$email = $node->get('field_email')->getValue()[0]['value'] ?? NULL;
$phone = $node->get('field_telephone')->getValue()[0]['value'] ?? NULL;
$address = $node->get('field_address')->getValue()[0]['value'] ?? NULL;
}

return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ public function build() {
if ($route && $node) {
// Profile fields.
$title = $node->getTitle();
$position = ($node->field_position->first()) ? $node->field_position->first()->getValue()['value'] : NULL;
$subtitle = ($node->field_subtitle->first()) ? $node->field_subtitle->first()->getValue()['value'] : NULL;
$department = ($node->field_department->first()) ? $node->field_department->first()->getValue()['value'] : NULL;
$mediaId = ($node->field_media->first()) ? $node->field_media->first()->getValue()['target_id'] : NULL;
$position = $node->get('field_position')->getValue()[0]['value'] ?? NULL;
$subtitle = $node->get('field_subtitle')->getValue()[0]['value'] ?? NULL;
$department = $node->get('field_department')->getValue()[0]['value'] ?? NULL;
$mediaId = $node->get('field_media')->getValue()[0]['target_id'] ?? NULL;
}

return [
Expand Down
Loading