ThemeShaper Forums » Thematic

sandbox_cats_meow() error on Category View

(17 posts)
  • Started 12 years ago by benhaines
  • Latest reply from cdpugh
  • This topic is resolved
  1. Hi Everyone,

    I'm running Pat's Junction theme with Thematic and it looks great. However the category view gives me the following error...

    PHP Fatal error: Call to undefined function sandbox_cats_meow()

    Happy to start digging around in the code, but figured it was probably a simple fix that people had seen before. Grateful for any help.

    Thanks, Ben

    Posted 12 years ago #
  2. benhaines,

    I have the exact same problem, and the worst part is a lot of people do, so when I search for the error I get all these sites with the same problem instead of a solution. I would also be happy to dig through the code but I can't program PHP.

    Did you ever find a solution? I use the Junction theme on my site and it's absolutely smashing there, so if you ever solved it I would be eternally (well, until I find a better theme) grateful to you!

    Kind regards,
    Gerry

    Posted 11 years ago #
  3. I haven't been able to repeat this error. Try deleting your existing version of Thematic and replacing it with the most recent.

    Posted 11 years ago #
  4. Ian,
    First I want to say thanks for the creation the Thematic Framwork, it has helped me immensely in setting up my Wordpress blog and your tutorials and articles are excellent.

    I came across this error as well after installing Thematic 0.7 and Pat Dryburgh's excelent BLAMatic theme. I have tried your solution with no success.

    You can see an example on my blog (it is a work in progress with only test posts)

    www.josephpugh.com

    Just click on one of the navigation links that go to a category archive such as "67 Beetle" to see the error. Prior to installing Thematic 0.7 today, this error was not present.

    Posted 11 years ago #
  5. Does your copy of category.php have sandbox_cats_meow() included anywhere in it?

    Posted 11 years ago #
  6. Hi Ian,

    Back again, still not having solved the problem. I can confirm that my wp-includes/category.php file does not include the sandbox_cats_meow() function.

    Am currently checking to see if wordpress has this by default.

    Thanks for your continued help.

    Ben

    Posted 11 years ago #
  7. Also checked the category.php file that comes with Thematic 0.7... its not there either.

    Posted 11 years ago #
  8. We certainly aren't the only ones having this problem. Google alone has 200+ hits on the search for that error...

    http://www.google.co.uk/search?q=Call+to+undefined+function+sandbox_cats_meow()&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a

    Posted 11 years ago #
  9. Found the function in the sandbox functions.php file... however not in the thematic functions.php file...

    This is the code


    // For category lists on category archives: Returns other categories except the current one (redundant)
    function sandbox_cats_meow($glue) {
    $current_cat = single_cat_title( '', false );
    $separator = "\n";
    $cats = explode( $separator, get_the_category_list($separator) );
    foreach ( $cats as $i => $str ) {
    if ( strstr( $str, ">$current_cat<" ) ) {
    unset($cats[$i]);
    break;
    }
    }
    if ( empty($cats) )
    return false;

    return trim(join( $glue, $cats ));
    }

    Posted 11 years ago #
  10. Ian,

    Can you tell us where you expect us to have the sandbox functions? Simply installing sandbox as a theme doesn't help. So I can only image its in the thematic functions.

    Thanks for your help.

    Ben

    Posted 11 years ago #
  11. I have checked the category.php in the copy of Thematic 0.7 I downloaded yesterday and downloaded another copy today to ensure that I didn't have a problem with the download.

    Neither have sandbox_cats_meow() within.

    Posted 11 years ago #
  12. That's what I'm not getting. You shouldn't have a call to sandbox_cats_meow. Pre-0.7 Thematic used that function. Category.php shouldn't be looking for it.

    For instance, http://patdryburgh.net/ isn't having a problem nor is the Thematic demo site.

    It's a really weird error.

    Posted 11 years ago #
  13. Ah, I see where the confusion lies. It is within the specific child themes used. In the BLAMatic functions.php file here is the excerpt of code calling the function in question:

    $postcategory .= '<span class="cat-links">';
        if (is_single()) {
            $postcategory .= __('This entry was posted in ', 'thematic') . get_the_category_list(', ');
            $postcategory .= '</span>';
        } elseif ( is_category() && $cats_meow = sandbox_cats_meow(', ') ) { /* Returns categories other than the one queried */
            $postcategory .= __('Also posted in ', 'thematic') . $cats_meow;
            $postcategory .= '</span> <span class="meta-sep">|</span>';
        } else {
            $postcategory .= __('Posted in ', 'thematic') . get_the_category_list(', ');
            $postcategory .= '</span> <span class="meta-sep">|</span>';
        }

    Given that Thematic 0.7 doesn't use this code any longer, is there a replacement function that provides the functionality of the sandbox_cats_meow() function?

    I understand the Pat Dryburgh is no longer supporting his themes due to a very busy schedule, so perhaps if a solution can be generated to address this issue, he might be willing to include it in a new release of the Junction and Blamatic child themes.

    Posted 11 years ago #
  14. Ah, simple fix then. Replace sandbox with thematic.

    Posted 11 years ago #
  15. I was thinking that would be the best idea to try, but I couldn't find that function definition in the assortment of files I browsed through.

    I have made the change and it is working now.

    Thanks Ian and everyone for the comments!!!

    Joe

    Posted 11 years ago #
  16. Hi, I was wondering if you could tell me which bits I need to replace and in what file to get this to work properly? Thanks!

    Posted 11 years ago #
  17. sorry, I reread the post and figured it out. Coffee hadn't kicked in yet. Please disregard.

    Posted 11 years ago #

RSS feed for this topic

Reply

You must log in to post.