Looks like the MR fails testing but not (as far as I can tell) on anything I did! I'm going to have to leave this to other, cleverer people than me to address, I think.
MR raised with a fix:
https://git.drupalcode.org/project/drupal/-/merge_requests/9862
tomdearden → created an issue.
This works for me on 8.x-1.7, for what it's worth.
Hi @mglaman - it throws an ugly error when enabling the module via Drush but the command's return code is still zero so I don't think it would cause issues within the average CI pipeline, for example. See the attached screengrab for the kind of output that's shown.
I really like the idea of moving the index and view to an optional module - that seems to fit the use case better as then they're optional by user choice, rather than by site configuration as the dependency model has it.
Hi @mglaman I'm not sure that can be the case - when I run
drush cget field.storage.node.body
I get
uuid: 6f05f858-503c-450b-9793-9d8894a9117c
langcode: en
status: true
dependencies:
module:
- node
- text
_core:
default_config_hash: EBUo7qOWqaiZaQ_RC9sLY5IoDKphS34v77VIHSACmVY
id: node.body
field_name: body
entity_type: node
type: text_with_summary
settings: { }
module: text
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: true
custom_storage: false
and running:
drush sqlq "explain node__body;"
produces:
bundle varchar(128) NO MUL
deleted tinyint(4) NO PRI 0
entity_id int(10) unsigned NO PRI NULL
revision_id int(10) unsigned NO MUL NULL
langcode varchar(32) NO PRI
delta int(10) unsigned NO PRI NULL
body_value longtext NO NULL
body_summary longtext YES NULL
body_format varchar(255) YES MUL NULL
Doesn't this mean the storage config hasn't been purged?
As of yesterday, the above installed Drupal 9.5.3, with acquia_search 3.1.5. Full output from composer show
below:
acquia/http-hmac-php 6.0.0 An implementation of the HTTP HMAC Spec in PHP that integrates with popular libraries such as Symfony and Guzzle.
asm89/stack-cors 1.3.0 Cross-origin resource sharing library and stack middleware
chi-teck/drupal-code-generator 2.6.2 Drupal code generator
composer/installers v1.12.0 A multi-framework Composer library installer
composer/semver 3.3.2 Semver library that offers utilities, version constraint parsing and validation.
consolidation/annotated-command 4.7.1 Initialize Symfony Console commands from annotated command class methods.
consolidation/config 2.1.2 Provide configuration services for a commandline tool.
consolidation/filter-via-dot-access-data 2.0.2 This project uses dflydev/dot-access-data to provide simple output filtering for applications built with annotated-co...
consolidation/log 2.1.1 Improved Psr-3 / Psr\Log logger based on Symfony Console components.
consolidation/output-formatters 4.2.3 Format text by applying transformations provided by plug-in formatters.
consolidation/robo 4.0.2 Modern task runner
consolidation/self-update 2.1.0 Provides a self:update command for Symfony Console applications.
consolidation/site-alias 4.0.0 Manage alias records for local and remote sites.
consolidation/site-process 4.2.1 A thin wrapper around the Symfony Process Component that allows applications to use the Site Alias library to specify...
dflydev/dot-access-data v3.0.2 Given a deep data structure, access data by dot notation.
doctrine/annotations 1.13.3 Docblock Annotations Parser
doctrine/lexer 1.2.3 PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
doctrine/reflection 1.2.3 The Doctrine Reflection project is a simple library used by the various Doctrine projects which adds some additional ...
drupal/acquia_connector 4.0.3 Allows Drupal websites to connect with Acquia.
drupal/acquia_search 3.1.5 Provides integration between your Drupal site and Acquia's hosted search service.
drupal/core 9.5.3 Drupal is an open source content management platform powering millions of websites and applications.
drupal/core-composer-scaffold 9.5.3 A flexible Composer project scaffold builder.
drupal/core-project-message 9.5.3 Adds a message after Composer installation.
drupal/core-recommended 9.5.3 Core and its dependencies with known-compatible minor versions. Require this project INSTEAD OF drupal/core.
drupal/search_api 1.28.0 Provides a generic framework for modules offering search capabilities.
drupal/search_api_solr 4.2.10 Offers an implementation of the Search API that uses an Apache Solr server for indexing content.
drush/drush 11.5.1 Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life ...
egulias/email-validator 3.2.5 A library for validating emails against several RFCs
enlightn/security-checker v1.10.0 A PHP dependency vulnerabilities scanner based on the Security Advisories Database.
grasmash/expander 2.0.3 Expands internal property references in PHP arrays file.
guzzlehttp/guzzle 6.5.8 Guzzle is a PHP HTTP client library
guzzlehttp/promises 1.5.2 Guzzle promises library
guzzlehttp/psr7 1.9.0 PSR-7 message implementation that also provides common utility methods
http-interop/http-factory-guzzle 1.2.0 An HTTP Factory using Guzzle PSR7
laminas/laminas-diactoros 2.14.0 PSR HTTP Message implementations
laminas/laminas-escaper 2.9.0 Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs
laminas/laminas-feed 2.17.0 provides functionality for consuming RSS and Atom feeds
laminas/laminas-stdlib 3.11.0 SPL extensions, array utilities, error handlers, and more
league/container 4.2.0 A fast and intuitive dependency injection container.
maennchen/zipstream-php 2.2.6 ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the...
masterminds/html5 2.7.6 An HTML5 parser and serializer.
myclabs/php-enum 1.8.4 PHP Enum implementation
nikic/php-parser v4.15.3 A PHP parser written in PHP
pear/archive_tar 1.4.14 Tar file management class with compression support (gzip, bzip2, lzma2)
pear/console_getopt v1.4.3 More info available on: http://pear.php.net/package/Console_Getopt
pear/pear-core-minimal v1.10.11 Minimal set of PEAR core files to be used as composer dependency
pear/pear_exception v1.0.2 The PEAR Exception base class.
psr/cache 1.0.1 Common interface for caching libraries
psr/container 1.1.1 Common Container Interface (PHP FIG PSR-11)
psr/event-dispatcher 1.0.0 Standard interfaces for event handling.
psr/http-client 1.0.1 Common interface for HTTP clients
psr/http-factory 1.0.1 Common interfaces for PSR-7 HTTP message factories
psr/http-message 1.0.1 Common interface for HTTP messages
psr/log 1.1.4 Common interface for logging libraries
psy/psysh v0.11.12 An interactive shell for modern PHP.
ralouphie/getallheaders 3.0.3 A polyfill for getallheaders.
solarium/solarium 6.2.8 PHP Solr client
stack/builder v1.0.6 Builder for stack middleware based on HttpKernelInterface.
symfony-cmf/routing 2.3.4 Extends the Symfony routing component for dynamic routes and chaining several routers
symfony/console v4.4.49 Eases the creation of beautiful and testable command line interfaces
symfony/debug v4.4.44 Provides tools to ease debugging PHP code
symfony/dependency-injection v4.4.49 Allows you to standardize and centralize the way objects are constructed in your application
symfony/deprecation-contracts v2.5.2 A generic function and convention to trigger deprecation notices
symfony/error-handler v4.4.44 Provides tools to manage errors and ease debugging PHP code
symfony/event-dispatcher v4.4.44 Provides tools that allow your application components to communicate with each other by dispatching events and listen...
symfony/event-dispatcher-contracts v1.1.13 Generic abstractions related to dispatching event
symfony/filesystem v5.4.19 Provides basic utilities for the filesystem
symfony/finder v5.4.19 Finds files and directories via an intuitive fluent interface
symfony/http-client-contracts v2.5.2 Generic abstractions related to HTTP clients
symfony/http-foundation v4.4.49 Defines an object-oriented layer for the HTTP specification
symfony/http-kernel v4.4.50 Provides a structured process for converting a Request into a Response
symfony/mime v5.4.13 Allows manipulating MIME messages
symfony/polyfill-ctype v1.27.0 Symfony polyfill for ctype functions
symfony/polyfill-iconv v1.27.0 Symfony polyfill for the Iconv extension
symfony/polyfill-intl-grapheme v1.27.0 Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-idn v1.27.0 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-intl-normalizer v1.27.0 Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring v1.27.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php72 v1.27.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/polyfill-php73 v1.27.0 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/polyfill-php80 v1.27.0 Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions
symfony/process v4.4.44 Executes commands in sub-processes
symfony/psr-http-message-bridge v2.1.4 PSR HTTP message bridge
symfony/routing v4.4.44 Maps an HTTP request to a set of configuration variables
symfony/serializer v4.4.47 Handles serializing and deserializing data structures, including object graphs, into array structures or other format...
symfony/service-contracts v2.5.2 Generic abstractions related to writing services
symfony/string v5.4.19 Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified...
symfony/translation v4.4.47 Provides tools to internationalize your application
symfony/translation-contracts v2.5.2 Generic abstractions related to translation
symfony/validator v4.4.48 Provides tools to validate values
symfony/var-dumper v5.4.19 Provides mechanisms for walking through any arbitrary PHP variable
symfony/yaml v4.4.45 Loads and dumps YAML files
twig/twig v2.15.4 Twig, the flexible, fast, and secure template language for PHP
typo3/phar-stream-wrapper v3.1.7 Interceptors for PHP's native phar:// stream handling
webflo/drupal-finder 1.2.2 Helper class to locate a Drupal installation from a given path.
OK - here's a sequence of actions that should produce this error in a minimally-configured install:
Set up a Drupal 9 site on your favourite development platform (I used Lando to get a containerised server up and running quickly but don't think it matters):
```
composer create-project drupal/recommended-project:^9.5
composer require drush/drush
drush site:install
```
Then:
- log in and navigate to the Content Types overview page at `/admin/structure/types`
- remove both the existing entries
- create your own ones if you like, so long as they don't use the 'Body' field
At this point you should have an installation that will throw the exception above if you try and install the Acquia Search module eg.
```
composer require drupal/acquia_search
drush en acquia_search
```
I get the error in the issue description reliably when doing this.
Hope that's useful!
Hi @mglaman - I think I found the reverse to be true ie. _removing_ the config for `field.storage.node.body` was the thing that prevented the optional config being installed and thus resolved the issue with an exception being thrown on install.
I'll see if I can go back over my project's commit history and construct a minimal set of actions to reproduce and will let you know.
Seeing this here, too on 3.1.4 - if I delete the config for the 'Body' field on Node entities before installing then the 'optional' config for the sample Search API index that this module seeks to install when enabled isn't created and this error doesn't appear - I don't use the 'standard' install profile's Body field so this isn't an issue in my application.
I'm not sure that, in general, this module should be looking to create a Search API index anyway. I can see a use case for a server, perhaps (although this being installed automatically still feels wrong to me) but an index should surely be up to the user to configure?