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

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

Turek created an issue. See original summary.

turek’s picture

Status: Active » Needs review
StatusFileSize
new789 bytes

Attaching quick patch.

admirlju’s picture

Status: Needs review » Postponed (maintainer needs more info)

I wanted to test the patch, but I couldn't replicate the original error. Could you provide any more details to reproduce it?

Never mind, figured it out. Testing the patch now.

admirlju’s picture

Status: Postponed (maintainer needs more info) » Reviewed & tested by the community

Tested the patch it fixes the problem and local tests pass. Failing automated tests on the issue is a separate problem.

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

deaom’s picture

Applied the patch to issue fork for easier merge and opened MR.

Anonymous’s picture

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

  • jernejmramor committed d7b8cc9a on 8.x-1.x authored by deaom
    Issue #3367215 by deaom, admirlju: Drupal 10: Unknown column '...
Anonymous’s picture

Version: 8.x-1.3 » 8.x-1.x-dev
Status: Reviewed & tested by the community » Fixed

I've retested this and found no issue with merging this into development branch. Merging MR created by Deaom. This will get included in the next release.

Status: Fixed » Closed (fixed)

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