I've only got 5 nodes represented in the simplenews_statistics table. This means that only 5 nodes produce anything other than a blank page for statistics.

The code that adds to the simplenews_statistics table is via hook_node_insert

function simplenews_statistics_node_insert($node) {
if ($node->type == 'simplenews') {
// Create corresponding record in {simplenews_statistics} table.
$record = array(
  'nid' => $node->nid,
drupal_write_record('simplenews_statistics', $record);

From my reading this would only happen if I had a content type of 'simplenews' which does happen in 5 cases where we use the newsletter content type. The site mainly uses 'announcements' which has 'Use as simplenews newsletter' in the content type editing.

Therefore I should patch the simplenews_statistics module to check for this value instead?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.