Problem/Motivation

I was testing out applying locations recipe today and I ran into an issue with body field on 11.3 probably because of the note about #3447617: Stop automatic storage creation of body field for node in #3505253: Applying Locations recipe fails for site created using Drupal CMS installer due to missing body field.

TypeError: Drupal\Component\Utility\SortArray::sortByKeyRecursive(): Argument #1 ($data) must be of type array, false given, called in /var/www/html/web/core/lib/Drupal/Core/Recipe/ConfigConfigurator.php on line 67 in Drupal\Component\Utility\SortArray::sortByKeyRecursive() (line 134 of /var/www/html/web/core/lib/Drupal/Component/Utility/SortArray.php).


Stack trace

#1 /var/www/html/web/core/lib/Drupal/Core/Recipe/Recipe.php(94): Drupal\Core\Recipe\ConfigConfigurator->__construct()
#2 /var/www/html/web/core/lib/Drupal/Core/Recipe/RecipeCommand.php(72): Drupal\Core\Recipe\Recipe::createFromDirectory()
#3 /var/www/html/vendor/symfony/console/Command/Command.php(341): Drupal\Core\Recipe\RecipeCommand->execute()
#4 /var/www/html/vendor/symfony/console/Application.php(1102): Symfony\Component\Console\Command\Command->run()
#5 /var/www/html/vendor/drush/drush/src/Application.php(201): Symfony\Component\Console\Application->doRunCommand()
#6 /var/www/html/vendor/symfony/console/Application.php(356): Drush\Application->doRunCommand()
#7 /var/www/html/vendor/symfony/console/Application.php(195): Symfony\Component\Console\Application->doRun()
#8 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(113): Symfony\Component\Console\Application->run()
#9 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun()
#10 /var/www/html/vendor/drush/drush/drush.php(140): Drush\Runtime\Runtime->run()
#11 /var/www/html/vendor/bin/drush.php(119): include('...')
#12 {main}

Steps to reproduce

  1. composer create-project drupal/recommended-project:^11.3 test
  2. cd test
  3. ddev config --project-type=drupal11 --docroot=web
  4. ddev composer require drush/drush drupal/locations:2.0.x-dev
  5. ddev drush recipe ../recipes/locations

Proposed resolution

Add the config for field.storage.node.body, so sites without this already installed will be able to install the recipe successfully.

Remaining tasks

Issue fork locations-3567336

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mradcliffe created an issue. See original summary.

mradcliffe’s picture

Issue summary: View changes
Status: Active » Needs work

I added a test and gitlab ci integration.

But that was not the error I was expecting to see.

mandclu made their first commit to this issue’s fork.

  • mandclu committed 556416c9 on 2.0.x
    feat: #3567336 Exception at ConfigConfigurator with field.storage.node....
mandclu’s picture

Issue summary: View changes
Status: Needs work » Fixed

I noticed that the Events recipe applied successfully on sites where the Locations recipe did not. Looking closer, I realized that the Events theme included the config file for field.storage.node.body. Copying that into the Locations recipe allowed the recipe to apply successfully in both Drupal CMS 2.0-beta2 and Drupal core 11.3.2. I've merged in the change and will cut a new release.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.