[SOLVED] Error:Object WP_Error could not be converted to string ... breadcrumbs ... o
Hi,
big kudos to you Flynn for Montezuma theme, I love it, and can't imagine to work with something different. This theme and your ways of solving site management defined my WP understanding. I have a site with 300+ posts, several pages and categories, etc. Since long time there is a log line which appears to show randomly and is looking like this: Code:
[Thu Sep 10 10:57:38 2015] [error] [client 157.55.39.194] PHP Catchable fatal error: Object of class WP_Error could not be converted to string in /home/piotao/PKB/www/wp-content/themes/montezuma/includes/breadcrumbs.php on line 56 Could you be so nice and find some time to help?
|
Quote:
change line 56 from HTML Code:
echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' '); HTML Code:
echo is_wp_error( $cat_parents = get_category_parents($cat, TRUE, ' ' . $delimiter . ' ') ) ? '' : $cat_parents; |
Thank you, I was not aware that there is such a nice function. Things seems to be nicely silenced by this nifty hack.
But if I upgrade Montezuma to the next (possibly) release, this will be lost, until I enter it again, will it not? |
Hi again, the code is not exactly the same. Actually I'm writing this post the second time, because I closed a browser accidentally :(
So the code is the following: Code:
} elseif ( is_attachment() ) { Code:
} elseif ( is_attachment() ) { |
Quote:
Quote:
edit style.css and you will see the version you have. it is important to let me know so I can see what is ion line 56 of that version. My 'patch' might not be correct, however if you are on version 1.2.8 and your line 56 is not the same as mine, you might have other issues... |
OK, this is strange. I have hacked that file and patch I suggested above works. The Montezuma theme has version 1.2.8 as well.
So the strange thing is that this line was not the same. I don't remember if I mess up something, but nevertheless after last upgrade it should be cleaned. Maybe this file is not update with the update? Dunno. This repair works, so thank you anyway, your help is valuable and much appreciated! |
All times are GMT -6. The time now is 12:00 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.