Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By lcwakeman

Thread: smarty errors

  1. #1
    robwerks is offline Member
    Join Date
    Aug 2010
    Posts
    10

    Default smarty errors

    Hello,

    I've been having trouble exporting just about everything but it never gives me any kind of error so I turned on stack trace and it gives me the following on every page load,

    Warning: unlink(cache/smarty/templates_c/%%85^85B^85B0F62F%%header.tpl.inc) [function.unlink]: No such file or directory occured in /home1/endless9/public_html/sugar/include/Smarty/Smarty.class.php on line 1774 [2010-09-08 19:54:06] display_stack_trace caller, file: /home1/endless9/public_html/sugar/include/utils.php line#: 2777
    [L:](:StackTraceErrorHandler)
    /home1/endless9/public_html/sugar/include/Smarty/Smarty.class.php[L:1774](:unlink)
    /home1/endless9/public_html/sugar/include/Smarty/internals/core.rm_auto.php[L:40](Smarty:_unlink)
    /home1/endless9/public_html/sugar/include/Smarty/Smarty.class.php[L:1032](:smarty_core_rm_auto)
    /home1/endless9/public_html/sugar/include/MVC/View/SugarView.php[L:481](Smarty:clear_compiled_tpl)
    /home1/endless9/public_html/sugar/include/MVC/View/SugarView.php[L:113](SugarView:displayHeader)
    /home1/endless9/public_html/sugar/include/MVC/Controller/SugarController.php[L:291](SugarViewrocess)
    /home1/endless9/public_html/sugar/include/MVC/Controller/SugarController.php[L:272](SugarControllerrocessView)
    /home1/endless9/public_html/sugar/include/MVC/SugarApplication.php[L:84](SugarController:execute)
    /home1/endless9/public_html/sugar/index.php[L:43](SugarApplication:execute)

    SugarCE 6.0.1
    Apache/MySQL/PHP stack on a hosted server
    all modules uninstalled

    Any ideas?
    Last edited by robwerks; 2010-09-09 at 02:17 AM.

  2. #2
    lcwakeman is offline Sugar Community Member
    Join Date
    Oct 2009
    Posts
    27

    Default Re: smarty errors

    I just ran across the same issue. I changed the _unlink function in /include/Smarty/Smarty.class.php to the following (line 1761):

    PHP Code:
        /**
         * unlink a file, possibly using expiration time
         *
         * @param string $resource
         * @param integer $exp_time
         */
        
    function _unlink($resource$exp_time null)
        {
            if(isset(
    $exp_time)) {
                if(
    time() - @filemtime($resource) >= $exp_time) {
                    if (
    file_exists($resource)) return @unlink($resource);
                    return 
    true;
                }
            } else {
                if (
    file_exists($resource)) return @unlink($resource);
                return 
    true;
            }
        } 
    I did a little looking and I found the version of smarty that is being used is quite old.
    gregbaskind likes this.

  3. #3
    blak3r's Avatar
    blak3r is offline Sugar Community Member
    Join Date
    Sep 2010
    Location
    Maryland
    Posts
    240

    Default Re: smarty errors

    lcwakeman, Thanks for posting this fix.

    It did the trick for me. I was getting this error whenever i was in developer mode in 6.0.3 and 6.1 pro.
    Sugar 6 Pro, On-Site (Apache 2.0, MySQL 5.1, PHP 5.2.6)

    My SugarForge Projects:
    Email To Sugar - Archive emails in any mail client by adding a BCC line.
    Task Dashlets Plus- Adds custom dashlets for: tasks assigned to me by others, delegated tasks, overdue tasks, and open tasks past start date

    www.blakerobertson.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Help - Smarty Errors
    By Blastus in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2008-06-20, 08:11 PM
  2. Smarty Errors
    By Jweldon in forum Help
    Replies: 0
    Last Post: 2006-05-10, 09:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •