Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2011-01-18 14:51:21
- wata1946
- New Member
- Registered: 2010-06-14
- Posts: 6
<txp:php> not parsed on error_default
Hi All,
I have a stange problem on error_default page – the txp:php is not parsed at all (I use the same code on other pages and it works). It shows the <txp:php> php code </txp:php> in the browser instead of running the code between the tags. I use some of the <txp:custom_function> tags on that page and they seems to be working, but the <txp:php> is not :/ Many, many thanks for advance for any ideas.
cheers,
wata1946
Offline
Re: <txp:php> not parsed on error_default
hi wata
In Admin>preferences>Advanced
do you allow for raw php and php in pages?
also can you post what you have on the page here?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#3 2011-01-18 15:21:25
- wata1946
- New Member
- Registered: 2010-06-14
- Posts: 6
Re: <txp:php> not parsed on error_default
Hi colak
Thanks for your answer.
colak wrote:
In Admin>preferences>Advanced
do you allow for raw php and php in pages?
also can you post what you have on the page here?
——
tried allow for raw php in both modes – didn’t work
I got deeper into the problem and now I see that the <txp:php> itself is parsed but it is ignored within a <txp:my_function> which simply does echo ‘<txp:php>echo ‘123’;</txp:php>’;
Last edited by wata1946 (2011-01-18 15:21:51)
Offline
Re: <txp:php> not parsed on error_default
Please show an example of the code within the <txp:php>
tags. Probably the answer is simply that you need to add the parse()
function to the code.
Code is topiary
Offline
#5 2011-01-18 15:42:21
- wata1946
- New Member
- Registered: 2010-06-14
- Posts: 6
Re: <txp:php> not parsed on error_default
So starting from scratch – there is a function called txp:my_function which queries the db and echoes the following content:
<txp:php>if (!empty($_SESSION[permanent])) echo $_SESSION[permanent]; else echo ‘Enter Value’;</txp:php>
It works on any other page – not on the error page.
Many thanks.
Offline
Re: <txp:php> not parsed on error_default
Is that to say txp:my_function
is a tag, and the tag appears on the error page template?
Code is topiary
Offline
#7 2011-01-18 16:30:44
- wata1946
- New Member
- Registered: 2010-06-14
- Posts: 6
Re: <txp:php> not parsed on error_default
txp:my_function is actually bit long and complex (will be difficult to paste it here) but it takes template code (which includes txp:php) and echoes it – that’s all. Are you aware of any txp plugin functions parsing between normal section page and error_default ? Thank you.
Offline
Re: <txp:php> not parsed on error_default
Have you tried running parse()
on the plugin output? Or at least the template code? It shouldn’t hurt the output on normal pages (other than to slow it down a trifle).
Code is topiary
Offline
Pages: 1