Problem/Motivation

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_body_summary' in 'where clause': SELECT 1 AS "expression" FROM "paragraph_revision__field_body" "t" WHERE ("field_body_value" IS NOT NULL) OR ("field_body_summary" IS NOT NULL) OR ("field_body_format" IS NOT NULL) LIMIT 1 OFFSET 0; Array ( ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->countFieldData() (line 1789 of /var/www/html/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Steps to reproduce

Proposed resolution

Add ixm_blocks_ping_pong.install with a schema-resilient repair pattern that handles the text_long → text_with_summary field type evolution for both the block_content body tables and the paragraph field_body tables. Also corrects the stale field_type: text_long in field.field.paragraph.ixm_blocks_ping_pong_item.field_body.yml to text_with_summary.

The repair function (ixm_blocks_ping_pong_repair_body_schema()) is idempotent and is called from three hooks to cover all install states: hook_install, hook_update_N (11002), and hook_modules_installed.

Remaining tasks

None. Ready for review.

User interface changes

None.

API changes

None. Adds a private helper function ixm_blocks_ping_pong_repair_body_schema() — not part of any public API.

Data model changes

Adds field_body_summary (text, big) and field_body_format (varchar 255) columns to paragraph__field_body and paragraph_revision__field_body on affected installs.

CommentFileSizeAuthor
#4 26.patch6.08 KBaaronchristian

Issue fork ixm_blocks-3586602

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

aaronchristian created an issue. See original summary.

aaronchristian’s picture

Issue summary: View changes
aaronchristian’s picture