Yoast and Standard theme: Fatal error
-
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"
-
Thanks for your research Kevin. I saw the same thing. Was looking for work-arounds actually.
-
Thanks.
-
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.
-
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
-
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
orfunction_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
orfunction_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
-
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."
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Error: The URL you entered does not appear to be returning a page successfully
I keep getting the above error when I'm trying to look at the page optimization for a new blog page we have uploaded. It was posted over a week ago, so I assumed it would be indexed by now. Any thoughts on why it isn't working? The page is: http://www.esg.co.uk/blog/blog/2015/why-is-air-quality-testing-so-important/#.VmlBmLiLRpg Thanks
Technical SEO | | Charley_Tangerine0 -
Does anyone know if an increase in 804 HTTPS errors will affect SEO rankings?
We recently moved our whole site over from HTTP to HTTPS and we went from having 106 keywords in the top 3 positions to 80 in just one week. The only thing that I can think of that caused the drop is the HTTPS changes to our site. Any input would be greatly appreciated.
Technical SEO | | SimonWorsfold0 -
Drupal's Yoast
Hi. I'm wondering if anyone knows of an equivalent to Yoast for Drupal sites? Is there such a thing? I've been asked whether I could optimize a Drupal site and am wondering if the guiding principles and techniques I use for HTML and Wordpress sites can be easily transferred to a Drupal implementation, or whether I might be setting myself (and the client!) up for failure. Any observations or advice would be appreciated.
Technical SEO | | DonnaDuncan0 -
Crawl errors: 301 (permanent redirect)
Hi, here are some questions about SEO Crawl Diagnostics. We've recently found out this 301 (permanent redirect) errors in our website and we concluded that the two factors below are the causes. 1. Some of our URLs that has no / at the end is automatically redirected to the same URL but with / at the end. 2. For SEO reasons we have designed our website in a way that when we type in a URL it will automatically redirect to a more SEO friendly URL. For example, if one of the URLs is www.example.com/b1002/, it will automatically redirect to www.example.com/banana juice/. The question is, are these so significant for our SEO and needs to be modified? One of the errors in our blog was having too many on-page links. Is this also a significant error and if so, how many on-page links are recommended from the SEO perspective? Thanks in advance.
Technical SEO | | Glassworks0 -
Has anyone else gotten strange WMT errors recently?
Yesterday, one of my sites got this message from WMT: "Over the last 24 hours, Googlebot encountered 1 errors while attempting to retrieve DNS information for your site. The overall error rate for DNS queries for your site is 100.0%." I did a fetch as Googlebot and everything seems fine. Also, the site is not seeing a decrease in traffic. This morning, a client for which I am doing some unnatural links work emailed me about a site of his that got this message: "Over the last 24 hours, Googlebot encountered 1130 errors while attempting to access your robots.txt. To ensure that we didn't crawl any pages listed in that file, we postponed our crawl. Your site's overall robots.txt error rate is 100.0%." His robots.txt looks fine to me. Is anyone else getting messages like this? Could it be a WMT bug?
Technical SEO | | MarieHaynes1 -
OMG!! 1300 404 Errors. HELP ME!!!
Day by day google detecting 404 errors urls. Currently it is cross 1340 urls. Please help me to get out of this shit. You can check the screenshot here You can see the screenshot here- http://img856.imageshack.us/img856/429/954b503e0781462c8a15774.png Please check the website - www.plugnbuy.com Kindly help me. I use nofollow tag but still don't know why google detecting those errors.
Technical SEO | | chandubaba1 -
404 errors is webmaster - should I 301 all pages?
Currently working on a retail site that shows over 1200 404 errors coming from urls that are from products that were on the site, but have now been removed as they are seasonal/out of stock. What is the best way of dealing with this situation ongoing? I am aware of the fact that these 404s are being marked as url errors in Google Webmaster. Should I redirect these 404s to a more appropriate live page or should I leave them as they are and not redirect them? I am concerned that Google may give the site a penalty as these 404s are growing (as the site is a online retail store and has products removed from its page results regularly). I thought Google was able to recognise 404s and after a set period of time would push them out of the error report. Also is there a tool out there that on mass I can run all the 404s urls through to see their individual page strength and the number of links that point at each one? Thanks.
Technical SEO | | Oxfordcomma0 -
Fixing a wordpress 404 error for /feed and /comments/feed?
I have a wordpress site that does not have a blog currently. I'm getting a 404 for /feed and /comments/feed. Anyone know how I can fix?
Technical SEO | | DM50