diff --git a/composer.json b/composer.json index 938f55d41..e57f33e5b 100644 --- a/composer.json +++ b/composer.json @@ -115,6 +115,7 @@ ], "require": { "php": ">=8.1", + "ext-dom": "*", "atomiks/tippyjs": "^5.2", "cferdinandi/tabby": "12.0.3", "composer/installers": "^2.1", diff --git a/composer.lock b/composer.lock index d5dd5a467..68af74ee0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5573852d8f2490dcaf4df2b0d01d6322", + "content-hash": "3175b05c6352203f593748269f7b3407", "packages": [ { "name": "arthurkushman/query-path", @@ -17026,7 +17026,8 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": ">=8.1" + "php": ">=8.1", + "ext-dom": "*" }, "platform-dev": [], "plugin-api-version": "2.3.0" diff --git a/config/sync/core.base_field_override.node.archive_page.promote.yml b/config/sync/core.base_field_override.node.archive_page.promote.yml new file mode 100644 index 000000000..8abf389f7 --- /dev/null +++ b/config/sync/core.base_field_override.node.archive_page.promote.yml @@ -0,0 +1,24 @@ +uuid: b5c27490-886a-476c-80ee-71502142dc9f +langcode: en +status: true +dependencies: + config: + - node.type.archive_page +_core: + default_config_hash: jTsV1q_CSnQyGyibyGOqPmWOf9edJxhR8ool7jhSO_8 +id: node.archive_page.promote +field_name: promote +entity_type: node +bundle: archive_page +label: 'Promoted to front page' +description: '' +required: false +translatable: true +default_value: + - + value: 0 +default_value_callback: '' +settings: + on_label: 'On' + off_label: 'Off' +field_type: boolean diff --git a/config/sync/core.entity_form_display.block_content.hero.default.yml b/config/sync/core.entity_form_display.block_content.hero.default.yml index 4dbd71992..cb62f2289 100644 --- a/config/sync/core.entity_form_display.block_content.hero.default.yml +++ b/config/sync/core.entity_form_display.block_content.hero.default.yml @@ -13,7 +13,7 @@ dependencies: module: - media_library _core: - default_config_hash: 0IPTFQ4QsaaIvhHetksXjUvt9XGV68RXjDAdjPi0Ef4 + default_config_hash: MmM4GbBNi4ZJggCE5w1JPBIE_peT1Gm9PQNw5o3ydZg id: block_content.hero.default targetEntityType: block_content bundle: hero diff --git a/config/sync/core.entity_form_display.block_content.photo_hero.default.yml b/config/sync/core.entity_form_display.block_content.photo_hero.default.yml index 6060a497b..092ce4325 100644 --- a/config/sync/core.entity_form_display.block_content.photo_hero.default.yml +++ b/config/sync/core.entity_form_display.block_content.photo_hero.default.yml @@ -16,7 +16,7 @@ dependencies: - media_library - text _core: - default_config_hash: s-CeHQ1Po1MxiTd9nQlZJDoZWhzqE4ziQ7hrfcy42qU + default_config_hash: Mg7tzBxSVavlDgHB6lTsJYqJHD9NiA7tiYabsVYWIHM id: block_content.photo_hero.default targetEntityType: block_content bundle: photo_hero diff --git a/config/sync/core.entity_form_display.node.archive_page.default.yml b/config/sync/core.entity_form_display.node.archive_page.default.yml new file mode 100644 index 000000000..087c86406 --- /dev/null +++ b/config/sync/core.entity_form_display.node.archive_page.default.yml @@ -0,0 +1,91 @@ +uuid: ccc9b485-012f-40f2-bd6f-4a901f3dd772 +langcode: en +status: true +dependencies: + config: + - field.field.node.archive_page.archive_page_body + - node.type.archive_page + module: + - content_moderation + - path + - text +_core: + default_config_hash: AfdaqPAfsQDstu5WG6fM7s0HQMmqGJAyP1UDdHr5u08 +id: node.archive_page.default +targetEntityType: node +bundle: archive_page +mode: default +content: + archive_page_body: + type: text_textarea_with_summary + weight: 121 + region: content + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + show_summary: false + third_party_settings: { } + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + moderation_state: + type: moderation_state_default + weight: 100 + region: content + settings: { } + third_party_settings: { } + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + weight: 15 + region: content + settings: + display_label: true + third_party_settings: { } + status: + type: boolean_checkbox + weight: 120 + region: content + settings: + display_label: true + third_party_settings: { } + sticky: + type: boolean_checkbox + weight: 16 + region: content + settings: + display_label: true + third_party_settings: { } + title: + type: string_textfield + weight: -5 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + region: content + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } + url_redirects: + weight: 50 + region: content + settings: { } + third_party_settings: { } +hidden: { } diff --git a/config/sync/core.entity_view_display.block_content.hero.default.yml b/config/sync/core.entity_view_display.block_content.hero.default.yml index 39615ccc3..8cbf78502 100644 --- a/config/sync/core.entity_view_display.block_content.hero.default.yml +++ b/config/sync/core.entity_view_display.block_content.hero.default.yml @@ -13,7 +13,7 @@ dependencies: module: - options _core: - default_config_hash: L7BvHdUygi_6iGD7fBH0oUIrY428nU3apsmHDftoXuU + default_config_hash: ohc_5Ak4jZ5mZAF-n-zBjp6PW9XMOIugeVx7aY2IHHE id: block_content.hero.default targetEntityType: block_content bundle: hero diff --git a/config/sync/core.entity_view_display.block_content.photo_hero.default.yml b/config/sync/core.entity_view_display.block_content.photo_hero.default.yml index 9678811e7..3c5f993ba 100644 --- a/config/sync/core.entity_view_display.block_content.photo_hero.default.yml +++ b/config/sync/core.entity_view_display.block_content.photo_hero.default.yml @@ -16,7 +16,7 @@ dependencies: - options - text _core: - default_config_hash: kOcB0UwCNvu1Ol-UWJSiVl_tbQL0Fdx-8G6eCknX830 + default_config_hash: xXRvIhC6oeKtkTe4UXEi7HcNMQvZz2WrENldpaU8nw4 id: block_content.photo_hero.default targetEntityType: block_content bundle: photo_hero diff --git a/config/sync/core.entity_view_display.node.archive_page.default.yml b/config/sync/core.entity_view_display.node.archive_page.default.yml new file mode 100644 index 000000000..b247a1c34 --- /dev/null +++ b/config/sync/core.entity_view_display.node.archive_page.default.yml @@ -0,0 +1,35 @@ +uuid: 21f9b652-578f-4912-98ea-a0c04010548c +langcode: en +status: true +dependencies: + config: + - field.field.node.archive_page.archive_page_body + - node.type.archive_page + module: + - text + - user +_core: + default_config_hash: Uimh9DMs_BGaasHnExxbwtru0EEM2S29aqv4fRwKCaE +id: node.archive_page.default +targetEntityType: node +bundle: archive_page +mode: default +content: + archive_page_body: + type: text_default + label: hidden + settings: { } + third_party_settings: { } + weight: 101 + region: content + content_moderation_control: + settings: { } + third_party_settings: { } + weight: -20 + region: content + links: + settings: { } + third_party_settings: { } + weight: 100 + region: content +hidden: { } diff --git a/config/sync/core.entity_view_display.node.archive_page.teaser.yml b/config/sync/core.entity_view_display.node.archive_page.teaser.yml new file mode 100644 index 000000000..421fe33dc --- /dev/null +++ b/config/sync/core.entity_view_display.node.archive_page.teaser.yml @@ -0,0 +1,29 @@ +uuid: 7b2790a5-5715-4ed6-b8f4-d2382702bd82 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.archive_page.archive_page_body + - node.type.archive_page + module: + - user +_core: + default_config_hash: S_sCBgKJAl8bDgE50INwDL1Okm_miD6pJzXshZsfFY4 +id: node.archive_page.teaser +targetEntityType: node +bundle: archive_page +mode: teaser +content: + content_moderation_control: + settings: { } + third_party_settings: { } + weight: -20 + region: content + links: + settings: { } + third_party_settings: { } + weight: 100 + region: content +hidden: + archive_page_body: true diff --git a/config/sync/core.entity_view_display.node.builder_page.default.yml b/config/sync/core.entity_view_display.node.builder_page.default.yml index 15fcabb54..52b1a0e1f 100644 --- a/config/sync/core.entity_view_display.node.builder_page.default.yml +++ b/config/sync/core.entity_view_display.node.builder_page.default.yml @@ -105,6 +105,7 @@ third_party_settings: - 'inline_block:accordion' - 'inline_block:cta' - 'inline_block:card' + - 'inline_block:html_code' - 'inline_block:node_include' - 'inline_block:proofpoint' - 'inline_block:social_media_links' @@ -131,6 +132,7 @@ third_party_settings: - 'inline_block:accordion' - 'inline_block:cta' - 'inline_block:photo_hero' + - 'inline_block:html_code' - 'inline_block:icon_links' - 'inline_block:logo_cloud' - 'inline_block:node_include' @@ -160,6 +162,7 @@ third_party_settings: - 'inline_block:cta' - 'inline_block:card' - 'inline_block:photo_hero' + - 'inline_block:html_code' - 'inline_block:node_include' - 'inline_block:proofpoint' - 'inline_block:social_media_links' @@ -185,6 +188,7 @@ third_party_settings: - 'inline_block:cta' - 'inline_block:card' - 'inline_block:photo_hero' + - 'inline_block:html_code' - 'inline_block:logo_cloud' - 'inline_block:proofpoint' - 'inline_block:slideshow' diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index 010f05e0d..b1b662bd6 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -65,6 +65,7 @@ module: filter: 0 google_analytics: 0 heading: 0 + herbie_archive_page: 0 herbie_book: 0 herbie_builder_page: 0 herbie_config: 0 @@ -138,6 +139,7 @@ module: toolbar: 0 twig_tweak: 0 twig_ui: 0 + unl_archive_page_import: 0 unl_blocks: 0 unl_breadcrumbs: 0 unl_cas: 0 diff --git a/config/sync/editor.editor.archive.yml b/config/sync/editor.editor.archive.yml new file mode 100644 index 000000000..fcc3e6930 --- /dev/null +++ b/config/sync/editor.editor.archive.yml @@ -0,0 +1,92 @@ +uuid: c921609f-3711-431c-8ad1-aaa9e97e5a5f +langcode: en +status: true +dependencies: + config: + - filter.format.archive + module: + - ckeditor5 +_core: + default_config_hash: PPY3SMEn5dYuSb_zlVwx9afatduehtBPlwlZcREFS6I +format: archive +editor: ckeditor5 +settings: + toolbar: + items: + - sourceEditing + - '|' + - bold + - italic + - strikethrough + - alignment + - '|' + - link + - '|' + - bulletedList + - numberedList + - '|' + - drupalMedia + - blockQuote + - insertTable + - '|' + - heading + - '|' + - superscript + - subscript + - specialCharacters + - '|' + - horizontalLine + - '|' + - style + plugins: + ckeditor5_alignment: + enabled_alignments: + - center + - left + ckeditor5_heading: + enabled_headings: + - heading2 + - heading3 + - heading4 + - heading5 + - heading6 + ckeditor5_list: + reversed: false + startIndex: true + ckeditor5_sourceEditing: + allowed_tags: { } + ckeditor5_style: + styles: + - + label: 'Extra small' + element: '

' + - + label: Small + element: '

' + - + label: Large + element: '

' + - + label: 'Primary Button' + element: '' + - + label: 'Secondary Button' + element: '' + - + label: 'Tertiary Button' + element: '' + - + label: 'Inverse Primary Button' + element: '' + - + label: 'Inverse Secondary Button' + element: '' + - + label: 'Inverse Tertiary Button' + element: '' + linkit_extension: + linkit_enabled: true + linkit_profile: standard + media_media: + allow_view_mode_override: true +image_upload: { } diff --git a/config/sync/field.field.block_content.card.b_card_body.yml b/config/sync/field.field.block_content.card.b_card_body.yml index e7b47be3f..30a1498ad 100644 --- a/config/sync/field.field.block_content.card.b_card_body.yml +++ b/config/sync/field.field.block_content.card.b_card_body.yml @@ -13,7 +13,7 @@ third_party_settings: allowed_formats: - block_body _core: - default_config_hash: SJKDfUOfV8qMV5nSvuEu9oU7CrpF4GgSdeRFImiK7lM + default_config_hash: lyhW_AA4yA60diwSE2MEk7Ai4WEv4Oo9Z7ZfonHo8uM id: block_content.card.b_card_body field_name: b_card_body entity_type: block_content diff --git a/config/sync/field.field.block_content.hero.b_hero_img_obj_pos.yml b/config/sync/field.field.block_content.hero.b_hero_img_obj_pos.yml index 61ed872e3..a3b7ca167 100644 --- a/config/sync/field.field.block_content.hero.b_hero_img_obj_pos.yml +++ b/config/sync/field.field.block_content.hero.b_hero_img_obj_pos.yml @@ -1,4 +1,4 @@ -uuid: 855ee02f-73d6-4710-9ade-34f23e479571 +uuid: 8d6b8de8-d8fb-4a63-8868-f4011e80eb00 langcode: en status: true dependencies: @@ -7,6 +7,8 @@ dependencies: - field.storage.block_content.b_hero_img_obj_pos module: - options +_core: + default_config_hash: UAb1A2wcDNyO6Rko-KyNmJw0d9h99W4IhEzZrvDhJ2I id: block_content.hero.b_hero_img_obj_pos field_name: b_hero_img_obj_pos entity_type: block_content diff --git a/config/sync/field.field.block_content.photo_hero.b_photohero_img_obj_pos.yml b/config/sync/field.field.block_content.photo_hero.b_photohero_img_obj_pos.yml index 4fe54b820..7ccba1ffb 100644 --- a/config/sync/field.field.block_content.photo_hero.b_photohero_img_obj_pos.yml +++ b/config/sync/field.field.block_content.photo_hero.b_photohero_img_obj_pos.yml @@ -1,4 +1,4 @@ -uuid: f766a032-4938-45c3-b85a-f440940b7739 +uuid: 583ae732-c8a5-4f1c-b1b6-b78254d4d152 langcode: en status: true dependencies: @@ -7,6 +7,8 @@ dependencies: - field.storage.block_content.b_photohero_img_obj_pos module: - options +_core: + default_config_hash: 9YQVq03TIu-XirdIiRgNhWfngwg3-Ftzn1b3WpC5C9Y id: block_content.photo_hero.b_photohero_img_obj_pos field_name: b_photohero_img_obj_pos entity_type: block_content diff --git a/config/sync/field.field.node.archive_page.archive_page_body.yml b/config/sync/field.field.node.archive_page.archive_page_body.yml new file mode 100644 index 000000000..907972c1d --- /dev/null +++ b/config/sync/field.field.node.archive_page.archive_page_body.yml @@ -0,0 +1,30 @@ +uuid: 9f8d2626-1324-41b8-8c43-6be226ed7640 +langcode: en +status: true +dependencies: + config: + - field.storage.node.archive_page_body + - node.type.archive_page + module: + - allowed_formats + - text +third_party_settings: + allowed_formats: + allowed_formats: + - archive +_core: + default_config_hash: DqzPHr0eUyjJNYN5Bpmd4B70RxzuSHmlasIi_P69G8w +id: node.archive_page.archive_page_body +field_name: archive_page_body +entity_type: node +bundle: archive_page +label: Body +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + display_summary: true + required_summary: false +field_type: text_with_summary diff --git a/config/sync/field.storage.block_content.b_hero_img_obj_pos.yml b/config/sync/field.storage.block_content.b_hero_img_obj_pos.yml index 8c9ab949f..4c7ef04ad 100644 --- a/config/sync/field.storage.block_content.b_hero_img_obj_pos.yml +++ b/config/sync/field.storage.block_content.b_hero_img_obj_pos.yml @@ -1,10 +1,12 @@ -uuid: 967157e6-c54a-4c43-9edf-bed02a28059d +uuid: 00312cf5-ef11-46b2-b528-bf31fad16b2c langcode: en status: true dependencies: module: - block_content - options +_core: + default_config_hash: wBusup56H7cs_qvxmjVfzn2MKOpuUvdYBqMzO9QlJ1M id: block_content.b_hero_img_obj_pos field_name: b_hero_img_obj_pos entity_type: block_content diff --git a/config/sync/field.storage.block_content.b_photohero_img_obj_pos.yml b/config/sync/field.storage.block_content.b_photohero_img_obj_pos.yml index e9199c124..b33491006 100644 --- a/config/sync/field.storage.block_content.b_photohero_img_obj_pos.yml +++ b/config/sync/field.storage.block_content.b_photohero_img_obj_pos.yml @@ -1,10 +1,12 @@ -uuid: c85522af-fca3-46d0-975a-7ae2fd90d9f6 +uuid: b1269961-a57c-4718-a82a-2fcbd297b17b langcode: en status: true dependencies: module: - block_content - options +_core: + default_config_hash: LaY7DirhFoVc9EDWTQ5aXPpE9flWKZ2jE04aDYo5Jaw id: block_content.b_photohero_img_obj_pos field_name: b_photohero_img_obj_pos entity_type: block_content diff --git a/config/sync/field.storage.node.archive_page_body.yml b/config/sync/field.storage.node.archive_page_body.yml new file mode 100644 index 000000000..0642dbf81 --- /dev/null +++ b/config/sync/field.storage.node.archive_page_body.yml @@ -0,0 +1,21 @@ +uuid: a1a80849-09dd-4808-bebb-171169ab9e4f +langcode: en +status: true +dependencies: + module: + - node + - text +_core: + default_config_hash: 3P3Co5OwtdyrsMSmcoVPPvPSXTn9ae77bu1ZGGQvmjw +id: node.archive_page_body +field_name: archive_page_body +entity_type: node +type: text_with_summary +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/filter.format.archive.yml b/config/sync/filter.format.archive.yml new file mode 100644 index 000000000..ff7a1f8bf --- /dev/null +++ b/config/sync/filter.format.archive.yml @@ -0,0 +1,115 @@ +uuid: 079c1aa9-97a9-4bd8-96ba-185006a0c182 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.media.narrow + - core.entity_view_mode.media.wide + module: + - codemirror_editor + - dcf_ckeditor5 + - editor + - linkit + - media +_core: + default_config_hash: rzPzXxWUrXX_M7AOoY7S2IdDNW1fcFWrMiBiR-WHf4Q +name: Archive +format: archive +weight: 0 +filters: + filter_dcfckeditor5: + id: filter_dcfckeditor5 + provider: dcf_ckeditor5 + status: false + weight: -43 + settings: + dcftable: '0' + filter_html: + id: filter_html + provider: filter + status: false + weight: -46 + settings: + allowed_html: '

' + filter_html_help: true + filter_html_nofollow: false + media_embed: + id: media_embed + provider: media + status: true + weight: -47 + settings: + default_view_mode: narrow + allowed_view_modes: + default: default + narrow: narrow + wide: wide + allowed_media_types: + image: image + instagram: instagram + remote_video: remote_video + codemirror_editor: + id: codemirror_editor + provider: codemirror_editor + status: false + weight: -44 + settings: + lineWrapping: false + lineNumbers: true + foldGutter: false + filter_url: + id: filter_url + provider: filter + status: false + weight: -40 + settings: + filter_url_length: 72 + linkit: + id: linkit + provider: linkit + status: true + weight: -48 + settings: + title: false + filter_align: + id: filter_align + provider: filter + status: true + weight: -50 + settings: { } + filter_caption: + id: filter_caption + provider: filter + status: true + weight: -49 + settings: { } + editor_file_reference: + id: editor_file_reference + provider: editor + status: false + weight: -42 + settings: { } + filter_html_image_secure: + id: filter_html_image_secure + provider: filter + status: false + weight: -39 + settings: { } + filter_autop: + id: filter_autop + provider: filter + status: false + weight: -41 + settings: { } + filter_htmlcorrector: + id: filter_htmlcorrector + provider: filter + status: false + weight: -38 + settings: { } + filter_html_escape: + id: filter_html_escape + provider: filter + status: false + weight: -45 + settings: { } diff --git a/config/sync/layout_builder_styles.style.section_background_pattern_diagonal_gradient_multi_staggered.yml b/config/sync/layout_builder_styles.style.section_background_pattern_diagonal_gradient_multi_staggered.yml index dbf80cc8f..b6889fe25 100644 --- a/config/sync/layout_builder_styles.style.section_background_pattern_diagonal_gradient_multi_staggered.yml +++ b/config/sync/layout_builder_styles.style.section_background_pattern_diagonal_gradient_multi_staggered.yml @@ -1,12 +1,14 @@ -uuid: 72dd3824-e4f9-4f66-bf24-3d5b2a8ed73b +uuid: 6d0cf94c-dfb9-4791-9bbb-cb788dce22bd langcode: en status: true dependencies: { } +_core: + default_config_hash: Tjk4vVFBO64NYQAj8Prg-tVQ5AeQhm4uQ1lHzfODEhU id: section_background_pattern_diagonal_gradient_multi_staggered label: 'Diagonal Gradient – Multi Staggered' classes: "unl-bg-diagonal-gradients\r\nunl-bg-soft-light" type: section group: background_pattern +weight: 0 block_restrictions: { } layout_restrictions: { } -weight: 0 diff --git a/config/sync/node.type.archive_page.yml b/config/sync/node.type.archive_page.yml new file mode 100644 index 000000000..1792eb6cb --- /dev/null +++ b/config/sync/node.type.archive_page.yml @@ -0,0 +1,20 @@ +uuid: d360fdfc-729f-43c8-8b9f-228c1d9f9eb3 +langcode: en +status: true +dependencies: + module: + - menu_ui +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +_core: + default_config_hash: 0ebIm8b55UCcLLBAIXBkfSIjJ9UnzpXYzdpSVw-lzf0 +name: 'Temporary transition page' +type: archive_page +description: 'A page of HTML markup that has been imported from a Drupal 7 site.' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false diff --git a/config/sync/replicate_ui.settings.yml b/config/sync/replicate_ui.settings.yml index 1a950da6d..581c29a93 100644 --- a/config/sync/replicate_ui.settings.yml +++ b/config/sync/replicate_ui.settings.yml @@ -1,5 +1,5 @@ _core: - default_config_hash: kTj4VrfBBlmTowM6GEcqnV6rS5DvkIeeWJSGHyda1e4 + default_config_hash: 5XLrcRJwJXP7isux6rFxcWcJ7Rc_z3ltCO3wWadIVpw entity_types: - node check_edit_access: true diff --git a/config/sync/user.role.administrator.yml b/config/sync/user.role.administrator.yml index abe292e25..e0d371ddd 100644 --- a/config/sync/user.role.administrator.yml +++ b/config/sync/user.role.administrator.yml @@ -4,7 +4,9 @@ status: true dependencies: config: - core.entity_view_display.node.builder_page.default + - filter.format.archive - filter.format.block_body + - filter.format.html_code - filter.format.minimal - filter.format.simple - filter.format.standard @@ -12,6 +14,7 @@ dependencies: - media.type.file - media.type.image - media.type.remote_video + - node.type.archive_page - node.type.book - node.type.builder_page - node.type.news @@ -30,6 +33,7 @@ dependencies: - entity_usage - external_entities - feeds + - field_css - field_ui - file - file_delete @@ -58,7 +62,7 @@ dependencies: - webform_node - webform_submission_log _core: - default_config_hash: _AH43AtkhyIHwSNiL8xiiBcFzTS9PTNgkYYktiBPiz0 + default_config_hash: T1V6teTaabSg8mcwVxJNLuKutyLpqt2SSqo1ObubVUk id: administrator label: Administrator weight: -4 @@ -68,6 +72,7 @@ permissions: - 'access any webform configuration' - 'access content overview' - 'access contextual links' + - 'access css fields' - 'access entity usage statistics' - 'access feed overview' - 'access files overview' @@ -118,6 +123,7 @@ permissions: - 'create cta block content' - 'create file media' - 'create hero block content' + - 'create html_code block content' - 'create icon_links block content' - 'create image media' - 'create logo_cloud block content' @@ -138,7 +144,9 @@ permissions: - 'create url aliases' - 'create users' - 'create webform' + - 'create webform content' - 'delete any accordion block content' + - 'delete any archive_page content' - 'delete any book content' - 'delete any builder_page content' - 'delete any card block content' @@ -147,6 +155,7 @@ permissions: - 'delete any file' - 'delete any file media' - 'delete any hero block content' + - 'delete any html_code block content' - 'delete any icon_links block content' - 'delete any image media' - 'delete any logo_cloud block content' @@ -164,10 +173,12 @@ permissions: - 'delete any webform' - 'delete any webform content' - 'delete any webform submission' + - 'delete archive_page revisions' - 'delete book revisions' - 'delete builder_page revisions' - 'delete files' - 'delete news revisions' + - 'delete own archive_page content' - 'delete own book content' - 'delete own builder_page content' - 'delete own file media' @@ -184,6 +195,7 @@ permissions: - 'delete webform revisions' - 'delete webform submissions any node' - 'delete webform submissions own node' + - 'edit any archive_page content' - 'edit any book content' - 'edit any builder_page content' - 'edit any file media' @@ -194,6 +206,7 @@ permissions: - 'edit any webform' - 'edit any webform content' - 'edit any webform submission' + - 'edit own archive_page content' - 'edit own book content' - 'edit own builder_page content' - 'edit own file media' @@ -216,6 +229,7 @@ permissions: - 'perform search only' - 'rabbit hole bypass media' - 'replicate entities' + - 'revert archive_page revisions' - 'revert book revisions' - 'revert builder_page revisions' - 'revert news revisions' @@ -230,6 +244,7 @@ permissions: - 'update any content block content' - 'update any cta block content' - 'update any hero block content' + - 'update any html_code block content' - 'update any icon_links block content' - 'update any logo_cloud block content' - 'update any node_include block content' @@ -244,13 +259,16 @@ permissions: - 'use editorial transition create_new_draft' - 'use editorial transition publish' - 'use editorial transition unpublish' + - 'use text format archive' - 'use text format block_body' + - 'use text format html_code' - 'use text format minimal' - 'use text format simple' - 'use text format standard' - 'use text format webform' - 'view any unpublished content' - 'view any webform submission' + - 'view archive_page revisions' - 'view book revisions' - 'view builder_page revisions' - 'view latest version' diff --git a/config/sync/user.role.coder.yml b/config/sync/user.role.coder.yml index cbeaa98e5..e113ca382 100644 --- a/config/sync/user.role.coder.yml +++ b/config/sync/user.role.coder.yml @@ -2,11 +2,16 @@ uuid: 6ec7535b-c456-4d90-a964-4b4e9f74b019 langcode: en status: true dependencies: + config: + - filter.format.html_code module: - asset_injector + - block_content_permissions - contextual - feeds + - field_css - field_ui + - filter - google_analytics - node - paragraphs @@ -16,13 +21,14 @@ dependencies: - twig_ui - views_ui _core: - default_config_hash: e_wgK3u6DJXex7VJ7NgqcpN53OnF52HfNNaK18TNPwA + default_config_hash: pjZngoP_kq80I1xBCMa6k4sk--mrzHRIpBC2HjNgftE id: coder label: Developer weight: -5 is_admin: null permissions: - 'access contextual links' + - 'access css fields' - 'access feed overview' - 'access site reports' - 'access taxonomy overview' @@ -40,6 +46,10 @@ permissions: - 'administer taxonomy' - 'administer twig templates' - 'administer views' + - 'create html_code block content' + - 'delete any html_code block content' - 'load twig templates from file system' - 'replicate entities' + - 'update any html_code block content' + - 'use text format html_code' - 'view the administration theme' diff --git a/config/sync/user.role.editor.yml b/config/sync/user.role.editor.yml index b70df69d8..ef9390d6f 100644 --- a/config/sync/user.role.editor.yml +++ b/config/sync/user.role.editor.yml @@ -4,6 +4,7 @@ status: true dependencies: config: - core.entity_view_display.node.builder_page.default + - filter.format.archive - filter.format.block_body - filter.format.minimal - filter.format.simple @@ -12,6 +13,7 @@ dependencies: - media.type.file - media.type.image - media.type.remote_video + - node.type.archive_page - node.type.book - node.type.builder_page - node.type.news @@ -44,7 +46,7 @@ dependencies: - webform - webform_node _core: - default_config_hash: V5wvbRBDf_qpE6ZtYmzxyrgjxAnbcL_YB2HL-HulvmI + default_config_hash: fcuTxoPomW4e0Okydp0pxd85B93DHRfyNYVk9D0kdsM id: editor label: Editor weight: -7 @@ -108,9 +110,11 @@ permissions: - 'delete any tabs block content' - 'delete any tandem block content' - 'delete any timeline block content' + - 'delete archive_page revisions' - 'delete book revisions' - 'delete builder_page revisions' - 'delete news revisions' + - 'delete own archive_page content' - 'delete own book content' - 'delete own builder_page content' - 'delete own file media' @@ -122,6 +126,7 @@ permissions: - 'delete person revisions' - 'delete unl_directory_entry external entity' - 'delete webform revisions' + - 'edit any archive_page content' - 'edit any book content' - 'edit any builder_page content' - 'edit any file media' @@ -130,6 +135,7 @@ permissions: - 'edit any person content' - 'edit any remote_video media' - 'edit any webform content' + - 'edit own archive_page content' - 'edit own book content' - 'edit own builder_page content' - 'edit own file media' @@ -143,6 +149,7 @@ permissions: - 'perform search only' - 'rabbit hole bypass media' - 'replicate entities' + - 'revert archive_page revisions' - 'revert book revisions' - 'revert builder_page revisions' - 'revert news revisions' @@ -167,6 +174,7 @@ permissions: - 'use editorial transition create_new_draft' - 'use editorial transition publish' - 'use editorial transition unpublish' + - 'use text format archive' - 'use text format block_body' - 'use text format minimal' - 'use text format simple' @@ -174,6 +182,7 @@ permissions: - 'use text format webform' - 'view any unpublished content' - 'view any webform submission' + - 'view archive_page revisions' - 'view book revisions' - 'view builder_page revisions' - 'view latest version' diff --git a/config/sync/user.role.site_admin.yml b/config/sync/user.role.site_admin.yml index 18dc95f7d..5fa6910c5 100644 --- a/config/sync/user.role.site_admin.yml +++ b/config/sync/user.role.site_admin.yml @@ -4,6 +4,7 @@ status: true dependencies: config: - core.entity_view_display.node.builder_page.default + - filter.format.archive - filter.format.block_body - filter.format.minimal - filter.format.simple @@ -12,6 +13,7 @@ dependencies: - media.type.file - media.type.image - media.type.remote_video + - node.type.archive_page - node.type.book - node.type.builder_page - node.type.news @@ -53,7 +55,7 @@ dependencies: - webform_node - webform_submission_log _core: - default_config_hash: RYtaIhRvKsuvKIHP_VucmBHavcyaPPuKOZU9jnMjIAs + default_config_hash: t9Snbb4MC_KirnQlJczWXGnePYD5xGG8c7g2B4kuu-Y id: site_admin label: 'Site admin' weight: -6 @@ -117,7 +119,9 @@ permissions: - 'create url aliases' - 'create users' - 'create webform' + - 'create webform content' - 'delete any accordion block content' + - 'delete any archive_page content' - 'delete any book content' - 'delete any builder_page content' - 'delete any card block content' @@ -143,10 +147,12 @@ permissions: - 'delete any webform' - 'delete any webform content' - 'delete any webform submission' + - 'delete archive_page revisions' - 'delete book revisions' - 'delete builder_page revisions' - 'delete files' - 'delete news revisions' + - 'delete own archive_page content' - 'delete own book content' - 'delete own builder_page content' - 'delete own file media' @@ -163,6 +169,7 @@ permissions: - 'delete webform revisions' - 'delete webform submissions any node' - 'delete webform submissions own node' + - 'edit any archive_page content' - 'edit any book content' - 'edit any builder_page content' - 'edit any file media' @@ -173,6 +180,7 @@ permissions: - 'edit any webform' - 'edit any webform content' - 'edit any webform submission' + - 'edit own archive_page content' - 'edit own book content' - 'edit own builder_page content' - 'edit own file media' @@ -193,6 +201,7 @@ permissions: - 'perform search only' - 'rabbit hole bypass media' - 'replicate entities' + - 'revert archive_page revisions' - 'revert book revisions' - 'revert builder_page revisions' - 'revert news revisions' @@ -220,6 +229,7 @@ permissions: - 'use editorial transition create_new_draft' - 'use editorial transition publish' - 'use editorial transition unpublish' + - 'use text format archive' - 'use text format block_body' - 'use text format minimal' - 'use text format simple' @@ -227,6 +237,7 @@ permissions: - 'use text format webform' - 'view any unpublished content' - 'view any webform submission' + - 'view archive_page revisions' - 'view book revisions' - 'view builder_page revisions' - 'view latest version' diff --git a/config/sync/user.role.viewer.yml b/config/sync/user.role.viewer.yml index b44484e4a..1780adcd7 100644 --- a/config/sync/user.role.viewer.yml +++ b/config/sync/user.role.viewer.yml @@ -3,10 +3,12 @@ langcode: en status: true dependencies: config: + - node.type.archive_page - node.type.book - node.type.builder_page - node.type.news - node.type.person + - node.type.webform module: - content_moderation - contextual @@ -33,6 +35,7 @@ permissions: - 'access site in maintenance mode' - 'access toolbar' - 'view any unpublished content' + - 'view archive_page revisions' - 'view book revisions' - 'view builder_page revisions' - 'view latest version' @@ -42,5 +45,6 @@ permissions: - 'view person revisions' - 'view the administration theme' - 'view unpublished paragraphs' + - 'view webform revisions' - 'view webform submissions any node' - 'view webform submissions own node' diff --git a/config/sync/webform.settings.yml b/config/sync/webform.settings.yml index e81198d97..d5e2ce8f3 100644 --- a/config/sync/webform.settings.yml +++ b/config/sync/webform.settings.yml @@ -3,6 +3,7 @@ _core: langcode: en settings: default_status: open + default_categories: { } default_page: true default_page_base_path: /form default_ajax: true @@ -46,6 +47,7 @@ settings: default_draft_pending_multiple_message: '

You have pending drafts for this webform. View your pending drafts.

' default_confirmation_message: '

New submission added to [webform:title].

' default_confirmation_back_label: 'Back to form' + default_confirmation_noindex: true default_limit_total_message: '

No more submissions are permitted.

' default_limit_user_message: '

No more submissions are permitted.

' default_submission_label: '[webform_submission:submitted-to]: Submission #[webform_submission:serial]' @@ -257,9 +259,15 @@ export: header_prefix: true header_prefix_key_delimiter: __ header_prefix_label_delimiter: ': ' + entity_reference_items: + - id + - title + - url options_single_format: compact options_multiple_format: compact options_item_format: label + likert_answers_format: label + signature_format: status composite_element_item_format: label excluded_exporters: { } handler: diff --git a/web/modules/custom/features/herbie_archive_page/config/install/core.base_field_override.node.archive_page.promote.yml b/web/modules/custom/features/herbie_archive_page/config/install/core.base_field_override.node.archive_page.promote.yml new file mode 100644 index 000000000..372c43bb3 --- /dev/null +++ b/web/modules/custom/features/herbie_archive_page/config/install/core.base_field_override.node.archive_page.promote.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - node.type.archive_page +id: node.archive_page.promote +field_name: promote +entity_type: node +bundle: archive_page +label: 'Promoted to front page' +description: '' +required: false +translatable: true +default_value: + - + value: 0 +default_value_callback: '' +settings: + on_label: 'On' + off_label: 'Off' +field_type: boolean diff --git a/web/modules/custom/features/herbie_archive_page/config/install/core.entity_form_display.node.archive_page.default.yml b/web/modules/custom/features/herbie_archive_page/config/install/core.entity_form_display.node.archive_page.default.yml new file mode 100644 index 000000000..722a74698 --- /dev/null +++ b/web/modules/custom/features/herbie_archive_page/config/install/core.entity_form_display.node.archive_page.default.yml @@ -0,0 +1,88 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.archive_page.archive_page_body + - node.type.archive_page + module: + - content_moderation + - path + - text +id: node.archive_page.default +targetEntityType: node +bundle: archive_page +mode: default +content: + archive_page_body: + type: text_textarea_with_summary + weight: 121 + region: content + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + show_summary: false + third_party_settings: { } + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + moderation_state: + type: moderation_state_default + weight: 100 + region: content + settings: { } + third_party_settings: { } + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + weight: 15 + region: content + settings: + display_label: true + third_party_settings: { } + status: + type: boolean_checkbox + weight: 120 + region: content + settings: + display_label: true + third_party_settings: { } + sticky: + type: boolean_checkbox + weight: 16 + region: content + settings: + display_label: true + third_party_settings: { } + title: + type: string_textfield + weight: -5 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + region: content + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } + url_redirects: + weight: 50 + region: content + settings: { } + third_party_settings: { } +hidden: { } diff --git a/web/modules/custom/features/herbie_archive_page/config/install/core.entity_view_display.node.archive_page.default.yml b/web/modules/custom/features/herbie_archive_page/config/install/core.entity_view_display.node.archive_page.default.yml new file mode 100644 index 000000000..55e9f323d --- /dev/null +++ b/web/modules/custom/features/herbie_archive_page/config/install/core.entity_view_display.node.archive_page.default.yml @@ -0,0 +1,32 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.archive_page.archive_page_body + - node.type.archive_page + module: + - text + - user +id: node.archive_page.default +targetEntityType: node +bundle: archive_page +mode: default +content: + archive_page_body: + type: text_default + label: hidden + settings: { } + third_party_settings: { } + weight: 101 + region: content + content_moderation_control: + settings: { } + third_party_settings: { } + weight: -20 + region: content + links: + settings: { } + third_party_settings: { } + weight: 100 + region: content +hidden: { } diff --git a/web/modules/custom/features/herbie_archive_page/config/install/core.entity_view_display.node.archive_page.teaser.yml b/web/modules/custom/features/herbie_archive_page/config/install/core.entity_view_display.node.archive_page.teaser.yml new file mode 100644 index 000000000..c43734baf --- /dev/null +++ b/web/modules/custom/features/herbie_archive_page/config/install/core.entity_view_display.node.archive_page.teaser.yml @@ -0,0 +1,26 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.archive_page.archive_page_body + - node.type.archive_page + module: + - user +id: node.archive_page.teaser +targetEntityType: node +bundle: archive_page +mode: teaser +content: + content_moderation_control: + settings: { } + third_party_settings: { } + weight: -20 + region: content + links: + settings: { } + third_party_settings: { } + weight: 100 + region: content +hidden: + archive_page_body: true diff --git a/web/modules/custom/features/herbie_archive_page/config/install/editor.editor.archive.yml b/web/modules/custom/features/herbie_archive_page/config/install/editor.editor.archive.yml new file mode 100644 index 000000000..08c7f11d0 --- /dev/null +++ b/web/modules/custom/features/herbie_archive_page/config/install/editor.editor.archive.yml @@ -0,0 +1,89 @@ +langcode: en +status: true +dependencies: + config: + - filter.format.archive + module: + - ckeditor5 +format: archive +editor: ckeditor5 +settings: + toolbar: + items: + - sourceEditing + - '|' + - bold + - italic + - strikethrough + - alignment + - '|' + - link + - '|' + - bulletedList + - numberedList + - '|' + - drupalMedia + - blockQuote + - insertTable + - '|' + - heading + - '|' + - superscript + - subscript + - specialCharacters + - '|' + - horizontalLine + - '|' + - style + plugins: + ckeditor5_alignment: + enabled_alignments: + - center + - left + ckeditor5_heading: + enabled_headings: + - heading2 + - heading3 + - heading4 + - heading5 + - heading6 + ckeditor5_list: + reversed: false + startIndex: true + ckeditor5_sourceEditing: + allowed_tags: { } + ckeditor5_style: + styles: + - + label: 'Extra small' + element: '

' + - + label: Small + element: '

' + - + label: Large + element: '

' + - + label: 'Primary Button' + element: '' + - + label: 'Secondary Button' + element: '' + - + label: 'Tertiary Button' + element: '' + - + label: 'Inverse Primary Button' + element: '' + - + label: 'Inverse Secondary Button' + element: '' + - + label: 'Inverse Tertiary Button' + element: '' + linkit_extension: + linkit_enabled: true + linkit_profile: standard + media_media: + allow_view_mode_override: true +image_upload: { } diff --git a/web/modules/custom/features/herbie_archive_page/config/install/field.field.node.archive_page.archive_page_body.yml b/web/modules/custom/features/herbie_archive_page/config/install/field.field.node.archive_page.archive_page_body.yml new file mode 100644 index 000000000..ee007308b --- /dev/null +++ b/web/modules/custom/features/herbie_archive_page/config/install/field.field.node.archive_page.archive_page_body.yml @@ -0,0 +1,27 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.archive_page_body + - node.type.archive_page + module: + - allowed_formats + - text +third_party_settings: + allowed_formats: + allowed_formats: + - archive +id: node.archive_page.archive_page_body +field_name: archive_page_body +entity_type: node +bundle: archive_page +label: Body +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + display_summary: true + required_summary: false +field_type: text_with_summary diff --git a/web/modules/custom/features/herbie_archive_page/config/install/field.storage.node.archive_page_body.yml b/web/modules/custom/features/herbie_archive_page/config/install/field.storage.node.archive_page_body.yml new file mode 100644 index 000000000..fdfaca37d --- /dev/null +++ b/web/modules/custom/features/herbie_archive_page/config/install/field.storage.node.archive_page_body.yml @@ -0,0 +1,18 @@ +langcode: en +status: true +dependencies: + module: + - node + - text +id: node.archive_page_body +field_name: archive_page_body +entity_type: node +type: text_with_summary +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/web/modules/custom/features/herbie_archive_page/config/install/filter.format.archive.yml b/web/modules/custom/features/herbie_archive_page/config/install/filter.format.archive.yml new file mode 100644 index 000000000..67686ef8c --- /dev/null +++ b/web/modules/custom/features/herbie_archive_page/config/install/filter.format.archive.yml @@ -0,0 +1,112 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.media.narrow + - core.entity_view_mode.media.wide + module: + - codemirror_editor + - dcf_ckeditor5 + - editor + - linkit + - media +name: Archive +format: archive +weight: 0 +filters: + filter_dcfckeditor5: + id: filter_dcfckeditor5 + provider: dcf_ckeditor5 + status: false + weight: -43 + settings: + dcftable: '0' + filter_html: + id: filter_html + provider: filter + status: false + weight: -46 + settings: + allowed_html: '

' + filter_html_help: true + filter_html_nofollow: false + media_embed: + id: media_embed + provider: media + status: true + weight: -47 + settings: + default_view_mode: narrow + allowed_view_modes: + default: default + narrow: narrow + wide: wide + allowed_media_types: + image: image + instagram: instagram + remote_video: remote_video + codemirror_editor: + id: codemirror_editor + provider: codemirror_editor + status: false + weight: -44 + settings: + lineWrapping: false + lineNumbers: true + foldGutter: false + filter_url: + id: filter_url + provider: filter + status: false + weight: -40 + settings: + filter_url_length: 72 + linkit: + id: linkit + provider: linkit + status: true + weight: -48 + settings: + title: false + filter_align: + id: filter_align + provider: filter + status: true + weight: -50 + settings: { } + filter_caption: + id: filter_caption + provider: filter + status: true + weight: -49 + settings: { } + editor_file_reference: + id: editor_file_reference + provider: editor + status: false + weight: -42 + settings: { } + filter_html_image_secure: + id: filter_html_image_secure + provider: filter + status: false + weight: -39 + settings: { } + filter_autop: + id: filter_autop + provider: filter + status: false + weight: -41 + settings: { } + filter_htmlcorrector: + id: filter_htmlcorrector + provider: filter + status: false + weight: -38 + settings: { } + filter_html_escape: + id: filter_html_escape + provider: filter + status: false + weight: -45 + settings: { } diff --git a/web/modules/custom/features/herbie_archive_page/config/install/node.type.archive_page.yml b/web/modules/custom/features/herbie_archive_page/config/install/node.type.archive_page.yml new file mode 100644 index 000000000..498cfd079 --- /dev/null +++ b/web/modules/custom/features/herbie_archive_page/config/install/node.type.archive_page.yml @@ -0,0 +1,17 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'Temporary transition page' +type: archive_page +description: 'A page of HTML markup that has been imported from a Drupal 7 site.' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: false diff --git a/web/modules/custom/features/herbie_archive_page/herbie_archive_page.features.yml b/web/modules/custom/features/herbie_archive_page/herbie_archive_page.features.yml new file mode 100644 index 000000000..c3ef3e002 --- /dev/null +++ b/web/modules/custom/features/herbie_archive_page/herbie_archive_page.features.yml @@ -0,0 +1,2 @@ +bundle: herbie +required: true diff --git a/web/modules/custom/features/herbie_archive_page/herbie_archive_page.info.yml b/web/modules/custom/features/herbie_archive_page/herbie_archive_page.info.yml new file mode 100644 index 000000000..dfa5987e7 --- /dev/null +++ b/web/modules/custom/features/herbie_archive_page/herbie_archive_page.info.yml @@ -0,0 +1,23 @@ +name: 'Archive page' +type: module +core_version_requirement: '^9.4 || ^10' +dependencies: + - 'allowed_formats:allowed_formats' + - 'codemirror_editor:codemirror_editor' + - 'dcf_ckeditor5:dcf_ckeditor5' + - 'drupal:ckeditor5' + - 'drupal:content_moderation' + - 'drupal:editor' + - 'drupal:field' + - 'drupal:filter' + - 'drupal:media' + - 'drupal:menu_ui' + - 'drupal:node' + - 'drupal:path' + - 'drupal:text' + - 'drupal:user' + - 'herbie_media_types:herbie_media_types' + - 'linkit:linkit' +version: 1.0.0 +package: Herbie +description: 'Provides Temporary transition page (Archive page) content type and related configuration. ' diff --git a/web/modules/custom/features/herbie_roles/config/install/user.role.administrator.yml b/web/modules/custom/features/herbie_roles/config/install/user.role.administrator.yml index ada8c7069..14c7af88f 100644 --- a/web/modules/custom/features/herbie_roles/config/install/user.role.administrator.yml +++ b/web/modules/custom/features/herbie_roles/config/install/user.role.administrator.yml @@ -3,6 +3,7 @@ status: true dependencies: config: - core.entity_view_display.node.builder_page.default + - filter.format.archive - filter.format.block_body - filter.format.html_code - filter.format.minimal @@ -12,6 +13,7 @@ dependencies: - media.type.file - media.type.image - media.type.remote_video + - node.type.archive_page - node.type.book - node.type.builder_page - node.type.news @@ -139,7 +141,9 @@ permissions: - 'create url aliases' - 'create users' - 'create webform' + - 'create webform content' - 'delete any accordion block content' + - 'delete any archive_page content' - 'delete any book content' - 'delete any builder_page content' - 'delete any card block content' @@ -166,10 +170,12 @@ permissions: - 'delete any webform' - 'delete any webform content' - 'delete any webform submission' + - 'delete archive_page revisions' - 'delete book revisions' - 'delete builder_page revisions' - 'delete files' - 'delete news revisions' + - 'delete own archive_page content' - 'delete own book content' - 'delete own builder_page content' - 'delete own file media' @@ -186,6 +192,7 @@ permissions: - 'delete webform revisions' - 'delete webform submissions any node' - 'delete webform submissions own node' + - 'edit any archive_page content' - 'edit any book content' - 'edit any builder_page content' - 'edit any file media' @@ -196,6 +203,7 @@ permissions: - 'edit any webform' - 'edit any webform content' - 'edit any webform submission' + - 'edit own archive_page content' - 'edit own book content' - 'edit own builder_page content' - 'edit own file media' @@ -218,6 +226,7 @@ permissions: - 'perform search only' - 'rabbit hole bypass media' - 'replicate entities' + - 'revert archive_page revisions' - 'revert book revisions' - 'revert builder_page revisions' - 'revert news revisions' @@ -247,6 +256,7 @@ permissions: - 'use editorial transition create_new_draft' - 'use editorial transition publish' - 'use editorial transition unpublish' + - 'use text format archive' - 'use text format block_body' - 'use text format html_code' - 'use text format minimal' @@ -255,6 +265,7 @@ permissions: - 'use text format webform' - 'view any unpublished content' - 'view any webform submission' + - 'view archive_page revisions' - 'view book revisions' - 'view builder_page revisions' - 'view latest version' diff --git a/web/modules/custom/features/herbie_roles/config/install/user.role.editor.yml b/web/modules/custom/features/herbie_roles/config/install/user.role.editor.yml index 0bfd0081d..525cf267a 100644 --- a/web/modules/custom/features/herbie_roles/config/install/user.role.editor.yml +++ b/web/modules/custom/features/herbie_roles/config/install/user.role.editor.yml @@ -3,6 +3,7 @@ status: true dependencies: config: - core.entity_view_display.node.builder_page.default + - filter.format.archive - filter.format.block_body - filter.format.minimal - filter.format.simple @@ -11,6 +12,7 @@ dependencies: - media.type.file - media.type.image - media.type.remote_video + - node.type.archive_page - node.type.book - node.type.builder_page - node.type.news @@ -105,9 +107,11 @@ permissions: - 'delete any tabs block content' - 'delete any tandem block content' - 'delete any timeline block content' + - 'delete archive_page revisions' - 'delete book revisions' - 'delete builder_page revisions' - 'delete news revisions' + - 'delete own archive_page content' - 'delete own book content' - 'delete own builder_page content' - 'delete own file media' @@ -119,6 +123,7 @@ permissions: - 'delete person revisions' - 'delete unl_directory_entry external entity' - 'delete webform revisions' + - 'edit any archive_page content' - 'edit any book content' - 'edit any builder_page content' - 'edit any file media' @@ -127,6 +132,7 @@ permissions: - 'edit any person content' - 'edit any remote_video media' - 'edit any webform content' + - 'edit own archive_page content' - 'edit own book content' - 'edit own builder_page content' - 'edit own file media' @@ -140,6 +146,7 @@ permissions: - 'perform search only' - 'rabbit hole bypass media' - 'replicate entities' + - 'revert archive_page revisions' - 'revert book revisions' - 'revert builder_page revisions' - 'revert news revisions' @@ -164,6 +171,7 @@ permissions: - 'use editorial transition create_new_draft' - 'use editorial transition publish' - 'use editorial transition unpublish' + - 'use text format archive' - 'use text format block_body' - 'use text format minimal' - 'use text format simple' @@ -171,6 +179,7 @@ permissions: - 'use text format webform' - 'view any unpublished content' - 'view any webform submission' + - 'view archive_page revisions' - 'view book revisions' - 'view builder_page revisions' - 'view latest version' diff --git a/web/modules/custom/features/herbie_roles/config/install/user.role.site_admin.yml b/web/modules/custom/features/herbie_roles/config/install/user.role.site_admin.yml index e6427064d..90289f3c7 100644 --- a/web/modules/custom/features/herbie_roles/config/install/user.role.site_admin.yml +++ b/web/modules/custom/features/herbie_roles/config/install/user.role.site_admin.yml @@ -3,6 +3,7 @@ status: true dependencies: config: - core.entity_view_display.node.builder_page.default + - filter.format.archive - filter.format.block_body - filter.format.minimal - filter.format.simple @@ -11,6 +12,7 @@ dependencies: - media.type.file - media.type.image - media.type.remote_video + - node.type.archive_page - node.type.book - node.type.builder_page - node.type.news @@ -114,7 +116,9 @@ permissions: - 'create url aliases' - 'create users' - 'create webform' + - 'create webform content' - 'delete any accordion block content' + - 'delete any archive_page content' - 'delete any book content' - 'delete any builder_page content' - 'delete any card block content' @@ -140,10 +144,12 @@ permissions: - 'delete any webform' - 'delete any webform content' - 'delete any webform submission' + - 'delete archive_page revisions' - 'delete book revisions' - 'delete builder_page revisions' - 'delete files' - 'delete news revisions' + - 'delete own archive_page content' - 'delete own book content' - 'delete own builder_page content' - 'delete own file media' @@ -160,6 +166,7 @@ permissions: - 'delete webform revisions' - 'delete webform submissions any node' - 'delete webform submissions own node' + - 'edit any archive_page content' - 'edit any book content' - 'edit any builder_page content' - 'edit any file media' @@ -170,6 +177,7 @@ permissions: - 'edit any webform' - 'edit any webform content' - 'edit any webform submission' + - 'edit own archive_page content' - 'edit own book content' - 'edit own builder_page content' - 'edit own file media' @@ -190,6 +198,7 @@ permissions: - 'perform search only' - 'rabbit hole bypass media' - 'replicate entities' + - 'revert archive_page revisions' - 'revert book revisions' - 'revert builder_page revisions' - 'revert news revisions' @@ -217,6 +226,7 @@ permissions: - 'use editorial transition create_new_draft' - 'use editorial transition publish' - 'use editorial transition unpublish' + - 'use text format archive' - 'use text format block_body' - 'use text format minimal' - 'use text format simple' @@ -224,6 +234,7 @@ permissions: - 'use text format webform' - 'view any unpublished content' - 'view any webform submission' + - 'view archive_page revisions' - 'view book revisions' - 'view builder_page revisions' - 'view latest version' diff --git a/web/modules/custom/features/herbie_roles/config/install/user.role.viewer.yml b/web/modules/custom/features/herbie_roles/config/install/user.role.viewer.yml index 56f55dce3..dd5c611db 100644 --- a/web/modules/custom/features/herbie_roles/config/install/user.role.viewer.yml +++ b/web/modules/custom/features/herbie_roles/config/install/user.role.viewer.yml @@ -2,10 +2,12 @@ langcode: en status: true dependencies: config: + - node.type.archive_page - node.type.book - node.type.builder_page - node.type.news - node.type.person + - node.type.webform module: - content_moderation - contextual @@ -30,6 +32,7 @@ permissions: - 'access site in maintenance mode' - 'access toolbar' - 'view any unpublished content' + - 'view archive_page revisions' - 'view book revisions' - 'view builder_page revisions' - 'view latest version' @@ -39,5 +42,6 @@ permissions: - 'view person revisions' - 'view the administration theme' - 'view unpublished paragraphs' + - 'view webform revisions' - 'view webform submissions any node' - 'view webform submissions own node' diff --git a/web/modules/custom/features/herbie_roles/herbie_roles.info.yml b/web/modules/custom/features/herbie_roles/herbie_roles.info.yml index e85bc6720..be8ba58b9 100644 --- a/web/modules/custom/features/herbie_roles/herbie_roles.info.yml +++ b/web/modules/custom/features/herbie_roles/herbie_roles.info.yml @@ -30,6 +30,7 @@ dependencies: - 'field_css:field_css' - 'file_delete:file_delete' - 'google_analytics:google_analytics' + - 'herbie_archive_page:herbie_archive_page' - 'herbie_builder_page:herbie_builder_page' - 'herbie_media_types:herbie_media_types' - 'herbie_news:herbie_news' @@ -50,5 +51,5 @@ dependencies: - 'webform:webform' - 'webform:webform_node' - 'webform:webform_submission_log' -version: 1.3.0 +version: 1.3.2 package: Herbie diff --git a/web/modules/custom/unl_archive_page_import/src/Form/ImportForm.php b/web/modules/custom/unl_archive_page_import/src/Form/ImportForm.php new file mode 100644 index 000000000..4fd004f55 --- /dev/null +++ b/web/modules/custom/unl_archive_page_import/src/Form/ImportForm.php @@ -0,0 +1,377 @@ +This tool imports pages from a sunsetting Drupal 7 site into this site. Instructions available at cms-docs.unl.edu.

'; + $form['base_url'] = [ + '#type' => 'textfield', + '#title' => $this->t('Base URL of the site being imported from.'), + '#required' => TRUE, + '#description' => $this->t('Example: https://example.unl.edu/'), + ]; + $form['sitemap'] = [ + '#type' => 'textfield', + '#title' => $this->t('Option #1: Path to XML sitemap of pages to import.'), + '#required' => FALSE, + '#description' => $this->t('Example: https://example.unl.edu/sitemap.xml'), + ]; + $form['url'] = [ + '#type' => 'textfield', + '#title' => $this->t('Option #2: Single URL of a page to import.'), + '#required' => FALSE, + '#description' => $this->t('Example: https://example.unl.edu/sample-page'), + ]; + $form['actions'] = array( + '#type' => 'actions', + 'submit' => array( + '#type' => 'submit', + '#value' => 'Start the import', + ), + ); + + return $form; + } + + /** + * {@inheritdoc} + */ + public function submitForm(array &$form, FormStateInterface $form_state) { + $base_url = $form_state->getValue('base_url'); + $base_url = trim($base_url, '/') . '/'; + $base_url = str_replace('http://', 'https://', $base_url); + + $batch = [ + 'title' => t('Importing pages'), + 'operations' => [], + 'init_message' => t('Import process is starting.'), + 'progress_message' => t('Processed @current out of @total. Estimated time: @estimate.'), + 'error_message' => t('The process has encountered an error.'), + ]; + + $sitemap = $form_state->getValue('sitemap'); + if ($sitemap) { + $request = \Drupal::httpClient()->get($sitemap); + $body = $request->getBody(); + $site_map = simplexml_load_string($body); + + foreach ($site_map->url as $item) { + $url = (string) $item->loc; + $alias = substr($url, strlen($base_url) - 1); + $batch['operations'][] = [ + ['\Drupal\unl_archive_page_import\Form\ImportForm', 'importPage'], + [$url, $alias, $base_url] + ]; + } + } + elseif ($url = $form_state->getValue('url')) { + $alias = substr($url, strlen($base_url) - 1); + $batch['operations'][] = [ + ['\Drupal\unl_archive_page_import\Form\ImportForm', 'importPage'], + [$url, $alias, $base_url] + ]; + } + else { + // @TODO Display a message to the user that they need to enter something. + return; + } + + batch_set($batch); + \Drupal::messenger()->addMessage('Success!'); + + $form_state->setRebuild(TRUE); + } + + /** + * @param $entity + * Deletes an entity + */ + public static function importPage($url, $alias, $base_url, &$context) { + $media_added = []; + + $request = \Drupal::httpClient()->get($url); + $body = $request->getBody(); + if (!$body) { + $context['message'] = t('The page at ' . $url . ' is empty. Ignoring.'); + return false; + } + + $dom = new DOMDocument(); + if (!@$dom->loadHTML($body)) { + return false; + } + $xpath = new DOMXpath($dom); + + // Check to see if there's a base tag on this page. +// $base_tags = $dom->getElementsByTagName('base'); +// $page_base = NULL; +// if ($base_tags->length > 0) { +// $page_base = $base_tags->item(0)->getAttribute('href'); +// } + + // Page title. + $title = $url; + $nodes = $xpath->query("//header[@id='dcf-page-title']/h1//text()"); + if ($nodes->length > 0) { + $title = $dom->saveHTML($nodes->item(0)); + } + + // Get the Main Content html for the Body field. + $nodes = $xpath->query("//div[contains(@class, 'dcf-main-content')]"); + if (!$maincontentNode = $nodes->item(0)) { + return false; + } + + + + + /** + * Process images. + */ + $imageNodes = $maincontentNode->getElementsByTagName('img'); + foreach ($imageNodes as $imageNode) { + $src = $imageNode->getAttribute('src'); + $file_name = explode("/", $src); + $file_name = end($file_name); + $file_name = explode("?", $file_name); + $file_name = $file_name[0]; + + // Check if image is local or external and skip if the later. + $base_url_http = str_replace('https://', 'http://', $base_url); + if (strpos($src, 'http://') === false && strpos($src, 'https://') === false) { + // Local file. + $src = $base_url . $src; + } + elseif (strpos($src, $base_url) === false && strpos($src, $base_url_http) === false) { + // This is a URL to an external site so skip touching it. + continue; + } + + // Check if image already exists. + $file = \Drupal::entityTypeManager() + ->getStorage('file') + ->loadByProperties(['filename' => $file_name]); + + if ($file) { + // Get existing Media entity. + $fileId = array_shift($file)->id(); + $media = \Drupal::entityTypeManager() + ->getStorage('media') + ->loadByProperties(['field_media_image' => $fileId]); + if (!$media) { + $media = \Drupal::entityTypeManager() + ->getStorage('media') + ->loadByProperties(['field_media_file' => $fileId]); + } + $media = reset($media); + } + else { + // Download the file and create a new Media entity. + $file_data = file_get_contents($src); + $destination = 'public://media/image'; + \Drupal::service('file_system')->prepareDirectory($destination, FileSystemInterface::CREATE_DIRECTORY); + $file = \Drupal::service('file.repository') + ->writeData($file_data, 'public://media/image/' . $file_name, FileSystemInterface::EXISTS_REPLACE); + + $alt = $imageNode->getAttribute('alt'); + $alt = substr($alt, 0, 500); + + // Get the ID of the "archive_import" media tag (or create it) that all imported files will be assigned. + $storage = \Drupal::entityTypeManager()->getStorage('taxonomy_term'); + $found_terms = $storage->loadByProperties([ + 'name' => 'archive_import', + 'vid' => 'media_tags', + ]); + $term = reset($found_terms); + if (!$term) { + $term = Term::create([ + 'name' => 'archive_import', + 'vid' => 'media_tags', + ]); + $term->save(); + } + + $media = Media::create([ + 'bundle' => 'image', + 'uid' => \Drupal::currentUser()->id(), + 'field_media_image' => [ + 'target_id' => $file->id(), + 'alt' => $alt, + ], + 's_m_tags' => [ + 'target_id' => $term->id(), + ], + ]); + $media->setName($file_name) + ->setPublished(TRUE) + ->save(); + } + + // Get the URL of the media item. + if ($media->field_media_image) { + $media_src = $media->field_media_image->entity->getFileUri(); + } + else { + $media_src = $media->field_media_file->entity->getFileUri(); + } + $media_src = \Drupal::service('file_url_generator')->generateString($media_src); + + // Replace the imported img tag src with the path to the new media item. + $imageNode->setAttribute('src', $media_src); + $media_added[] = $media; + } + + + + + /** + * Process links to files. + */ + $linkNodes = $maincontentNode->getElementsByTagName('a'); + foreach ($linkNodes as $a) { + $href = $a->getAttribute('href'); + $file_name = explode("/", $href); + $file_name = end($file_name); + $file_name = explode("?", $file_name); + $file_name = $file_name[0]; + + // Check if link is local or external and skip if the later. + $base_url_http = str_replace('https://', 'http://', $base_url); + if (strpos($href, 'http://') === false && strpos($href, 'https://') === false) { + // Local link. + $href = $base_url . $href; + } + elseif (strpos($href, $base_url) === false && strpos($href, $base_url_http) === false) { + // This is a URL to an external site so skip touching it. + continue; + } + + $response = \Drupal::httpClient()->head($href, ['http_errors' => false]); + $content_type = $response->getHeader('Content-Type'); + if (strpos($content_type[0], 'html') !== false) { + // Link to an HTML page, skip it. + continue; + } + + // Check if file already exists. + $file = \Drupal::entityTypeManager() + ->getStorage('file') + ->loadByProperties(['filename' => $file_name]); + + if ($file) { + // Get existing Media entity. + $fileId = array_shift($file)->id(); + $media = \Drupal::entityTypeManager() + ->getStorage('media') + ->loadByProperties(['field_media_file' => $fileId]); + if (!$media) { + $media = \Drupal::entityTypeManager() + ->getStorage('media') + ->loadByProperties(['field_media_image' => $fileId]); + } + $media = reset($media); + } + else { + // Download the file and create a new Media entity. + $file_data = file_get_contents($href); + $destination = 'public://media/file'; + \Drupal::service('file_system')->prepareDirectory($destination, FileSystemInterface::CREATE_DIRECTORY); + $file = \Drupal::service('file.repository') + ->writeData($file_data, 'public://media/file/' . $file_name, FileSystemInterface::EXISTS_REPLACE); + + // Get the ID of the "archive_import" media tag (or create it) that all imported files will be assigned. + $storage = \Drupal::entityTypeManager()->getStorage('taxonomy_term'); + $found_terms = $storage->loadByProperties([ + 'name' => 'archive_import', + 'vid' => 'media_tags', + ]); + $term = reset($found_terms); + if (!$term) { + $term = Term::create([ + 'name' => 'archive_import', + 'vid' => 'media_tags', + ]); + $term->save(); + } + + $media = Media::create([ + 'bundle' => 'file', + 'uid' => \Drupal::currentUser()->id(), + 'field_media_file' => [ + 'target_id' => $file->id(), + ], + 's_m_tags' => [ + 'target_id' => $term->id(), + ], + ]); + $media->setName($file_name) + ->setPublished(TRUE) + ->save(); + } + + // Get the URL of the media item. + if ($media->field_media_file) { + $media_src = $media->field_media_file->entity->getFileUri(); + } + else { + $media_src = $media->field_media_image->entity->getFileUri(); + } + $media_src = \Drupal::service('file_url_generator')->generateString($media_src); + + // Replace the imported link href with the path to the new media item. + $a->setAttribute('href', $media_src); + $media_added[] = $media; + } + + + + + + // Create the Body html source code. + $body = implode(array_map([$maincontentNode->ownerDocument,"saveHTML"], + iterator_to_array($maincontentNode->childNodes))); + + // Create a node. + $entity = Node::create([ + 'type' => 'archive_page', + 'title' => $title, + 'archive_page_body' => [['value' => $body, 'format' => 'archive']], + 'path' => [ + 'alias' => $alias, + 'pathauto' => PathautoState::SKIP, + ], + ] + ); + $entity->save(); + + foreach ($media_added as $media) { + \Drupal::service('entity_usage.usage')->registerUsage($media->id(), $media->getEntityTypeId(), $entity->id(), $entity->getEntityTypeId(), 'en', 1, 'entity_reference', 'archive_page_body'); + } + + $context['results'][] = $url; + $context['message'] = t('Imported @title', array('@title' => $url)); + } + +} diff --git a/web/modules/custom/unl_archive_page_import/unl_archive_page_import.info.yml b/web/modules/custom/unl_archive_page_import/unl_archive_page_import.info.yml new file mode 100644 index 000000000..c64e27f63 --- /dev/null +++ b/web/modules/custom/unl_archive_page_import/unl_archive_page_import.info.yml @@ -0,0 +1,9 @@ +name: 'Archive page importer' +package: UNL +type: module +description: 'Import pages from a Drupal 7 site into Temporary transition page type.' +core_version_requirement: ^9 || ^10 +dependencies: + - drupal:media + - drupal:node + - entity_usage:entity_usage diff --git a/web/modules/custom/unl_archive_page_import/unl_archive_page_import.links.menu.yml b/web/modules/custom/unl_archive_page_import/unl_archive_page_import.links.menu.yml new file mode 100644 index 000000000..92d997b45 --- /dev/null +++ b/web/modules/custom/unl_archive_page_import/unl_archive_page_import.links.menu.yml @@ -0,0 +1,6 @@ +unl_archive_page_import.batchimport: + title: 'UNL Transition page import' + parent: system.admin_config_development + description: 'Import pages from a Drupal 7 UNLcms website.' + route_name: unl_archive_page_import.batchimport + weight: 30 diff --git a/web/modules/custom/unl_archive_page_import/unl_archive_page_import.module b/web/modules/custom/unl_archive_page_import/unl_archive_page_import.module new file mode 100644 index 000000000..b3d9bbc7f --- /dev/null +++ b/web/modules/custom/unl_archive_page_import/unl_archive_page_import.module @@ -0,0 +1 @@ +hasPermission('create builder_page content')) { + elseif ($entity_bundle !== 'archive_page' && + $account->hasPermission('create builder_page content')) { // Using 'create builder_page content' as the base permission for any // custom content type that may get created. Because all permissions are // being managed with the herbie_roles feature, if a site creates a content