Unknown column 'node.changed' on filter by "Updated/commented date"

Created on 19 May 2017, over 7 years ago
Updated 7 November 2024, 8 days ago

Field "Comment Statistics: Updated/commented date" is build correctly:
GREATEST(node_field_data.changed, comment_entity_statistics.last_comment_timestamp)

Filter Criteria seems to use the old/wrong row "node.changed":
GREATEST(node.changed, comment_entity_statistics.last_comment_timestamp)

So this SQL-Error arises:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'node.changed' in 'where clause': SELECT

πŸ› Bug report
Status

Closed: duplicate

Version

8.4 ⚰️

Component

comment.module

Created by

πŸ‡©πŸ‡ͺGermany kle

Live updates comments and jobs are added and updated live.
  • VDC

    Related to the Views in Drupal Core initiative.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States Kasey_MK

    I find the current status of Last read comment field/filter/argument uses still the node.changed instead of node_field_data.changed column πŸ› Last read comment field/filter/argument uses still the node.changed instead of node_field_data.changed column Needs review to be pretty confusing, and I can't find a way to get my site working from it.

    The patch here in #10 made my views work, but introduced another error in the config. For what it's worth, swapping in the config update from that other issue seems to do the trick for my site.

    So on core/modules/comment/config/schema/comment.views.schema.yml:

    Remove this change:

    views.filter.comment_ces_last_updated:
    -  type: views.filter.date
    +  type: views.filter_value.date

    Add this change:

     views.field.comment_ces_last_updated:
    -  type: views_field
    +  type: views.field.date

    I haven't tried making issue forks before now, and it doesn't look like I can upload the patch I made here. I just wanted to say thanks for the patch in #10 and to share the tweak that made it work for me.

    Commit 014a85f2 includes a "Plain Diff" in the "Options" dropdown which you can save locally as a .patch file, in case that's helpful to anyone else.

    I didn't make a pull request, because it looks like the "real work" is being done on that other issue, so probably not worth trying to advance this issue - except that for me, at least, it lets me get back to a working site until everything else is resolved.

Production build 0.71.5 2024