0

During a clean up of my plugins inside of WordPress i deactivated the: smart archives reloaded plugin.

Next up: a fatal error when i refreshed the page.

Fatal error: Class 'SAR_Generator' not found in wp-content/themes/waldorf/functions.php on line 469

Plugin: Smart archives reloaded

So i couldn't access the site and also the wp-admin / control panel anymore. Before the clean up i downloaded the whole folder for a backup.

  • i replaced this folder with the backupped version: no change
  • replaced functions.php / wp-admin & wp-includes: no change
  • checked my wordpress version: 3.5.1 downloaded a fresh wordpress 3.5.1 folder and replaced those wp-admin & wp-includes with the ones on the ftp: no change.

  • followed this "Tutorial"

  • Renamed plugin folder & add comments on error section in functions.php

But all of those solutions didn't solve the problem

Codes:

SAR_Generator error in functions.php:

class SAR_Custom_Generator extends SAR_Generator {
    // The list
    protected function generate_list() {
        $months_long = $this->get_months();

        $list = '';
        foreach ( $this->get_years_with_posts( 'desc' ) as $year ) {
            foreach ( range( 12, 1 ) as $i ) {
                // Get post links for current month
                $post_list = $this->generate_post_list( $year, $i, "\n\t\t" );

                if ( !$post_list )
                    continue;

                // Set title format
                if ( $this->args->anchors )
                    $el = "h2 id='{$year}{$i}'";
                else
                    $el = "h2";

                // Append to list
                $list .=
                html( $el, $months_long[$i] . ' ' . $year );

                $list .= html( 'ul', $post_list );
            } // end month block
        } // end year block

        return html( 'div id="smart-archives-list"', $list );
    }
}
  • 1
    Comment out the code above (or delete) and you should be able to log back in. – Nathan Powell Nov 16 '13 at 19:24
  • Already tried it, but unfortunately it doesn't work. Still get the same error. – Rik Nov 16 '13 at 20:12
  • Exactly same error or same error about different place in code? This is not a plugin issue, this is issue with your theme seemingly coded to presume plugin is always available and unable to function without it. – Rarst Nov 16 '13 at 20:33
  • Ok thanks! didn't realize the plugin had this impact on the site. So i think the following steps then will be the solution: - uninstall wp on my server - reinstall wp op my server - upload my theme - install the needed plugins am i right? – Rik Nov 16 '13 at 21:29
  • Unless there is another block in the theme calling that class you won't get that error. – Nathan Powell Nov 16 '13 at 21:32

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.