Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

template_dir problem (2.6.31)

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
reverso
Smarty n00b


Joined: 05 Dec 2017
Posts: 3

PostPosted: Tue Dec 05, 2017 5:43 pm    Post subject: template_dir problem (2.6.31) Reply with quote

Hi,

I try to upgrade my web app to PHP 7, so I've installed Smarty library via Composer to version 2.6.31-dev (I had 2.6.26 before).
I set template_dir globally and use relative paths when I generate view using fetch (or display).
After upgrade I always get empty view, but if I feed fetch (or display) method manually with absolute path, it works correctly.
Where is the problem? Any suggestions?
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Tue Dec 05, 2017 10:33 pm    Post subject: Reply with quote

My first guess would be wrong templateDir.
But only you can tell. Debug your code, find the issue and fix it.
Back to top
View user's profile Send private message
reverso
Smarty n00b


Joined: 05 Dec 2017
Posts: 3

PostPosted: Wed Dec 06, 2017 8:58 am    Post subject: Reply with quote

$MySmartyObject->template_dir is set properly.
What is "templateDir" - the same?
Back to top
View user's profile Send private message
reverso
Smarty n00b


Joined: 05 Dec 2017
Posts: 3

PostPosted: Wed Dec 06, 2017 10:40 am    Post subject: Reply with quote

Here is $MySmartyObject
Code:

object(view)#13 (59) {
  ["template_dir"]=>
  string(27) "/Users/jarek/src/orion/app/"
  ["compile_dir"]=>
  string(26) "/Users/jarek/src/orion/tmp"
  ["config_dir"]=>
  string(27) "/Users/jarek/src/orion/app/"
  ["plugins_dir"]=>
  array(2) {
    [0]=>
    string(7) "plugins"
    [1]=>
    string(38) "/Users/jarek/src/orion/smarty_plugins/"
  }
  ["debugging"]=>
  bool(false)
  ["error_reporting"]=>
  bool(true)
  ["debug_tpl"]=>
  string(0) ""
  ["debugging_ctrl"]=>
  string(4) "NONE"
  ["compile_check"]=>
  bool(true)
  ["force_compile"]=>
  bool(false)
  ["caching"]=>
  int(0)
  ["cache_dir"]=>
  string(5) "cache"
  ["cache_lifetime"]=>
  int(3600)
  ["cache_modified_check"]=>
  bool(false)
  ["php_handling"]=>
  int(0)
  ["security"]=>
  bool(false)
  ["secure_dir"]=>
  array(0) {
  }
  ["security_settings"]=>
  array(7) {
    ["PHP_HANDLING"]=>
    bool(false)
    ["IF_FUNCS"]=>
    array(11) {
      [0]=>
      string(5) "array"
      [1]=>
      string(4) "list"
      [2]=>
      string(5) "isset"
      [3]=>
      string(5) "empty"
      [4]=>
      string(5) "count"
      [5]=>
      string(6) "sizeof"
      [6]=>
      string(8) "in_array"
      [7]=>
      string(8) "is_array"
      [8]=>
      string(4) "true"
      [9]=>
      string(5) "false"
      [10]=>
      string(4) "null"
    }
    ["INCLUDE_ANY"]=>
    bool(false)
    ["PHP_TAGS"]=>
    bool(false)
    ["MODIFIER_FUNCS"]=>
    array(1) {
      [0]=>
      string(5) "count"
    }
    ["ALLOW_CONSTANTS"]=>
    bool(false)
    ["ALLOW_SUPER_GLOBALS"]=>
    bool(true)
  }
  ["trusted_dir"]=>
  array(0) {
  }
  ["left_delimiter"]=>
  string(1) "{"
  ["right_delimiter"]=>
  string(1) "}"
  ["request_vars_order"]=>
  string(5) "EGPCS"
  ["request_use_auto_globals"]=>
  bool(true)
  ["compile_id"]=>
  NULL
  ["use_sub_dirs"]=>
  bool(false)
  ["default_modifiers"]=>
  array(0) {
  }
  ["default_resource_type"]=>
  string(4) "file"
  ["cache_handler_func"]=>
  NULL
  ["autoload_filters"]=>
  array(0) {
  }
  ["config_overwrite"]=>
  bool(true)
  ["config_booleanize"]=>
  bool(true)
  ["config_read_hidden"]=>
  bool(false)
  ["config_fix_newlines"]=>
  bool(true)
  ["default_template_handler_func"]=>
  string(0) ""
  ["compiler_file"]=>
  string(25) "Smarty_Compiler.class.php"
  ["compiler_class"]=>
  string(15) "Smarty_Compiler"
  ["config_class"]=>
  string(11) "Config_File"
  ["_tpl_vars"]=>
  array(0) {
  }
  ["_smarty_vars"]=>
  NULL
  ["_sections"]=>
  array(0) {
  }
  ["_foreach"]=>
  array(0) {
  }
  ["_tag_stack"]=>
  array(0) {
  }
  ["_conf_obj"]=>
  NULL
  ["_config"]=>
  array(1) {
    [0]=>
    array(2) {
      ["vars"]=>
      array(0) {
      }
      ["files"]=>
      array(0) {
      }
    }
  }
  ["_smarty_md5"]=>
  string(32) "f8d698aea36fcbead2b9d5359ffca76f"
  ["_version"]=>
  string(6) "2.6.31"
  ["_inclusion_depth"]=>
  int(0)
  ["_compile_id"]=>
  NULL
  ["_smarty_debug_id"]=>
  string(12) "SMARTY_DEBUG"
  ["_smarty_debug_info"]=>
  array(0) {
  }
  ["_cache_info"]=>
  array(0) {
  }
  ["_file_perms"]=>
  int(420)
  ["_dir_perms"]=>
  int(505)
  ["_reg_objects"]=>
  array(0) {
  }
  ["_plugins"]=>
  array(9) {
    ["modifier"]=>
    array(0) {
    }
    ["function"]=>
    array(0) {
    }
    ["block"]=>
    array(0) {
    }
    ["compiler"]=>
    array(0) {
    }
    ["prefilter"]=>
    array(0) {
    }
    ["postfilter"]=>
    array(0) {
    }
    ["outputfilter"]=>
    array(0) {
    }
    ["resource"]=>
    array(2) {
      ["db"]=>
      array(2) {
        [0]=>
        array(4) {
          [0]=>
          string(25) "smarty_resource_db_source"
          [1]=>
          string(28) "smarty_resource_db_timestamp"
          [2]=>
          string(25) "smarty_resource_db_secure"
          [3]=>
          string(26) "smarty_resource_db_trusted"
        }
        [1]=>
        bool(false)
      }
      ["text"]=>
      array(2) {
        [0]=>
        array(4) {
          [0]=>
          string(33) "smarty_resource_text_get_template"
          [1]=>
          string(34) "smarty_resource_text_get_timestamp"
          [2]=>
          string(31) "smarty_resource_text_get_secure"
          [3]=>
          string(32) "smarty_resource_text_get_trusted"
        }
        [1]=>
        bool(false)
      }
    }
    ["insert"]=>
    array(0) {
    }
  }
  ["_cache_serials"]=>
  array(0) {
  }
  ["_cache_include"]=>
  NULL
  ["_cache_including"]=>
  bool(false)
  ["_filepaths_cache"]=>
  array(0) {
  }
}
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Fri Dec 08, 2017 4:51 am    Post subject: Reply with quote

Is this Windows or MacOS ?
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP