stepbystep:drupal

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
stepbystep:drupal [2021/03/06 21:59]
giancarlo [Basic configuration]
stepbystep:drupal [2021/03/11 18:22] (current)
giancarlo
Line 6: Line 6:
   * [[stepbystep:baseservices|Base services]]   * [[stepbystep:baseservices|Base services]]
   * [[stepbystep:drupal|Drupal 9]]   * [[stepbystep:drupal|Drupal 9]]
 +  * [[stepbystep:archi1|Archipelago]]
 +  * [[stepbystep:maintenance|Maintenance]]
 </nav> </nav>
 ====== Drupal 9 ====== ====== Drupal 9 ======
Line 188: Line 190:
 config:export --destination=/home/user/backup config:export --destination=/home/user/backup
 config:import --partial --source=/home/user/upload config:import --partial --source=/home/user/upload
 +</code>
 +=== Enable composer patch ===
 +To be able to apply patch with composer we need:
 +<code bash>
 +$ composer require cweagans/composer-patches
 +  - Installing cweagans/composer-patches (1.7.0): Extracting archive
 </code> </code>
 === Private filesystem === === Private filesystem ===
Line 339: Line 347:
 </code> </code>
 [we need to come back here after Strawberryfield installed] [we need to come back here after Strawberryfield installed]
 +Then Reindexing (browse UI at admin/config/search/search-api/index/drupal_content_to_solr_8)
 +\\
 +Fields will be added after Srawberryfield installed (dmin/config/search/search-api/index/drupal_content_to_solr_8/fields)
 +=== Views ===
 +<code bash>
 +$ composer require 'drupal/views_bootstrap:^4.3'
 +  - Installing drupal/views_bootstrap (4.3.0): Extracting archive
 +$ vendor/bin/drush en views views_ui views_bootstrap
 +</code>
 +=== Webform ===
 +<code bash>
 +$ composer require 'drupal/webform:^6'
 +  - Installing drupal/webform (6.0.2): Extracting archive
 +$ vendor/bin/drush en webform webform_bootstrap webform_image_select webform_node webform_ui
 +Successfully enabled: webform, webform_bootstrap, webform_image_select, webform_node, webform_ui, path
  
 +$ composer require 'drupal/webformnavigation:^1.0@alpha'
 +  - Installing drupal/webform_submission_log (6.0.2)
 +  - Installing drupal/webformnavigation (1.0.0-alpha11): Extracting archive
 +$ vendor/bin/drush en webformnavigation
 +Successfully enabled: webformnavigation, webform_submission_log
 +</code>
 +To avoid warnings in Status report
 +<code bash>
 +$ composer require 'drupal/recaptcha_element'
 +  - Installing google/recaptcha (1.2.4): Extracting archive
 +  - Installing drupal/recaptcha_element (1.0.5): Extracting archive
 +vendor/bin/drush en recaptcha_element
 +Successfully enabled: recaptcha_element
 +</code>
 +Libraries, see https://www.drupal.org/node/3003140 
 +<code bash>
 +$ composer require wikimedia/composer-merge-plugin
 +  - Installing wikimedia/composer-merge-plugin (v2.0.1)
 +
 +$ nano -w composer.json
 +</code>
 +<code json>
 +    "extra": {
 +        "merge-plugin": {
 +            "include": [
 +                "web/modules/contrib/webform/composer.libraries.json"
 +            ]
 +        },
 +</code>
 +<code bash>
 +$ composer update drupal/webform
 +  - Installing algolia/places (1.19.0): Extracting archive
 +  - Installing choices/choices (9.0.1): Extracting archive
 +  - Installing ckeditor/autogrow (4.14.1): Extracting archive
 +  - Installing ckeditor/codemirror (v1.17.12): Extracting archive
 +  - Installing ckeditor/fakeobjects (4.14.1): Extracting archive
 +  - Installing ckeditor/image (4.14.1): Extracting archive
 +  - Installing ckeditor/link (4.14.1): Extracting archive
 +  - Installing codemirror/codemirror (5.53.2): Extracting archive
 +  - Installing jquery/chosen (1.8.7): Extracting archive
 +  - Installing jquery/geocomplete (1.7.0): Extracting archive
 +  - Installing jquery/hotkeys (0.2.0): Extracting archive
 +  - Installing jquery/icheck (1.0.2 ): Extracting archive
 +  - Installing jquery/image-picker (0.3.1): Extracting archive
 +  - Installing jquery/inputmask (5.0.5): Extracting archive
 +  - Installing jquery/intl-tel-input (16.1.0): Extracting archive
 +  - Installing jquery/rateit (1.1.3): Extracting archive
 +  - Installing jquery/select2 (4.0.13): Extracting archive
 +  - Installing jquery/textcounter (0.9.0): Extracting archive
 +  - Installing jquery/timepicker (1.13.14): Extracting archive
 +  - Installing jquery/toggles (4.0.0): Extracting archive
 +  - Installing progress-tracker/progress-tracker (2.0.6): Extracting archive
 +  - Installing signature_pad/signature_pad (2.3.0): Extracting archive
 +  - Installing svg-pan-zoom/svg-pan-zoom (3.6.1): Extracting archive
 +  - Installing tabby/tabby (12.0.3): Extracting archive
 +  - Installing tippyjs/5.x (5.2.1)
 +  - Installing tippyjs/6.x (6.2.6)
 +</code>
 +=== Form Mode Manager with patches ===
 +Partially follow this post https://www.computerminds.co.uk/articles/apply-drupal-9-compatibility-patches-composer
 +\\
 +Add package source from git to avoid composer block to install
 +<code bash>
 +$ nano -w composer.json
 +</code>
 +<code json>
 +    },
 +    "repositories": [
 +    {
 +      "type": "package",
 +      "package": {
 +        "name": "drupal/form_mode_manager",
 +        "type": "drupal-module",
 +        "version": "dev-8.x-2.x",
 +        "source": {
 +          "type": "git",
 +          "url": "https://git.drupalcode.org/project/form_mode_manager.git",
 +          "reference": "bb634122"
 +        }
 +      }
 +    },
 +</code>
 +Add patch links to composer.json
 +<code json>
 +            "web/themes/custom/{$name}": [
 +                "type:drupal-custom-theme"
 +            ]
 +        },
 +        "enable-patching": true,
 +        "patches": {
 +            "drupal/form_mode_manager": {
 +                "Fix Form Mode title": "https://www.drupal.org/files/issues/2019-12-10/form_mode_manager-bundle-label-in-title-3100112-2-D8.patch",
 +                "D9 readyness": "https://www.drupal.org/files/issues/2020-10-30/form_mode_manager-drupal-9-compatibility-3164478-6.patch"
 +            },
 +            "drupal/role_theme_switcher": {
 +                "D9 readyness": "https://www.drupal.org/files/issues/2020-06-06/role_theme_switcher.1.x-dev.rector.patch"
 +            }
 +        }
 +</code>
 +Then it can be installed and patches applied
 +<code bash>
 +$ composer -v require drupal/form_mode_manager
 + Using version dev-8.x-2.x for drupal/form_mode_manager
 +...
 +  - Installing drupal/form_mode_manager (dev-8.x-2.x bb634122): Cloning bb634122 from cache
 +...
 +  - Applying patches for drupal/form_mode_manager
 +    https://www.drupal.org/files/issues/2019-12-10/form_mode_manager-bundle-label-in-title-3100112-2-D8.patch (Fix Form Mode title)
 +    https://www.drupal.org/files/issues/2020-10-30/form_mode_manager-drupal-9-compatibility-3164478-6.patch (D9 readyness)
 +
 +$ vendor/bin/drush en form_mode_manager
 +</code>
 +=== Workflow ===
 +We need patch as stated here https://github.com/esmero/archipelago-deployment/issues/100
 +<code bash>
 +$ nano -w composer.json
 +</code>
 +<code json>
 +        "patches": {
 +            "drupal/workflow": {
 +                "D9 readyness": "https://www.drupal.org/files/issues/2020-07-07/deprecated_entity_manager_workflowstorage_error-3157199-7.patch"
 +            },
 +</code>
 +<code bash>
 +$ composer require 'drupal/workflow'
 +  - Installing drupal/workflow (1.4.0): Extracting archive
 +  - Applying patches for drupal/workflow
 +    https://www.drupal.org/files/issues/2020-07-07/deprecated_entity_manager_workflowstorage_error-3157199-7.patch (D9 readyness)
 +
 +$ vendor/bin/drush en workflow
 +Successfully enabled: workflow
 +</code>
 +=== Token UUID ===
 +<code bash>
 +$ composer require drupal/tokenuuid
 +  - Installing drupal/token (1.9.0): Extracting archive
 +  - Installing drupal/tokenuuid (1.4.0): Extracting archive
 +$ vendor/bin/drush en tokenuuid
 +Successfully enabled: tokenuuid, token
 +</code>
 +=== Web Services ===
 +<code bash>
 +$ vendor/bin/drush en hal jsonapi rest serialization
 +
 +$ composer require 'drupal/restui'
 +  - Installing drupal/restui (1.19.0)
 +$ vendor/bin/drush en restui
 +Successfully enabled: restui
 +</code>
 +=== File related modules ===
 +<code bash>
 +$ composer require 'drupal/fancy_file_delete:^2.0'
 +  - Installing drupal/views_bulk_operations (3.10.0): Extracting archive
 +  - Installing drupal/fancy_file_delete (2.0.3): Extracting archive
 +$ vendor/bin/drush en fancy_file_delete
 +Successfully enabled: fancy_file_delete, views_bulk_operations
 +
 +$ composer require 'drupal/file_mdm:^2'
 +  - Installing phenx/php-font-lib (0.5.2): Extracting archive
 +  - Installing lsolesen/pel (0.9.10): Extracting archive
 +  - Installing drupal/file_mdm (2.1.0): Extracting archive
 +$ vendor/bin/drush en file_mdm file_mdm_exif
 +Successfully enabled: file_mdm, file_mdm_exif
 +
 +$ composer require 'drupal/imagemagick:^3.1'
 +  - Installing fileeye/mimemap (1.1.4): Extracting archive
 +  - Installing drupal/sophron (1.1.0): Extracting archive
 +  - Installing drupal/imagemagick (3.1.0): Extracting archive
 +
 +$ sudo apt install imagemagick-6.q16
 +$ convert --version
 +Version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
 +Copyright: © 1999-2019 ImageMagick Studio LLC
 +License: https://imagemagick.org/script/license.php
 +Features: Cipher DPC Modules OpenMP
 +Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib
 +
 +$ vendor/bin/drush en imagemagick
 +Successfully enabled: imagemagick, sophron
 +
 +$ composer require 'drupal/imce:^2.3'
 +  - Installing drupal/imce (2.3.0): Extracting archive
 +$ vendor/bin/drush en imce
 +Successfully enabled: imce
 +</code>
 +=== React-PHP ===
 +<code bash>
 +$ composer require react/child-process react/event-loop react/promise
 +  - Installing react/event-loop (v1.1.1): Extracting archive
 +  - Installing evenement/evenement (v3.0.1): Extracting archive
 +  - Installing react/stream (v1.1.1): Extracting archive
 +  - Installing react/child-process (v0.6.2): Extracting archive
 +  - Installing react/promise (v2.8.0): Extracting archive
 +</code>
 +=== More useful/required modules ===
 +<code bash>
 +**** facets
 +
 +$ composer require 'drupal/facets:1.x-dev@dev'
 +  - Installing drupal/facets (dev-1.x a941c92)
 +
 +$ vendor/bin/drush en facets
 +Successfully enabled: facets
 +
 +**** field permissions
 +
 +$ composer require 'drupal/field_permissions'
 +  - Installing drupal/field_permissions (1.1.0)
 +$ vendor/bin/drush en field_permissions
 +Successfully enabled: field_permissions
 +
 +**** inline entity form
 +
 +$ composer require 'drupal/inline_entity_form:1.x-dev@dev'
 +  - Installing drupal/inline_entity_form (dev-1.x 52d28cc)
 +$ vendor/bin/drush en inline_entity_form
 +Successfully enabled: inline_entity_form
 +
 +**** pathauto
 +
 +$ composer require 'drupal/pathauto'
 +  - Installing drupal/ctools (3.4.0): Extracting archive
 +  - Installing drupal/pathauto (1.8.0): Extracting archive
 +$ vendor/bin/drush en pathauto
 +Successfully enabled: pathauto, ctools
 +
 +**** queue_ui
 +
 +$ composer require 'drupal/queue_ui'
 +  - Installing drupal/queue_ui (2.2.0)
 +$ vendor/bin/drush en queue_ui
 +Successfully enabled: queue_ui
 +
 +**** quick_node_clone
 +
 +$ composer require drupal/quick_node_clone
 +  - Installing drupal/quick_node_clone (1.13.0)
 +$ vendor/bin/drush en quick_node_clone
 +Successfully enabled: quick_node_clone
 +
 +**** schema metatag
 +
 +$ composer require 'drupal/schema_metatag'
 +  - Installing drupal/metatag (1.15.0): Extracting archive
 +  - Installing drupal/schema_metatag (2.1.0): Extracting archive
 +$ vendor/bin/drush en schema_metatag
 +Successfully enabled: schema_metatag, metatag
 +
 +**** Json-ld
 +
 +$ composer require 'ml/json-ld'
 +  - Installing ml/iri (1.1.4): Extracting archive
 +  - Installing ml/json-ld (1.2.0): Extracting archive
 +
 +**** ramsey uuid
 +
 +$ composer require ramsey/uuid
 +  - Installing ramsey/collection (1.1.3): Extracting archive
 +  - Installing brick/math (0.9.2): Extracting archive
 +  - Installing ramsey/uuid (4.1.1): Extracting archive
 +
 +**** swaggest json-schema
 +
 +$ composer require swaggest/json-schema
 +  - Installing swaggest/json-diff (v3.8.1): Extracting archive
 +  - Installing phplang/scope-exit (1.0.0): Extracting archive
 +  - Installing swaggest/json-schema (v0.12.31): Extracting archive
 +
 +**** drupal/google_api_client
 +
 +$ composer require drupal/google_api_client
 +  - Installing paragonie/random_compat (v9.99.100): Extracting archive
 +  - Installing paragonie/constant_time_encoding (v2.4.0): Extracting archive
 +  - Installing phpseclib/phpseclib (3.0.5): Extracting archive
 +  - Installing monolog/monolog (2.2.0): Extracting archive
 +  - Installing psr/cache (1.0.1): Extracting archive
 +  - Installing firebase/php-jwt (v5.2.1): Extracting archive
 +  - Installing google/auth (v1.15.0): Extracting archive
 +  - Installing google/apiclient-services (v0.163.0): Extracting archive
 +  - Installing google/apiclient (v2.9.1): Extracting archive
 +  - Installing drupal/google_api_client (3.0.0-rc5): Extracting archive
 +$ vendor/bin/drush en google_api_client
 +Successfully enabled: google_api_client
 +
 +****  mixnode/mixnode-warcreader-php
 +
 +$ composer require mixnode/mixnode-warcreader-php
 +  - Installing mixnode/mixnode-warcreader-php (0.0.6)
 +
 +**** config and context
 +
 +$ composer require drupal/config_inspector drupal/config_update drupal/config_update_ui drupal/context
 +  - Installing drupal/config_inspector (1.1.0): Extracting archive
 +  - Installing drupal/config_update (1.7.0): Extracting archive
 +  - Installing drupal/config_update_ui (1.7.0)
 +  - Installing drupal/context (4.0.0-beta5): Extracting archive
 +$ vendor/bin/drush en config_inspector config_update config_update_ui context context_ui
 +Successfully enabled: config_inspector, config_update, config_update_ui, context, context_ui
 +
 +**** drupal/moderated_content_bulk_publish
 +
 +$ composer require drupal/moderated_content_bulk_publish
 +  - Installing drupal/moderated_content_bulk_publish (2.0.2)
 +$ vendor/bin/drush en moderated_content_bulk_publish
 +Successfully enabled: moderated_content_bulk_publish
 +
 +***** frictionlessdata/datapackage
 +
 +WAIT package update
 +</code>
 +=== composer.json at the end of these steps ===
 +<code json>
 +{
 +    "name": "drupal/recommended-project",
 +    "description": "Project template for Drupal 9 projects with a relocated document root",
 +    "type": "project",
 +    "license": "GPL-2.0-or-later",
 +    "homepage": "https://www.drupal.org/project/drupal",
 +    "support": {
 +        "docs": "https://www.drupal.org/docs/user_guide/en/index.html",
 +        "chat": "https://www.drupal.org/node/314178"
 +    },
 +    "repositories": [
 +    {
 +      "type": "package",
 +      "package": {
 +        "name": "drupal/form_mode_manager",
 +        "type": "drupal-module",
 +        "version": "dev-8.x-2.x",
 +        "source": {
 +          "type": "git",
 +          "url": "https://git.drupalcode.org/project/form_mode_manager.git",
 +          "reference": "bb634122"
 +        }
 +      }
 +    },
 +        {
 +            "type": "composer",
 +            "url": "https://packages.drupal.org/8"
 +        }
 +    ],
 +    "require": {
 +        "composer/installers": "^1.9",
 +        "cweagans/composer-patches": "^1.7",
 +        "drupal/bamboo_twig": "^5.0@alpha",
 +        "drupal/bootstrap_barrio": "^5.1",
 +        "drupal/config_inspector": "^1.1",
 +        "drupal/config_update": "^1.7",
 +        "drupal/config_update_ui": "^1.7",
 +        "drupal/context": "^4.0@beta",
 +        "drupal/core-composer-scaffold": "^9.1",
 +        "drupal/core-project-message": "^9.1",
 +        "drupal/core-recommended": "^9.1",
 +        "drupal/display_field_copy": "^2.0",
 +        "drupal/ds": "^3.10",
 +        "drupal/facets": "1.x-dev@dev",
 +        "drupal/fancy_file_delete": "^2.0",
 +        "drupal/field_permissions": "^1.1",
 +        "drupal/file_mdm": "^2",
 +        "drupal/form_mode_manager": "dev-8.x-2.x",
 +        "drupal/google_api_client": "^3.0@RC",
 +        "drupal/imagemagick": "^3.1",
 +        "drupal/imce": "^2.3",
 +        "drupal/inline_entity_form": "1.x-dev@dev",
 +        "drupal/moderated_content_bulk_publish": "^2.0",
 +        "drupal/pathauto": "^1.8",
 +        "drupal/queue_ui": "^2.2",
 +        "drupal/quick_node_clone": "^1.13",
 +        "drupal/recaptcha_element": "^1.0",
 +        "drupal/restui": "^1.19",
 +        "drupal/s3fs": "3.x-dev@dev",
 +        "drupal/schema_metatag": "^2.1",
 +        "drupal/search_api": "^1.19",
 +        "drupal/search_api_attachments": "^1.0@beta",
 +        "drupal/search_api_autocomplete": "^1.4",
 +        "drupal/search_api_solr": "^4.1",
 +        "drupal/tokenuuid": "^1.4",
 +        "drupal/twig_field": "^1.1",
 +        "drupal/twig_tweak": "^3.0",
 +        "drupal/views_bootstrap": "^4.3",
 +        "drupal/webform": "^6",
 +        "drupal/webformnavigation": "^1.0@alpha",
 +        "drupal/workflow": "^1.4",
 +        "drush/drush": "^10",
 +        "mixnode/mixnode-warcreader-php": "^0.0.6",
 +        "ml/json-ld": "^1.2",
 +        "ramsey/uuid": "^4.1",
 +        "react/child-process": "^0.6.2",
 +        "react/event-loop": "^1.1",
 +        "react/promise": "^2.8",
 +        "swaggest/json-schema": "^0.12.31",
 +        "wikimedia/composer-merge-plugin": "^2.0"
 +    },
 +    "conflict": {
 +        "drupal/drupal": "*"
 +    },
 +    "minimum-stability": "dev",
 +    "prefer-stable": true,
 +    "config": {
 +        "sort-packages": true
 +    },
 +    "extra": {
 +        "merge-plugin": {
 +            "include": [
 +                "web/modules/contrib/webform/composer.libraries.json"
 +            ]
 +        },
 +        "drupal-scaffold": {
 +            "locations": {
 +                "web-root": "web/"
 +            }
 +        },
 +        "installer-paths": {
 +            "web/core": [
 +                "type:drupal-core"
 +            ],
 +            "web/libraries/{$name}": [
 +                "type:drupal-library"
 +            ],
 +            "web/modules/contrib/{$name}": [
 +                "type:drupal-module"
 +            ],
 +            "web/profiles/contrib/{$name}": [
 +                "type:drupal-profile"
 +            ],
 +            "web/themes/contrib/{$name}": [
 +                "type:drupal-theme"
 +            ],
 +            "drush/Commands/contrib/{$name}": [
 +                "type:drupal-drush"
 +            ],
 +            "web/modules/custom/{$name}": [
 +                "type:drupal-custom-module"
 +            ],
 +            "web/profiles/custom/{$name}": [
 +                "type:drupal-custom-profile"
 +            ],
 +            "web/themes/custom/{$name}": [
 +                "type:drupal-custom-theme"
 +            ]
 +        },
 +        "enable-patching": true,
 +        "patches": {
 +            "drupal/workflow": {
 +                "D9 readyness": "https://www.drupal.org/files/issues/2020-07-07/deprecated_entity_manager_workflowstorage_error-3157199-7.patch"
 +            },
 +            "drupal/form_mode_manager": {
 +                "Fix Form Mode title": "https://www.drupal.org/files/issues/2019-12-10/form_mode_manager-bundle-label-in-title-3100112-2-D8.patch",
 +                "D9 readyness": "https://www.drupal.org/files/issues/2020-10-30/form_mode_manager-drupal-9-compatibility-3164478-6.patch"
 +            },
 +            "drupal/role_theme_switcher": {
 +                "D9 readyness": "https://www.drupal.org/files/issues/2020-06-06/role_theme_switcher.1.x-dev.rector.patch"
 +            }
 +        }
 +    }
 +}
 +</code>
  • stepbystep/drupal.1615064370.txt.gz
  • Last modified: 2021/03/06 21:59
  • by giancarlo