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
Comments
Comment #2
turek commentedAttaching quick patch.
Comment #3
admirlju commentedI 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.
Comment #4
admirlju commentedTested the patch it fixes the problem and local tests pass. Failing automated tests on the issue is a separate problem.
Comment #7
deaom commentedApplied the patch to issue fork for easier merge and opened MR.
Comment #8
Anonymous (not verified) commentedjernejmramor made their first commit to this issue’s fork.
Comment #10
Anonymous (not verified) commentedI'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.