Closed (duplicate)
Project:
Drupal core
Version:
9.3.x-dev
Component:
comment.module
Priority:
Critical
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
2 Jul 2019 at 05:48 UTC
Updated:
9 Apr 2022 at 03:08 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
otofu commentedComment #3
u7aroIt's working for me.
Comment #4
catchThis is a critical bug that can be run into by end users with normal configuration, but we also need test coverage here.
Comment #7
catchComment #8
lendudeThe fix in #2 probably works when the comments are on a node field, but still fatals when the comment field is on a different entity.
Adding the sorting to a View of taxonomy terms after applying the fix in #2 gives
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' comment_entity_statistics.last_comment_timestamp) AS comment_entity_statistics_' at line 1: SELECT taxonomy_term_field_data.langcode AS taxonomy_term_field_data_langcode, taxonomy_term_field_data.tid AS tid, GREATEST(.changed, comment_entity_statistics.last_comment_timestamp) AS comment_entity_statistics_last_updated FROM {taxonomy_term_field_data} taxonomy_term_field_data INNER JOIN {comment_entity_statistics} comment_entity_statistics ON taxonomy_term_field_data.tid = comment_entity_statistics.entity_id AND comment_entity_statistics.entity_type = :views_join_condition_0 WHERE taxonomy_term_field_data.status = :db_condition_placeholder_1 ORDER BY comment_entity_statistics_last_updated ASC LIMIT 11 OFFSET 0; Array ( [:db_condition_placeholder_1] => 1 [:views_join_condition_0] => taxonomy_term )So we probably need a fix that finds the correct data table for the entity that the comments are on.
Comment #9
mohit_aghera commentedThis seems duplicate of another issue https://www.drupal.org/project/drupal/issues/2086125#comment-13753699
There has been significant progress there.
@Lendude Can we close this?
Comment #12
larowlan#2086125: Last read comment field/filter/argument uses still the node.changed instead of node_field_data.changed column