Fix error: Call to undefined function tpl_js()
Opened this issue · 0 comments
kotadr commented
To solve the problem, you need to add the definition of the function to the main.php file:
--- main.php.orig 2020-11-03 23:10:29.000000000 +0200
+++ main.php 2023-02-14 08:43:39.558159311 +0200
@@ -12,6 +12,17 @@
- @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/
+/**
-
- Returns HTML string with script tag
-
- @param string $filename
-
- @return string
- */
+function tpl_js($filename)
+{ - $filepath = DOKU_TPL . 'js' . DIRECTORY_SEPARATOR . $filename;
- return "<script type="application/javascript" src="{$filepath}"></script>";
+}
if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
header('X-UA-Compatible: IE=edge,chrome=1');