Fatal error: Cannot redeclare class Suffusion_MM_Walker in /

General questions pertaining to how certain issues can be resolved. This forum is closed with effect from February 2019. Please post future requests on https://github.com/sayontan/suffusion.
Forum rules
This forum is closed with effect from February 2019. Please post future requests on https://github.com/sayontan/suffusion.

1. No offensive language and no mocking
2. Please do a thorough search before you post something. Trust us, there is a high probability that the question you are asking has been asked previously.
3. No soliciting. You cannot post here soliciting bids for people offer you quotes, or even offer money to people for some work. You will be moderated if you do so. If you are looking for help, please post your request on http://jobs.wordpress.net or http://codepoet.com
4. Please be reasonable. You are getting software and support. For free. Complicated requests from a general purpose theme are not welcome and some volunteers might lose patience with you.
5. Please do your due diligence. If you posted a query and we answered with a link, take the trouble to go through the link contents.
6. Please post with complete information. Requests for help MUST be accompanied with your URL, particularly if you are asking something like "Why am I seeing a blank space?"
BCSpiritBear
Posts: 17
Joined: 18 Jan 2010, 12:37

Fatal error: Cannot redeclare class Suffusion_MM_Walker in /

Post by BCSpiritBear » 06 Apr 2014, 17:42

My site is no longer opening, all I get is a black page with this message:
Fatal error: Cannot redeclare class Suffusion_MM_Walker in /home3/steph1/public_html/bcspiritbear.com/wp-content/themes/suffusion/library/suffusion-walkers.php on line 39

I've been googling and searching and trying to delete plugins and I keep getting that message. But when I go onto my other computer, only an older version of my site shows up, but I don't get that message.
As far as I know I'm on the latest version of wordpress and Suffusion.
I'm using Windows 7 and Firefox, my site is http://bcspiritbear.com and that is the old site, I have way more pages than what is showing.
Help! Why am I getting that message?
Thanks, Stephanie

drake
Posts: 6223
Joined: 26 Jul 2011, 07:56
Location: Constanta, Romania
Contact:

Re: Fatal error: Cannot redeclare class Suffusion_MM_Walker

Post by drake » 06 Apr 2014, 18:09

That's happens when:
- you try to copy an unplugable file (like functions.php or actions.php) from Suffusion parent folder into your child theme. You can't do that, functions from your child theme are ADDED after the functions from the parent theme, resulting in duplicate declarations.
- you try to add into your child theme functions.php the declaration of the class Suffusion_MM_Walker, which already exists in functions.php of Suffusion (the parent theme)
If you tried that, simply remove the offending files (or wrong lines from functions.php) from your child theme. Can read more about child themes: http://www.drafie-design.nl/3-5-easy-st ... suffusion/

Or, you have edited the files of parent theme in a wrong way, duplicating the Suffusion_MM_Walker class. If this is true you can remove by ftp the entire "suffusion" folder, login into backend (will have the default theme on site), then re-install a new copy of theme from repository. You will lose all changes in theme files (including those from CSS files), but will have a clean and functional theme installed. You will not lose any customization made in Suffusion Options (including at Custom Includes section).

BCSpiritBear
Posts: 17
Joined: 18 Jan 2010, 12:37

Re: Fatal error: Cannot redeclare class Suffusion_MM_Walker

Post by BCSpiritBear » 06 Apr 2014, 19:49

Thanks so much for your reply but I wasn't trying to build a child theme. I did however go into my server and tried to add Google Website Verification code into header.php and it wouldn't verify so I removed it, but I didn't try to edit the code that was there.
I avoid the whole child-parent theme thing as I tried to manage all that in a paid theme and got so lost, so I stick to using Suffusion as a framework and parent theme without building a child theme, is this not possible?

I will uninstall Suffusion if I have to but being somewhat of a wordpress-chicken, I'd like to avoid that.

BCSpiritBear
Posts: 17
Joined: 18 Jan 2010, 12:37

Re: Fatal error: Cannot redeclare class Suffusion_MM_Walker

Post by BCSpiritBear » 06 Apr 2014, 23:16

I did look in the header.php code to see if I left any duplicate code in there and I did find this at the end was a duplicate:
</head>

<body <?php body_class(); ?>>
<?php suffusion_before_page(); ?>
<?php
suffusion_before_begin_wrapper();
?>
<div id="wrapper" class="fix">
<?php
suffusion_after_begin_wrapper();
?>
<div id="container" class="fix">
<?php
suffusion_after_begin_container();
?>

So I deleted it and it didn't change that error message so I put it back, hmmm.

drake
Posts: 6223
Joined: 26 Jul 2011, 07:56
Location: Constanta, Romania
Contact:

Re: Fatal error: Cannot redeclare class Suffusion_MM_Walker

Post by drake » 07 Apr 2014, 11:21

The entire block from above was duplicate? Is completely wrong, in an html page can have only one </head> closing tag (because only one opening <head> tag can exist) and only one <body> tag. These are the main elements on which any site are based... just basic things...

Also I don't understand what you mean by using Suffusion as a framework? While it is, of course, possible to not use a child theme, then you need to set all things in Suffusion Options, and not touch any file. And this is not your case. At least one time you proposed here, on this forum, a change in style.css of theme (I corrected then your approach, but I am almost sure that you not stopped then).

When you use Appearance -> Edit button risk more things:
- any update of theme will break your changes, reverting the files to their originals;
- a small mistake when you edit codes (like forgetting a semicolon at the end of a line, or adding an invisible space after the last "?>") will break totally your site (like now). The solution consist, as I already said, in restoring the original files from repository (again will loose all changes)...
- one of hackers doors is the usage of "Edit Theme" link... they break the site with the help of a vulnerable plugin, then they use Edit Theme button for changing the files.

On all my sites I disable Edit Theme and Edit Plugins functionalities in wp-config.

BCSpiritBear
Posts: 17
Joined: 18 Jan 2010, 12:37

Re: Fatal error: Cannot redeclare class Suffusion_MM_Walker

Post by BCSpiritBear » 07 Apr 2014, 11:52

A thousand thank yous Drake! I finally quit being a wordpress-chicken and did as you suggested, I deleted Suffusion theme then reinstalled and its all loading fine now. I did however delete a somewhat duplicated main directory for the site that found through FTP (for some reason I could not view all my built pages in Hostgator File Manager), not sure if that helped but the file structure looks super clean now and I'm back in business. May Karma rain success upon you!

drake
Posts: 6223
Joined: 26 Jul 2011, 07:56
Location: Constanta, Romania
Contact:

Re: Fatal error: Cannot redeclare class Suffusion_MM_Walker

Post by drake » 07 Apr 2014, 11:59

Glad that you are back in business :))

Now maybe you can spend 10 minutes to read about child themes and make one... :)

BCSpiritBear
Posts: 17
Joined: 18 Jan 2010, 12:37

Re: Fatal error: Cannot redeclare class Suffusion_MM_Walker

Post by BCSpiritBear » 07 Apr 2014, 12:40

What is the advantage of making a child theme?

Colin
Posts: 5066
Joined: 27 Oct 2009, 10:46

Re: Fatal error: Cannot redeclare class Suffusion_MM_Walker

Post by Colin » 07 Apr 2014, 13:32

The advantages of a child theme are many fold.

The 2 most important ones are

1: when the theme is updated any changes that you have made to core Suffusion files won't be overwritten.
2: You can customise the actions of the theme with a custom functions.php, custom templates and other custom pluggable files.

michelefree
Posts: 20
Joined: 24 Jun 2011, 10:31

Re: Fatal error: Cannot redeclare class Suffusion_MM_Walker

Post by michelefree » 14 May 2014, 09:21

EMERGENCY!!!

My site, http://www.REACHPikesPeak.org is under a big push, as we meet with the board on Friday morning to show and launch the site for our non-profit company. I have the new Suffusion 4.4.7, and Wordpress 3.9.1.

I knocked off working about 9 last night, and this morning the site was broken.

I use no child themes. (I guess I need to learn how.)

I am getting these errors, and have followed everything listed in the forums to try and fix it. I've re-installed the theme twice, and Wordpress once. I tried all of the edits. I'm dying here.

Strict Standards: Declaration of Suffusion_MM_Walker_Edit::start_lvl() should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = Array) in /home2/ppcaa/public_html/REACHPikesPeak.org/wp-content/themes/suffusion/library/suffusion-admin-walkers.php on line 282

Strict Standards: Declaration of Suffusion_MM_Walker_Edit::end_lvl() should be compatible with Walker_Nav_Menu::end_lvl(&$output, $depth = 0, $args = Array) in /home2/ppcaa/public_html/REACHPikesPeak.org/wp-content/themes/suffusion/library/suffusion-admin-walkers.php on line 282

Strict Standards: Declaration of Suffusion_MM_Walker_Edit::start_el() should be compatible with Walker_Nav_Menu::start_el(&$output, $item, $depth = 0, $args = Array, $id = 0) in /home2/ppcaa/public_html/REACHPikesPeak.org/wp-content/themes/suffusion/library/suffusion-admin-walkers.php on line 282

PLEASE HELP!!!! x(

Locked