Hi,

While doing export i'm getting following error:

'Error when attempting to create Disqus thread for node id 341 (export has stopped): exception 'DisqusAPIError' with message 'You must be authenticated to perform this action'

I have downloaded PHP API implementation as listed on project page and followed instructions, am i missing anything? Only export giving problem it seems, rest of disqus installation is working fine including import.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

the_g_bomb’s picture

Category: Support request » Bug report
Status: Active » Needs review
FileSize
1.18 KB

I did some debugging and discovered that in the library disqusapi.php there is a foreach which fails

        foreach ((array)$resource->required as $k) {
            if (empty($kwargs[$k])) {
                throw new Exception('Missing required argument: '.$k);
            }
        }

The $resource we are passing is ['thread:ident'] and ['thread:url']
these both fail the empty() test so adding ['thread'] = TRUE, allows this check to pass.

There is an issue similar to this in the library issue queue at:
https://github.com/disqus/disqus-php/issues/16

I am uploading a patch that solves this problem and allows exports to work again.