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
-
Broken canonical link errors
Hello, Several tools I'm using are returning errors due to "broken canonical links". However, I'm not too sure why is that. Eg.
Technical SEO | | GhillC
Page URL: domain.com/page.html?xxxx
Canonical link URL: domain.com/page.html
Returns an error. Any idea why? Am I doing it wrong? Thanks,
G1 -
Homepage not ranking main keywords - structure error?
Dear, Moz community We have an issue. We have a classified advertisement website. Our website is built like this**homepage (**Optimized for main keyword, has latest listings from all categories ) - category 1 (we did not want to add alteration of the keyword we want to rank homepage, as we thought this would "compete" with homepage) - category 2 - category 3 - **category **4 The listing URLs look like this www.example.com/categoryname/listingname Now the issue is that the homepage is not ranking at all for the main keywords. When we used URL structure like this "example.com/main-keyword-listing-id" homepage was ranking (other sites). Now with new site we used the best practice and added url's as described above (/categoryname/listingid).This caused our homepage not to rank at all for the main keywords.What did we do wrong? We want our homepage to rank for the main keyword and categories for theirs. Should we 1. Change the category 1 name to main keyword (maybe some long tail) so we have the main keyword in URLs? So at least one of the main categories has the main keyword in the listing URLs2. Should we change the category listing urls all back to /main-keyword-listing-id? We thought that this was a bit spammy, so that´s why we used categories. _This means that all listings have same URL name and not best for ranking cateogries_3. Just link back to homepage internally with the main keyword and google should catch that? _Currently in menu you go to homepage clicking HOME but we can add for example our main keyword there - Latest car advertisements _I would be happy of any feedback.
Technical SEO | | advertisingtech0 -
Best strategy to handle over 100,000 404 errors.
I recently been given a site that has over one-hundred thousand 404 error codes listed in Google Webmasters. It is really odd because according to Google Webmasters, the pages that are linking to these 404 pages are also pages that no longer exist (they are 404 pages themselves). These errors were a result of site migration that had occurred. Appreciate any input on how one might go about auditing and repairing large amounts of 404 errors. Thank you.
Technical SEO | | SEO_Promenade0 -
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 -
Duplicate Page Content error but I can't see it
Hi All We're getting a lot of Duplicate Page Content errors but I can't match it up. For example this page: http://www.daytripfinder.co.uk/attractions/32-antique-cottage It is saying the on page properties as follows: Title DayTripFinder - Things to do reviewed by you - 7,000 attractions <dt style="color: #5e5e5e; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">Meta Description</dt> <dt style="color: #5e5e5e; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">Read Reviews, Browse Opening Hours and Prices. View Photos, Maps. 7,000 UK Visitor Attractions.</dt> <dt style="color: #5e5e5e; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">But this isn't the page title or meta description.
Technical SEO | | KateWaite85
</dt> <dt style="color: #5e5e5e; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">And it's showing five (many others) example pages that share it. Again the page titles and description are different.</dt> <dt style="color: #5e5e5e; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">http://www.daytripfinder.co.uk/attractions/mckinlay-theatre</dt> <dt style="color: #5e5e5e; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">http://www.daytripfinder.co.uk/attractions/bakers-dolphin</dt> <dt style="color: #5e5e5e; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">http://www.daytripfinder.co.uk/attractions/shipley-park-fishing</dt> <dt style="color: #5e5e5e; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">http://www.daytripfinder.co.uk/attractions/king-johns-lodge-and-gardens</dt> <dt style="color: #5e5e5e; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">http://www.daytripfinder.co.uk/attractions/city-hall
</dt> Any ideas? Not sure if I'm missing something here! Thanks!0 -
Increase in authorization permission errors error after site switch
We launched our new site 2 days ago , since site was down for 12 hours for maintenance, we saw google webmaster tool shows this error . Since then google hasnt crawled, its been 36 hours. Do we need to do anyting? We have close to a million page google crawled before and I am wondering if this will effect anything.
Technical SEO | | tpt.com0 -
500 error codes caused by W3 Total Cache plugin?
Hello Everyone, I operate a site (http://www.nationalbankruptcyforum.com) that has been receiving 500 error codes in Webmaster Tools as of late. This morning, webmaster tools showed 129 500 crawling errors. I've included one of the URLs that contained an error message here: http://www.nationalbankruptcyforum.com/marriage-and-bankruptcy/do-my-wife-and-i-both-have-to-file-for-bankruptcy/ I've been getting these errors now for about 3 weeks and they've mostly been on obscure, strange URLs (lots of numbers etc.) however, this morning they started showing up on pages that will actually be trafficked by users. I'm really not sure where they're coming from, although I do believe it's a software issue as I've had my hosting company take a look to no avail. I have had some development work done recently and am running the W3 Total Cache plugin (my site is built on WP). I also run the Yoast SEO plugin and rely on it to publish an XML sitemap among other things. Anyone have any idea where these 500 errors originate from? Thanks, John
Technical SEO | | oconn1460 -
Google causing Magento Errors
I have an online shop - run using Magento. I have recently upgraded to version 1.4, and I installed a extension called Lightspeed, a caching module which makes tremendous improvements to Magento's performance. Unfortunately, a confoguration problem, meant that I had to disable the module, because it was generating errors relating to the session, if you entered the site from any page other than the home page. The site is now working as expected. I have Magento's error notification set to email - I've not received emails for errors generated by visitors. However over a 72 hour period, I received a deluge of error emails, which where being caused by Googlebot. It was generating an erro in a file called lightspeed.php Here is an example: URL: http://www.jacksgardenstore.com/tahiti-vulcano-hammock IP Address: 66.249.66.186 Time: 2011-06-11 17:02:26 GMT Error: Cannot send headers; headers already sent in /home/jack/jacksgardenstore.com/user/jack_1.4/htdocs/lightspeed.php, line 444 So several things of note: I deleted lightspeed.php from the server, before any of these error messages began to arrive. lightspeed.php was never exposed in the URL, at anytime. It was referred to in a mod_rewrite rule in .htaccess, which I also commented out. If you clicked on the URL in the error message, it loaded in the browser as expected, with no error messages. It appears that Google has cached a version of the page which briefly existed whilst Lightspeed was enabled. But I though that Google cached generated HTML. Since when does cache a server-side PHP file ???? I've just used the Fetch as Googlebot facility on Webmaster Tools for the URL in the above error message, and it returns the page as expected. No errors. I've had to errors at all in the last 48 hours, so I'm hoping it's just sorted itself out. However I'm concerned about any Google related implications. Any insights would be greatly appreciated. Thanks Ben
Technical SEO | | atticus70