Skip to content

Commit b626864

Browse files
authored
Merge pull request #1319 from UN-OCHA/release-versions/v1.13.14
release versions/v1.13.14
2 parents 354cb20 + 5478b05 commit b626864

14 files changed

+152
-40
lines changed

.docksal/commands/post-deploy .docksal/commands/deploy

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env bash
22
#: exec_target = cli
33

4-
## Run the typical commands for the post-deployment
4+
## Run the typical commands for the deployment
55
##
6-
## Usage: fin post-deploy
6+
## Usage: fin deploy
77

88
# Environment variables passed from fin:
99
#
@@ -19,7 +19,7 @@ usage="$(basename "$0") [-h] [-i]
1919
2020
where:
2121
-h show this help text
22-
-i import a local backup before executing the post-deploy steps"
22+
-i import a local backup before executing the deploy steps"
2323

2424
IMPORT_BACKUP=false
2525

composer.lock

+29-25
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/core.extension.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ _core:
33
module:
44
admin_denied: 0
55
admin_toolbar: 0
6-
admin_toolbar_links_access_filter: 0
76
admin_toolbar_tools: 0
87
auto_entitylabel: 0
98
autologout: 0
109
bert: 0
11-
better_permissions_page: 0
1210
big_pipe: 0
1311
big_pipe_sessionless: 0
1412
block: 0
@@ -40,6 +38,7 @@ module:
4038
file_mdm_font: 0
4139
filter: 0
4240
flat_taxonomy: 0
41+
fpa: 0
4342
geofield: 0
4443
geofield_map: 0
4544
ghi_base_objects: 0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
uuid: ed463ad2-3733-4efb-bb4e-7cdef509dd3c
2+
langcode: en
3+
status: true
4+
dependencies:
5+
module:
6+
- fpa
7+
id: core_requirements_fpa
8+
label: 'Module fpa'
9+
description: 'Requirements of the fpa module'
10+
category: Requirements
11+
plugin_id: core_requirements
12+
result_class: null
13+
value_label: null
14+
value_type: no_value
15+
caching_time: 3600
16+
settings:
17+
module: fpa
18+
exclude_keys: { }
19+
thresholds:
20+
type: none

config/user.role.administrator.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ permissions:
8787
- 'administer ghi global config'
8888
- 'administer ghi table config'
8989
- 'administer menu'
90-
- 'administer nodes'
9190
- 'administer orphaned content'
9291
- 'administer page templates'
9392
- 'administer pages'
@@ -99,6 +98,7 @@ permissions:
9998
- 'administer url aliases'
10099
- 'administer users'
101100
- 'assign all roles'
101+
- 'bypass node access'
102102
- 'configure all homepage node layout overrides'
103103
- 'configure any layout'
104104
- 'configure editable article node layout overrides'
@@ -283,6 +283,7 @@ permissions:
283283
- 'use text format html_text'
284284
- 'use text format wysiwyg_text'
285285
- 'view all media revisions'
286+
- 'view all revisions'
286287
- 'view any unpublished article content'
287288
- 'view any unpublished content'
288289
- 'view any unpublished custom_subpage content'

config/user.role.editor.yml

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ permissions:
3838
- 'access contextual links'
3939
- 'access remote content'
4040
- 'access toolbar'
41-
- 'administer nodes'
4241
- 'configure editable article node layout overrides'
4342
- 'configure editable custom_subpage node layout overrides'
4443
- 'configure editable document node layout overrides'

config/user.role.global_editor.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ permissions:
5858
- 'access toolbar'
5959
- 'access user profiles'
6060
- 'administer menu'
61-
- 'administer nodes'
6261
- 'administer orphaned content'
6362
- 'administer page templates'
6463
- 'administer users'
64+
- 'bypass node access'
6565
- 'configure all homepage node layout overrides'
6666
- 'configure editable article node layout overrides'
6767
- 'configure editable custom_subpage node layout overrides'
@@ -209,6 +209,7 @@ permissions:
209209
- 'use layout builder ipe on editable section node layout overrides'
210210
- 'use page templates'
211211
- 'use text format html_text'
212+
- 'view all revisions'
212213
- 'view any unpublished article content'
213214
- 'view any unpublished content'
214215
- 'view any unpublished custom_subpage content'

config/user.role.rpm_administrator.yml

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ permissions:
4242
- 'access user profiles'
4343
- 'administer base object entities'
4444
- 'administer ghi global config'
45-
- 'administer nodes'
4645
- 'configure all homepage node layout overrides'
4746
- 'configure editable homepage node layout overrides'
4847
- 'create homepage content'

config/views.view.content.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ display:
364364
access:
365365
type: perm
366366
options:
367-
perm: 'administer nodes'
367+
perm: 'access content overview'
368368
cache:
369369
type: tag
370370
empty:
@@ -5337,7 +5337,7 @@ display:
53375337
weight: -10
53385338
menu_name: admin
53395339
cache_metadata:
5340-
max-age: -1
5340+
max-age: 0
53415341
contexts:
53425342
- 'languages:language_content'
53435343
- 'languages:language_interface'

html/modules/custom/ghi_blocks/ghi_blocks.deploy.php

+89
Original file line numberDiff line numberDiff line change
@@ -517,3 +517,92 @@ function ghi_blocks_deploy_90010_update_funding_coverage_default_label_page_temp
517517
]);
518518
}
519519
}
520+
521+
/**
522+
* Fix broken configuration for headline figure elements on nodes.
523+
*/
524+
function ghi_blocks_deploy_9010_fix_broken_block_config(&$sandbox) {
525+
set_time_limit(30);
526+
if (!isset($sandbox['nodes'])) {
527+
$result = \Drupal::database()->select('node__layout_builder__layout')
528+
->fields('node__layout_builder__layout', ['entity_id'])
529+
->condition('layout_builder__layout_section', '%processing";s:0%', 'LIKE')
530+
->orderBy('entity_id')
531+
->execute();
532+
$sandbox['nodes'] = array_map(function ($row) {
533+
return $row->entity_id;
534+
}, $result->fetchAll());
535+
$sandbox['total'] = count($sandbox['nodes']);
536+
$sandbox['updated'] = 0;
537+
}
538+
for ($i = 0; $i < 25; $i++) {
539+
if (empty($sandbox['nodes'])) {
540+
continue;
541+
}
542+
$node_id = array_shift($sandbox['nodes']);
543+
/** @var \Drupal\node\NodeInterface $node */
544+
$node = \Drupal::entityTypeManager()->getStorage('node')->load($node_id);
545+
if (!$node) {
546+
continue;
547+
}
548+
549+
$changed = FALSE;
550+
if (!$node->hasField(OverridesSectionStorage::FIELD_NAME)) {
551+
continue;
552+
}
553+
$sections = $node->get(OverridesSectionStorage::FIELD_NAME)->getValue();
554+
if (empty($sections)) {
555+
continue;
556+
}
557+
/** @var \Drupal\layout_builder\Section $section */
558+
$section = &$sections[0]['section'];
559+
$components = $section->getComponents();
560+
if (empty($components)) {
561+
continue;
562+
}
563+
foreach ($components as $component) {
564+
if ($component->getPluginId() != 'plan_headline_figures') {
565+
continue;
566+
}
567+
$configuration = $component->get('configuration');
568+
if (empty($configuration['hpc']['key_figures']['items'])) {
569+
return $changed;
570+
}
571+
572+
$items = &$configuration['hpc']['key_figures']['items'];
573+
$original_count = count($items);
574+
$items = array_filter($items, function ($item) {
575+
if ($item['item_type'] != 'attachment_data') {
576+
return TRUE;
577+
}
578+
return !empty($item['config']['data_point']['processing']);
579+
});
580+
if (count($items) != $original_count) {
581+
$changed = TRUE;
582+
$component->setConfiguration($configuration);
583+
}
584+
}
585+
586+
if ($changed) {
587+
$node->get(OverridesSectionStorage::FIELD_NAME)->setValue($sections);
588+
$node->setNewRevision(FALSE);
589+
$node->setSyncing(TRUE);
590+
$node->save();
591+
$sandbox['updated']++;
592+
}
593+
}
594+
595+
$sandbox['#finished'] = 1 / (count($sandbox['nodes']) + 1);
596+
if ($sandbox['#finished'] === 1) {
597+
return t('Updated configurations in @count_changed / @count_total nodes', [
598+
'@count_changed' => $sandbox['updated'],
599+
'@count_total' => $sandbox['total'],
600+
]);
601+
}
602+
else {
603+
return t('Processed @count_processed / @count_total nodes', [
604+
'@count_processed' => $sandbox['total'] - count($sandbox['nodes']),
605+
'@count_total' => $sandbox['total'],
606+
]);
607+
}
608+
}

html/modules/custom/ghi_blocks/src/Plugin/Block/GlobalPage/PlanOverviewMap.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ private function buildCircleMap() {
227227
'tooltip' => implode(' ', [
228228
$plan_entity->getShortName(),
229229
$plan_entity->getYear(),
230-
$plan_entity->getPlanTypeShortLabel(FALSE),
230+
$plan->getTypeShortName(TRUE),
231231
]),
232232
'tooltip_values' => [
233233
'in_need' => [

0 commit comments

Comments
 (0)