Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Show svnversion in txp:php or txp:variable
Should have turned on Textpattern’s debugging production status.
If I enter this in the terminal within the project directory:
php -r "echo exec(svnversion);"
I get the correct version info.
When I enter this in my template:
<txp:php>echo exec(svnversion);</txp:php>
I get this:
Tag error: <txp:php> -> Notice: Use of undefined constant svnversion - assumed 'svnversion' on line 1
textpattern/publish/taghandlers.php:3082 eval()
textpattern/publish.php:1090 php()
textpattern/publish.php:1025 processTags()
textpattern/lib/txplib_misc.php:909 parse()
textpattern/publish.php:1090 splat()
textpattern/publish.php:1012 processTags()
textpattern/lib/txplib_misc.php:1540 parse()
textpattern/publish/taghandlers.php:246 parse_form()
textpattern/publish.php:1090 output_form()
textpattern/publish.php:1012 processTags()
Entering the absolute path to svnversion results in a more terse debug message:
Parse error: syntax error, unexpected '/', expecting ')' in /path/to/textpattern/publish/taghandlers.php(3082) : eval()'d code on line 1
I should stop messing around with this! ;)
Offline
Re: Show svnversion in txp:php or txp:variable
johnstephens wrote:
Tag error: <txp:php> -> Notice: Use of undefined constant svnversion – assumed ‘svnversion’ on line 1
You must quote svnversion (string, not constant or function).
Offline