- Issue created by @seanB
- @seanb opened merge request.
- @seanb opened merge request.
- Status changed to Needs review
almost 2 years ago 1:28pm 13 February 2023 - 🇳🇱Netherlands seanB Netherlands
The code below currently seems to break the tests. The queue table might not exist the first time something is added to the queue, so we can't query it. We should check if the queue table exists.
public function nodeExistsInQueue(int $nid): int { $query = $this->connection->select(DatabaseQueue::TABLE_NAME, 'q'); $query->condition('name', 'node_revision_delete'); $query->condition('data', serialize($nid)); $query->condition('expire', 0); $query->fields('q', ['item_id']); $result = $query->execute()->fetchCol(); return !empty($result) ? $result[0] : 0; }
- 🇳🇱Netherlands seanB Netherlands
Pushed a commit to add a check if the queue table exists.