Disqus Comment System
Only variables should be assigned by reference in "dsq_prev_permalink" (3 posts)

  1. myefreelance
    Posted 2 years ago #

    There is an extra character "&" in "get_post".

    function dsq_prev_permalink($post_id) {
        // if post not published, return
        $post = &get_post($post_id);
        if ($post->post_status != 'publish') {
        global $dsq_prev_permalinks;
        $dsq_prev_permalinks['post_'.$post_id] = get_permalink($post_id);

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]


  2. schneidan
    Posted 2 years ago #

    I got a plethora of PHP errors in my admin console related to this issue, too ("Warning: Cannot modify header information - headers already sent...").

    I removed the ampersand on line 1240 of disqus.php and it seems to have solved the problem.

    Original line:

    $post = &get_post($post_id);


    $post = get_post($post_id);

  3. chinanderm
    Posted 2 years ago #

    I had this same issue this morning as well. I was able to fix it by doing BOTH of the corrections below:

    1) Outputting Javascript in footer (see Disqus plugin settings in Dashboard)
    2) Removing the "&" symbol in front of get_post($post_id); on line 1240 of disqus.php.

    Disqus needs to update plugin soon to get that & removed!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Disqus Comment System
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.