Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It appears the disqus information after a node_load() lives in $node->disqus , which is an array which has, for example:
[disqus] => Array
(
[domain] => geforcecom-uk
[status] => 1
[url] => http://www.stagecms.nvidia.com/whats-new/articles/e3-2013-the-witcher-3-wild-hunt
[title] => E3 2013- The Witcher 3: Wild Hunt Developer Interview
[identifier] => e3-2013-the-witcher-3-wild-hunt
)
However, the disqus_node_insert() appears to refer to a *non-existing* property $node->disqus_status :
/**
* Implements hook_node_insert().
*/
function disqus_node_insert($node) {
// Clear the value from the database.
disqus_node_delete($node);
// Write the value only if it's disabled (default is enabled).
if (isset($node->disqus_status) && $node->disqus_status == FALSE) {
$data = array(
'nid' => $node->nid,
'status' => $node->disqus_status,
);
drupal_write_record('disqus', $data);
}
}
Because of this, the disqus DB table is never populated because the if() is *never* true.
It looks like this may be an easy fix. Potentially patch the above disqus_node_insert() function so that it references $node->disqus['status'] instead of $node->disqus_status.