WordPress.org

Ready to get started?Download WordPress

Forums

ReciPress
Error In Latest 1.9 Release (7 posts)

  1. fairlight
    Member
    Posted 2 years ago #

    I seem to be getting this at the bottom of my page immediately after upgrading to the latest version of recipress.

    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/content/49/8717749/html/wp-content/plugins/recipress/php/functions.php on line 212

    Not sure if this is a bug or something i did wrong in my part. Any feedback would be greatly appreciated.

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

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

  2. Tammy Hart
    Member
    Plugin Author

    Posted 2 years ago #

    Is it upgrading at all? Or just quitting with this message?

  3. fairlight
    Member
    Posted 2 years ago #

    Thank you for the response Tammy. Yes, the upgrade does indeed finish just fine. The message appears only after the install and reactivation of the plugin.

  4. Tammy Hart
    Member
    Plugin Author

    Posted 2 years ago #

    I am not getting this error in any of my tests. Try removing the plugin completely and reinstalling. It may be an installation error.

  5. jondaley
    Member
    Posted 2 years ago #

    This bug happens if someone types in an ingredient that wasn't previously saved in the database.

    I changed the code in functions.php like this:

    if (isset($the_ingredient)){
                        $term = get_term_by('name', $the_ingredient, 'ingredient');
                        if($term)
                            $output .= '<span class="name"><a href="'.get_term_link($term->slug, 'ingredient').'">'.$the_ingredient.'</a></span> ';
                        else
                            $output .= '<span class="name">'.$the_ingredient.'</span> ';
                    }

    The main difference is that $term is checked for null before being used. I figure the ingredient should be allowed to be printed, and just doesn't have a link.

  6. Tammy Hart
    Member
    Plugin Author

    Posted 2 years ago #

    the 1.9.1 release does something similar.

  7. fairlight
    Member
    Posted 2 years ago #

    Tammy, that update did the trick. Thank you again for everything. Very much appreciated. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags