Ticket #298 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Smarty can't find plugins when $smarty_path is set in config.php

Reported by: rjl Owned by: rjl
Priority: normal Milestone: 1.0.2
Component: PHP scripts Version: 1.0.0
Severity: normal Keywords: smarty $smarty_path
Cc:

Description

When the $smarty_path is set in config.php, the plugins_dir of the Smarty object is not set properly. When the path is set, the plugins directory is just "plugins" relative to that path.

Change History

Changed 4 years ago by rjl

  • status changed from new to closed
  • resolution set to fixed

Fixed in [1017].

Changed 4 years ago by anonymous

  • status changed from closed to reopened
  • resolution fixed deleted
  • patch set to 0

Your patch dosent work :

1/ Missing ; at the end of the line

$this->plugins_dir = $smarty->plugins_dir[] = $smarty_path . '/plugins'

2/ isset($smarty_path) will never be true

Because that $smarty_path is not set (know) inside the ThemeSmarty? class. You can pass it within constructor as parameter or define plugins stuff outside class definition, like my original patch.

Changed 4 years ago by rjl

  • status changed from reopened to closed
  • resolution set to fixed

Both problems should be fixed in [1025] (missing semicolon) and [1026] (added smarty path parameter to ThemeSmarty? constructor). Tested locally with $smarty_path set in config.php, and appears to work fine.

Note: See TracTickets for help on using tickets.