SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "NULL" LINE 6: ...data.status = '1') AND (content_lock.timestamp <> 'NULL') AN... ^: SELECT content_lock.timestamp AS content_lock_timestamp, content_lock.entity_id AS content_lock_entity_id, node_field_data.created AS node_field_data_created, node_field_data.nid AS nid, users_field_data_content_lock.uid AS users_field_data_content_lock_uid, 'contenu_verouille:page_1' AS view_name FROM {node_field_data} node_field_data LEFT JOIN {content_lock} content_lock ON node_field_data.nid = content_lock.entity_id AND content_lock.entity_type = :views_join_condition_0 LEFT JOIN {users_field_data} users_field_data_content_lock ON content_lock.uid = users_field_data_content_lock.uid WHERE (node_field_data.status = :db_condition_placeholder_1) AND (content_lock.timestamp <> :db_condition_placeholder_2) AND (content_lock.timestamp IS NOT NULL) ORDER BY node_field_data_created DESC NULLS LAST LIMIT 26 OFFSET 0; Array ( [:db_condition_placeholder_1] => 1 [:db_condition_placeholder_2] => NULL [:views_join_condition_0] => node )

Comments

Jaber ME created an issue. See original summary.

Jaber ME’s picture

StatusFileSize
new772 bytes

I added a patch to correct the error on the view, the problem is on the filter timestamp value, it must be equal or different to 0.

Status: Needs review » Needs work

The last submitted patch, 2: ContentLockFilter-2936170-2.patch, failed testing. View results

Jaber ME’s picture

Status: Needs work » Needs review
StatusFileSize
new873 bytes
kfritsche’s picture

Version: 8.x-1.0-alpha4 » 8.x-1.x-dev
StatusFileSize
new3.75 KB
new3.77 KB

Nitepicking

+++ b/src/Plugin/views/filter/ContentLockFilter.php
@@ -19,10 +19,10 @@ class ContentLockFilter extends BooleanOperator {
+			$this->query->addWhere($this->options['group'], $this->tableAlias . ".timestamp", 0, BooleanOperator::EQUAL);

Formatting is wrong, Drupal uses Spaces not Tabs.

Also I tested this patch on mysql (when googling for this error it seems like it is a postge specific error (?)) and it works.
But there were some other issues with the view on 8.x-1.x which I needed to fix first.

  • chr.fritsch committed 3bde905 on 8.x-1.x authored by kfritsche
    Issue #2936170 by Jaber ME, kfritsche: Views Locked content : error...
chr.fritsch’s picture

Status: Needs review » Fixed

Thanks for your contribution

Jaber ME’s picture

Title: Views Locked content : error ViewsFilter("content_lock_filter") value timestamp "NULL" » Contenu verrouillé vue (s) : erreur ViewsFilter("content_lock_filter") valeur timestamp « NULL »

Thanks @Chr.Fritsch.

Jaber ME’s picture

Title: Contenu verrouillé vue (s) : erreur ViewsFilter("content_lock_filter") valeur timestamp « NULL » » Views Locked content : error ViewsFilter("content_lock_filter") value timestamp "NULL"

Status: Fixed » Closed (fixed)

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