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
-
Problem with Yoast not seeing any of this website's text/content
Hi, My client has a new WordPress site http://www.londonavsolutions.co.uk/ and they have installed the Yoast Premium SEO plug-in. They are having issues with getting the lights to go green and the main problem is that on most pages Yoast does not see any words/content – although there are plenty of words on the pages. Other tools can see the words, however Yoast is struggling to find any and gives the following message:- Bad SEO score. The text contains 0 words. This is far below the recommended minimum of 300 words. Add more content that is relevant for the topic. Readability - You have far too little content. Please add some content to enable a good analysis. They have contacted the website developer who says that there is nothing wrong, but they are frustrated that they cannot use the Yoast tools themselves because of this issue, plus Yoast are offering no support with the issue. I hope that one of you guys has seen this problem before, or can spot a problem with the way the site has been built and can perhaps shed some light on the problem. I didn't build the site myself so won't be offended if you spot problems with it. Thanks in advance, Ben
Technical SEO | | bendyman0 -
404 Error Pages being picked up as duplicate content
Hi, I recently noticed an increase in duplicate content, but all of the pages are 404 error pages. For instance, Moz site crawl says this page: https://www.allconnect.com/sc-internet/internet.html has 43 duplicates and all the duplicates are also 404 pages (https://www.allconnect.com/Coxstatic.html for instance is a duplicate of this page). Looking for insight on how to fix this issue, do I add an rel=canonical tag to these 60 error pages that points to the original error page? Thanks!
Technical SEO | | kfallconnect0 -
404 errors
Hi I am getting these show up in WMT crawl error any help would be very much appreciated | ?escaped_fragment=Meditation-find-peace-within/csso/55991bd90cf2efdf74ec3f60 | 404 | 12/5/15 |
Technical SEO | | ReSEOlve
| | 2 | mobile/?escaped_fragment= | 404 | 10/26/15 |
| | 3 | ?escaped_fragment=Tips-for-a-balanced-lifestyle/csso/1 | 404 | 12/1/15 |
| | 4 | ?escaped_fragment=My-favorite-yoga-spot/csso/5598e2130cf2585ebcde3b9a | 404 | 12/1/15 |
| | 5 | ?escaped_fragment=blog/c19s6 | 404 | 11/29/15 |
| | 6 | ?escaped_fragment=blog/c19s6/Tag/yoga | 404 | 11/30/15 |
| | 7 | ?escaped_fragment=Inhale-exhale-and-once-again/csso/2 | 404 | 11/27/15 |
| | 8 | ?escaped_fragment=classes/covl | 404 | 10/29/15 |
| | 9 | m/?escaped_fragment= | 404 | 10/26/15 |
| | 10 | ?escaped_fragment=blog/c19s6/Page/1 | 404 | 11/30/15 | | |0 -
Google webmaster errors
**If you know what these google webmasters errors mean, and you can explain it to me in simple english and tell me how I can locate the problem, I would really appreciate it!. <colgroup><col width=""><col width=""><col width=""><col width=""><col width="*"><col width="124"><col width="54"></colgroup>
Technical SEO | | Joseph-Green-SEO
| | | | | Server error | | | | Soft 404 | | | | Access denied | | Not found | | | Not followed | | | |** I have many of these errors, is it harming SEO?Yoseph0 -
I have custom 404 page and getting so much 404 error on Google webmaster, what should i do?
I have a custom 404 page with popular post and category links in the page, everyday i have 404 crawl error on webmaster tools, what should i do?
Technical SEO | | rimon56930 -
Odd 404 Errors in WP That I cannot find the origin
Hello Everyone, I have a really odd error that I cannot figure out how to fix. I keep getting a 404 error (through google webmaster tools, and SEOmoz) at this url http://www.cio-tech.com/cios-oracle-optimization-results-roi-justification-save-20m-over-5-years/www.SynSynAck.com... I am not even too sure how this link originated because the first part is a URL to a blog post, and the second is another website that I have. I'd appreciate any help on the matter.
Technical SEO | | Packetman0070 -
Google Webmaster tools error?
So I am trying to set the URL preference in google webmaster tools for my site. However when I try to save it it tells me to verify that I own the site. I have already done this so where can I go to verify I own the site exactly? Maybe I am wrong and I have not done this already but even on the homepage of webmaster tools I don't see an option to "verify".
Technical SEO | | ENSO0 -
How to fix 404 (Client Error) errors in wordpress blog?
hey A very quick question...after analyzed my wp blog I've found "34" 404 (Client Error) Errors and I don't know how to fix it, do you know how?? *I renew html code of 404 of my wordpress blog.
Technical SEO | | akitmane1