• Resolved Cartmell86

    (@cartmell86)


    Hello everyone

    I’ve been trying to research and debug this issue myself with no resolve yet, so I am hoping someone can assist me here.

    https://beta.albertacraneservice.com/listings/tadano-tr-280xl/ is my website (linked right to page required). Whenever I click on the image I get this error

    Home
    Catchable fatal error: Object of class WP_Error could not be converted to string in /****/******/beta.albertacraneservice.com/wp-content/themes/enigma/functions.php on line 235

    Enigma Theme functions.php line 235 as followed
    echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');

    OF

    } elseif (is_attachment()) {
            $parent = get_post($post->post_parent);
            $cat = get_the_category($parent->ID);
            $cat = $cat[0];
            echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
            echo '<li><a href="' . get_permalink($parent) . '">' . $parent->post_title . '</a></li> ' . $delimiter . ' ';
            echo $before . get_the_title() . $after;
        }

    Enigma Theme, with BePro listings plugin

    If I missed anything, let me know

    Thank you in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator t-p

    (@t-p)

    – you active theme “enigma” seems to be the issue.

    – does the error go away if you switched to the default Twenty Fourteen theme via FTP or SFTP or whatever file management application provided by your hosting provider (cPanel…)?

    Thread Starter Cartmell86

    (@cartmell86)

    Yes, the error goes away on a the default theme Twenty Fourteen.

    Although I’ve put a ton of dedicated and time into this other theme, I would hate to have to rebuild from the ground up. Suggestions to possible fixes?

    Thread Starter Cartmell86

    (@cartmell86)

    Nevermind, I have found a fix, very simple and easy. If anyone else runs into this issue with “Enigma” Theme

    Taken from Line 231 – 238

    } elseif (is_attachment()) {
            $parent = get_post($post->post_parent);
            $cat = get_the_category($parent->ID);
            $cat = $cat[0];
            echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
            echo '<li><a href="' . get_permalink($parent) . '">' . $parent->post_title . '</a></li> ' . $delimiter . ' ';
            echo $before . get_the_title() . $after;
        }

    Change to

    } elseif (is_attachment()) {
            $parent = get_post($post->post_parent);
            $cat = get_the_category($parent->ID);
            $cat = $cat[0];
           #  echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
            echo '<li><a href="' . get_permalink($parent) . '">' . $parent->post_title . '</a></li> ' . $delimiter . ' ';
            echo $before . get_the_title() . $after;
        }

    Moderator t-p

    (@t-p)

    Yes, the error goes away on a the default theme Twenty Fourteen.

    This is a clear indication that your Enigma Theme is broken.

    If you are not using the latest version of Enigma Theme, try that first.

    If you are, then bring the issue to its author’s attention at: https://www.ads-software.com/support/theme/enigma

    Moderator t-p

    (@t-p)

    Glad you got it sorted ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Catchable fatal error’ is closed to new replies.