WordPress.org

Ready to get started?Download WordPress

Forums

ReciPress
Catchable fatal error: Object of class WP_Error could not be converted to string (13 posts)

  1. monfree
    Member
    Posted 2 years ago #

    Hi,

    After I update wordpress to 3.3 version I took this error message from recipress

    Can you please help me to fix this?

    Catchable fatal error: Object of class WP_Error could not be converted to string in ../mutfaktabirivar/wp-content/plugins/recipress/php/functions.php on line 204

    Regards

    Seyhan

    http://wordpress.org/extend/plugins/recipress/

    http://wordpress.org/extend/themes/recipress/

  2. Tammy Hart
    Member
    Plugin Author

    Posted 2 years ago #

    This happens when you have a blank ingredient line in your recipe. There will be an update later today that will fix this, but for now, you can open up php/functions.php and add this after line 201:
    if(!$ingredient['ingredient']) continue;

  3. monfree
    Member
    Posted 2 years ago #

    Thanks for help but it is still same. I think I will wait update. Here is the code what I addedd

    if(!$ingredient['ingredient']) continue;
    <?php foreach ($options as $value) {

    switch ( $value['type'] ) {

    case "open":
    ?>
    <table width="100%" border="0" style=" padding:10px;">

  4. Tammy Hart
    Member
    Plugin Author

    Posted 2 years ago #

    ah, WordPress adds a line break to plugin and theme files. Search for foreach($ingredients as $ingredient) { and add it after that. You should wind up with this:

    foreach($ingredients as $ingredient) {
    	if(!$ingredient['ingredient']) continue;
    	$output .= '<li class="ingredient">
    ... etc ...
  5. monfree
    Member
    Posted 2 years ago #

    I did it but still same :(

  6. Tammy Hart
    Member
    Plugin Author

    Posted 2 years ago #

    Is it doing that on every recipe, or just one or two? Can you check them to see if you have an empty ingredient entry? If you don't, the problem has a different root.

  7. monfree
    Member
    Posted 2 years ago #

    it is happen for all recipes. There is no empty ingredient. And everythings works good before wordpress 3.3 upgrade

  8. monfree
    Member
    Posted 2 years ago #

    When update will be publish?

    Error still continue

  9. monfree
    Member
    Posted 2 years ago #

    There is no changes after update

    Error still continue

  10. monfree
    Member
    Posted 2 years ago #

    After last update 1.7
    Error line changed to 211

    Catchable fatal error: Object of class WP_Error could not be converted to string in ../mutfaktabirivar/wp-content/plugins/recipress/php/functions.php on line 211

    Line 211 in functions.php is

    $output .= '<span class="name">'.$ingredient.'</span> ';

  11. Tammy Hart
    Member
    Plugin Author

    Posted 2 years ago #

    would you be willing to give me admin access so i can play directly with your installation? you could create a temp admin user and then delete once we're finished. I had this error on another site and was able to fix it, but the fix isn't working for you for some reason and I'd like to be able to dig in myself, rather than stab around in the dark.

  12. monfree
    Member
    Posted 2 years ago #

    I emailed to you access information

    Thank you

  13. Tammy Hart
    Member
    Plugin Author

    Posted 2 years ago #

    For others that may be following this thread: the issue with monfree's installation is that the turkish alphabet includes many special characters and thus breaks the get_term_link function. I am currently looking into a long term solution for this. Meanwhile, I've removed that function from his installation for now.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags