• Resolved Antikronios

    (@antikronios)


    I recently decided to chenge my wordpress theme and use Extra theme by elegant themes. When I changed the theme I got the message my site went down and I got the message PHP Fatal error: Cannot redeclare class OAuthSignatureMethod_HMAC_SHA1. When I deactivated the super socializer my site started working again. Is there any solution for this problem?

    https://www.ads-software.com/plugins/super-socializer/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Heateor Support

    (@heateor)

    Hi,

    The problem is the way your theme is declaring OAuthSignatureMethod_HMAC_SHA1 class. They need to check first, if this class has already been declared (which is already declared in our plugin and we are also checking it this has been declared already)

    Thread Starter Antikronios

    (@antikronios)

    I deactivated the login through twitter and now it is working properly. When I am activating the login through twitter I get Fatal Error when I am using Extra Theme on my web site. Any ideas?

    Plugin Author Heateor Support

    (@heateor)

    Read our answer posted above.

    So what is the solution? Wait for Extra to update or can we fix it ourselves?

    Plugin Author Heateor Support

    (@heateor)

    @jimi
    This is not related to our plugin, so you don’t need to wait for plugin update. You can fix it yourself. Just replace class OAuthSignatureMethod_HMAC_SHA1 (class declaration) in your theme, with following code:

    if ( ! class_exists( 'OAuthSignatureMethod_HMAC_SHA1' ) {
        // class declaration here
        class OAuthSignatureMethod_HMAC_SHA1
        .....
        ......
    }

    Extra have three instances of this:

    class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod {
    function get_name() {
    return “HMAC-SHA1”;
    }

    function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) {
    $this->sha1_method = new OAuthSignatureMethod_HMAC_SHA1();
    $this->consumer = new OAuthConsumer($consumer_key, $consumer_secret);
    if (!empty($oauth_token) && !empty($oauth_token_secret)) {
    $this->token = new OAuthConsumer($oauth_token, $oauth_token_secret);
    } else {
    $this->token = NULL;
    }
    }

    /**
    * construct TwitterOAuth object
    */
    function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) {
    $this->sha1_method = new OAuthSignatureMethod_HMAC_SHA1();
    $this->consumer = new OAuthConsumer($consumer_key, $consumer_secret);
    if (!empty($oauth_token) && !empty($oauth_token_secret)) {
    $this->token = new OAuthConsumer($oauth_token, $oauth_token_secret);
    } else {
    $this->token = NULL;
    }
    }

    Does this error mean anything for you?

    [10-Jan-2016 14:02:01 UTC] WordPress databasfel f?r Table ‘jimwikse_wpCore.wp_commentmeta’ doesn’t exist f?rfr?gan SELECT comment_id, meta_key, meta_value FROM wp_commentmeta WHERE comment_id IN (812,813) ORDER BY meta_id ASC skapat av require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/Extra/single-post.php’), extra_display_single_post_meta, et_extra_display_post_meta, extra_get_the_post_comments_link, get_comments_number, apply_filters(‘get_comments_number’), call_user_func_array, et_comment_count, get_comments, WP_Comment_Query->query, WP_Comment_Query->get_comments, _prime_comment_caches, update_comment_cache, update_meta_cache, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query

    Plugin Author Heateor Support

    (@heateor)

    Extra have three instances of this:

    First of all, there shouldn’t be three instances. Only one would suffice. But if there are three, you have to replace all the three.

    Does this error mean anything for you?

    Sorry, this is not related to our plugin.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘PHP Fatal error to my website’ is closed to new replies.