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
-
Redirect chain error free htaccess code for website
i want to redirect domain, example.com to https://www.example.com, is anyone can help me to provide redirect chain error free ht-access code. I implemented this htaccess code on the website and mhy site show on the moz redirect chain error RewriteCond %{HTTP_HOST} !=""
Technical SEO | | truehab
RewriteCond %{THE_REQUEST} ^[A-Z]+\s//+(.)\sHTTP/[0-9.]+$ [OR]
RewriteCond %{THE_REQUEST} ^[A-Z]+\s(./)/+\sHTTP/[0-9.]+$
RewriteRule .* http://%{HTTP_HOST}/%1 [R=301,L]0 -
301 vs 500 Errors for discontinued products
I have a client that has a around 15 "products" (they are pages containing details of the products rather than e-Commerce products) that have been discontinued. The client has suggested 301s but unless the alternative products are replacement products am I correct that we should be using a 500 error?
Technical SEO | | MentorDigital0 -
Will sitemap generated in Yoast for a combined wordpress/magento site map entire site ?
Hi For an ecommerce site thats been developed via a combination of wordpress and magento and has yoast installed, will the sitemap (& other yoast features) map (& apply to) the entire site or just wordpress aspects ? In other words does one need to do anything else to have a full sitemap for a combined magento/wordpress site or will Yoast cover it all ? This link seems to suggest should be fine but seeing if anyone else encountered this and had problems or if straightforward ? http://fishpig.co.uk/wordpress-integration/docs/plugins.html cheers dan
Technical SEO | | Dan-Lawrence0 -
Seo Yoast Plugin
In Yoast seo plugin, under the general settings is Sitewide meta settings,under which there is an option to either check or leave unchecked Noindex subpages of archives which says: If you want to prevent /page/2/ and further of any archive to show up in the search results, enable this. I am very confuse if to check or not. What is the best seo practice? Most of our posts are in categories which have 2-4 pages.
Technical SEO | | VillasDiani0 -
Standard Responses Causing Duplication Issues
Hi Guys We have a Q&A section on our site which we reply to customers using standard responses which have already been approved. This is causing a lot of duplication errors, however due to the nature of our business we need to use these responses. Is there anything that we can do to stop this? Matthew
Technical SEO | | EwanFisher0 -
Hiring someone to assist us in fixing SEOMOZ Errors
Greetings. We have been using SEOMOZ for about 9 months and we are needing to hire someone to assist us in fixing ERRORS promulgated by our SEOMOZ weekly crawl. Does anyone know of any person or firm that can assist us with this?
Technical SEO | | GreatFence0 -
Lots of overdynamic URL and crawl errors..
Just wanted some advice. SEOmoz crawl found out about 18,000 errors. The error URLs are all mainly URLs like the one below, which seem to be the registration URL with a re-direct on, going back the product after registration: http://www.DOMAIN.com/index.php?_g=co&_a=reg&redir=/index.php?_a=viewProd%26productId=3465 We have the following line in the robots file to stop the login page from being crawled: Disallow: /index.php?act=login If I add the following, will it stop the error? Disallow: /index.php?act=reg Thanks in advance**.**
Technical SEO | | filarinskis0 -
How to resolve duplicate content and title errors?
Hello, I'm new to this resource and SEO. I have taken the time to read other posts but am not entirely sure about the best way to resolve the issues I am experiencing and so am hoping for a helpful hand. My site diagnostics advise me that most of my errors relate to duplicate content and duplicate page titles. Most of these errors seem to relate to our ecommerce product pages. A little about us first, we manufacture and retail over the internet our own line of unique products which can only be purchased through our website. So it’s not so important to make our product pages stand out from competitors. An example of one of our product pages can be found here: http://www.nabru.co.uk/product/Sui+2X2+Corner+Sofa In terms of SEO we are focusing on improving the rankings of our category pages which compete much more with our competitors, but would also like our product pages to be found via a google search for those potential customers that are at the late stage of a buying cycle. So my question: Whilst it would be good to add more content to the product pages, user reviews, individual product descriptions etc (and have good intentions to do this over time, which unfortunately is limited) is there an easy way to fix the duplicate content issues, ensure our products can be found and ensure that the main focus is on our category pages? Many thanks.
Technical SEO | | jannkuzel0