Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi,
I get this error when I try to add comment index: https://www.drupal.org/files/issues/error_204.png
This issue appears if there are no nodes. So, $bundles variable is empty and as a result, this condition:
$query->condition($bundle_column, $bundles);
causes an error.
I also think, that it can cause other issue as well. In order to prevent this, we should add a check.
I've attached a patch for review.
Comment | File | Size | Author |
---|---|---|---|
#6 | 2710893-5--new_comment_index.patch | 867 bytes | drunken monkey |
|
Comments
Comment #2
alan-ps CreditAttribution: alan-ps commentedComment #3
michel.settembrino CreditAttribution: michel.settembrino at Colruyt Group Services commentedI don't know if it is related to this issue but yesterday I applied the latest update (7.x-1.18 when I was running on 7.x-1.17) and due to this I can't update or create content.
I am getting this error: "PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'item_id' cannot be null: INSERT INTO {search_api_et_item} (item_id, index_id, changed) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1] => 17 [:db_insert_placeholder_2] => 1 ) in SearchApiAbstractDataSourceController->trackItemInsert() (regel 617 van search_api/includes/datasource.inc)."
Reverting to version 7.x-1.17 solved my issue.
Comment #4
alan-ps CreditAttribution: alan-ps commentedSorry, forgot about the screenshot. I have uploaded an image with my error.
Comment #5
drunken monkeyThanks a lot for spotting this! Your patch looks also great, thanks again!
I've spotted two more problems with the code in that method, we should fix them too since we're already at it. Patch attached.
@ michel.settembrino: That sounds like an entirely different problem, and moreover not like one connected to the 1.17->1.18 upgrade. Did you maybe also upgrade some other modules at the same time?
Comment #6
drunken monkeyComment #8
drunken monkeySince no-one complained: committed.
Thanks again, everyone!
Comment #9
michel.settembrino CreditAttribution: michel.settembrino at Colruyt Group Services commented@drunken monkey,
This problem has been solved by upgrading the module search_api_et. I was running version 7.x-2.0-alpha1.
I had no issue but when I upgraded the module search_api I got this issue. So the upgrade of search_api_et was required.
But now I am getting some memory issues. My colleagues are investigating this new issue.
Best regards,
Michel.