- Status changed to Needs work
6 months ago 8:11pm 10 July 2024 - πΊπ¦Ukraine UsingSession
The module has undergone changes, so the patch needs some changes. Thank you for your contribution to this module
Download Count throws an error if an attached file's node is not yet saved.
The user-facing error is:
The website encountered an unexpected error. Please try again later.
The error log reports:
Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "type" violates not-null constraint DETAIL: Failing row contains (834, 42, 1, null, null, 10.128.62.121, Direct download, 1596425687).: INSERT INTO download_count (fid, uid, type, id, ip_address, referrer, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array ( ) in Drupal\Core\Database\Connection->handleQueryException() (line 698 of web/core/lib/Drupal/Core/Database/Connection.php).
Download Count should identify that the file is not attached to an existing node, and not attempt to insert invalid data to the DB.
Needs work
2.2
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
The module has undergone changes, so the patch needs some changes. Thank you for your contribution to this module