The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Technical SEO Issues
    4. Yoast and Standard theme: Fatal error

    Yoast and Standard theme: Fatal error

    Technical SEO Issues
    7 3 1.1k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DonnaDuncan
      DonnaDuncan last edited by

      Hi all-

      A client has tried installing Yoast on her site and received at fatal error (below). She's been able to restore her site and get it functioning again, but I'm wondering if there's a work around so we can use the plugin. It's a Wordpress site using the Standard Theme.

      I've searched the forums (and here!) and haven't found anything helpful yet. Do you have any suggestions?

      Thanks!

      "Fatal error: Cannot redeclare yoast_breadcrumb() (previously declared in /vservers/nwconstructi/htdocs/NWCL/wp-content/plugins/wordpress-seo/inc/wpseo-functions.php:108) in /vservers/nwconstructi/htdocs/NWCL/wp-content/themes/StandardTheme_272/lib/standard_yoast_breadcrumbs.php on line 280"

      1 Reply Last reply Reply Quote 0
      • KevinBudzynski
        KevinBudzynski last edited by

        Do you have the plugin Wordpress SEO installed? Possible explanation from a user at stackoverflow:

        "You have the plugin Wordpress SEO installed which has breadcrumbs included. It looks like you cannot install the breadcrumb plugin also. Use the breadcrumb feature included in Wordpress SEO plugin."

        DonnaDuncan 1 Reply Last reply Reply Quote 1
        • DeanAndrews
          DeanAndrews last edited by

          From Yoast KB:

          If you're getting an error that looks like this:

          Cannot redeclare yoast_breadcrumb() (previously declared in /hom/require/public_html/wp-content/plugins/wordpress-seo/inc/wpseo-functions.php:96) in <path></path> 
          

          Your theme or another plugin is including our  breadcrumbs class, and not properly wrapping it in class_exists or function_exists wrappers. The <path>part of the error above should normally point you at either a themes or plugins directory, telling you which plugin is the culprit.</path>

          The breadcrumbs class in our plugin is maintained, whereas the breadcrumbs class shipping with your theme is probably out of date. So check with the creator of your theme and send them to this page.

          You should wrap the class and functions in  class_exists or function_exists wrappers. Or, even better, you shouldn't include it at all and just tell people to install our WordPress SEO plugin and use the breadcrumbs provided by our plugin as those are far more up to date and actually work with custom post types, custom post type archives, etc.

          Source: http://kb.yoast.com/article/97-cannot-redeclare-yoast_breadcrumb-error

          DonnaDuncan 1 Reply Last reply Reply Quote 1
          • DonnaDuncan
            DonnaDuncan @DeanAndrews last edited by

            Hi DeanAndrews.

            Thanks for your response.

            The client has renamed the offending wordpress-seo plugin directory to wordpress-seo-old and that restored the site immediately. Can we just leave it that way, reactivate the plugin, and move forward from there or will other problems arise?

            If we "wrap the class and functions" as you suggest, is it a large effort? Will it impede our upgrade ability should the Standard Theme release an upgrade?

            Just trying to understand all our options and am very appreciative of your help.

            D

            DeanAndrews 1 Reply Last reply Reply Quote 0
            • DeanAndrews
              DeanAndrews @DonnaDuncan last edited by

              Hi,

              It's not a big job to implement, best practice is to use a child theme however you could hook it in the theme functions file.

              DonnaDuncan 1 Reply Last reply Reply Quote 1
              • DonnaDuncan
                DonnaDuncan @DeanAndrews last edited by

                Thanks.

                1 Reply Last reply Reply Quote 0
                • DonnaDuncan
                  DonnaDuncan @KevinBudzynski last edited by

                  Thanks for your research Kevin. I saw the same thing. Was looking for work-arounds actually.

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  • Sitemap error in Webmaster tools - 409 error (conflict)
                    JohnSammon
                    JohnSammon
                    0
                    3
                    235

                  • "Moz encountered an error on one or more pages on your site" Error
                    Hurf
                    Hurf
                    0
                    4
                    61

                  • Yoast SEO. After set up 404 error pages
                    A_Fotografy
                    A_Fotografy
                    0
                    3
                    983

                  • Help! How to Remove Error Code 901: DNS Errors (But to a URL that doesn't exist!)
                    FullSteamBusiness
                    FullSteamBusiness
                    0
                    4
                    696

                  • "HTTP error: 404 not found" submitting YOAST SITEMAP
                    evolvingSEO
                    evolvingSEO
                    0
                    5
                    1.2k

                  • During my last crawl suddenly no errors or warnings were found, only one, a 403 error on my homepage.
                    FedeEinhorn
                    FedeEinhorn
                    0
                    2
                    130

                  • Sitemap error
                    Mike.Goracke
                    Mike.Goracke
                    0
                    4
                    132

                  • How to fix this 404 : Error ( 4XX (Client Error) )
                    igor.pinchevskiy
                    igor.pinchevskiy
                    0
                    3
                    1.2k

                  Get started with Moz Pro!

                  Unlock the power of advanced SEO tools and data-driven insights.

                  Start my free trial
                  Products
                  • Moz Pro
                  • Moz Local
                  • Moz API
                  • Moz Data
                  • STAT
                  • Product Updates
                  Moz Solutions
                  • SMB Solutions
                  • Agency Solutions
                  • Enterprise Solutions
                  • Digital Marketers
                  Free SEO Tools
                  • Domain Authority Checker
                  • Link Explorer
                  • Keyword Explorer
                  • Competitive Research
                  • Brand Authority Checker
                  • Local Citation Checker
                  • MozBar Extension
                  • MozCast
                  Resources
                  • Blog
                  • SEO Learning Center
                  • Help Hub
                  • Beginner's Guide to SEO
                  • How-to Guides
                  • Moz Academy
                  • API Docs
                  About Moz
                  • About
                  • Team
                  • Careers
                  • Contact
                  Why Moz
                  • Case Studies
                  • Testimonials
                  Get Involved
                  • Become an Affiliate
                  • MozCon
                  • Webinars
                  • Practical Marketer Series
                  • MozPod
                  Connect with us

                  Contact the Help team

                  Join our newsletter
                  Moz logo
                  © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                  • Accessibility
                  • Terms of Use
                  • Privacy