Drupal 10: Unknown column 'node_field_data.bundle'

Created on 16 June 2023, over 1 year ago
Updated 7 September 2023, about 1 year ago

Problem/Motivation

When using module with Drupal 10, it produces below error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'node_field_data.bundle' in 'where clause': SELECT "node_field_data"."langcode" AS "node_field_data_langcode", "recently_read_node_field_data"."created" AS "recently_read_node_field_data_created", "node_field_data"."nid" AS "nid", "recently_read_node_field_data"."id" AS "recently_read_node_field_data_id" FROM "node_field_data" "node_field_data" INNER JOIN "recently_read" "recently_read_node_field_data" ON node_field_data.nid = recently_read_node_field_data.entity_id WHERE (("recently_read_node_field_data"."type" = :db_condition_placeholder_0) AND ("recently_read_node_field_data"."user_id" = :db_condition_placeholder_1) AND ("node_field_data"."bundle" IN (:db_condition_placeholder_2, :db_condition_placeholder_3, :db_condition_placeholder_4, :db_condition_placeholder_5, :db_condition_placeholder_6))) AND ("node_field_data"."status" = :db_condition_placeholder_7) ORDER BY "recently_read_node_field_data_created" DESC LIMIT 5 OFFSET 0; Array ( [:db_condition_placeholder_0] => node [:db_condition_placeholder_1] => 1 [:db_condition_placeholder_2] => article [:db_condition_placeholder_3] => course [:db_condition_placeholder_4] => eposter [:db_condition_placeholder_5] => podcast [:db_condition_placeholder_6] => webcast [:db_condition_placeholder_7] => 1 )

Steps to reproduce

Just install module on Drupal 10

Proposed resolution

Change column in SQL query from `node_field_data.bundle` to `node_field_data.type`.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

RTBC

Version

1.3

Component

Code

Created by

🇵🇱Poland Turek

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024