Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
(4.0.4) PHP error in publish.php
On a site upgraded from 4.0.3 to 4.0.4 on some articles I’m seeing this error (in ‘Live’ mode):
Warning: Raw PHP tags are deprecated in /home/.idun/westserv/westserve.org/textpattern/publish.php on line 996
This page is an example.
These articles use a number fancy bits and pieces – most of which I don’t fully understand – but it was working fine under 4.0.3 :)
Can someone give a pointer to the cause?
Could it be the plugin jnm_audio?
Thanks.
Last edited by NeilA (2006-10-21 02:08:37)
Offline
#2 2006-10-21 02:11:36
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: (4.0.4) PHP error in publish.php
You shouldn’t be seeing that in Live publishing mode, but here’s the FAQ entry.
Offline
Re: (4.0.4) PHP error in publish.php
Quick work Mary, thankyou!
That’s given me an idea where to look.
For the record, the error is definitely appearing in ‘live’ mode, though.
Cheers
Offline
#4 2006-10-21 02:22:44
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: (4.0.4) PHP error in publish.php
It might be the plugin causing it, if it’s doing something it shouldn’t. Is that the only plugin in use?
Offline
Re: (4.0.4) PHP error in publish.php
Found it Mary… Wasn’t the plugin, it was a snippet of Ajax code (I think!) used in a form.
Replaced the php bits with the txp php code… and broke it…
This is the snippet – I realise this is no longer a TXP thing, but if you give a pointer, that would be great. I really don’t know what I doing with stuff like this!
<?php $passage = urlencode("<txp:custom_field name="custom1" />"); ?><a href="javascript://" onclick="getMyHTML('http://westserve.org/bibletext.php?passage=<?php print $passage;?>','bibletext');" title="Show ESV Bible text for <txp:custom_field name="custom1" />" ><txp:custom_field name="custom1" /></a></p>
Last edited by NeilA (2006-10-21 02:34:21)
Offline
#6 2006-10-21 02:50:32
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: (4.0.4) PHP error in publish.php
The warning message is legit, but it shouldn’t show up in Live mode. r1973 should fix that part – you’ll see the error in Test or Debug, but not Live mode.
To get rid of it entirely, just change <?php ... ?> to <txp:php>...</txp:php>, like the FAQ says.
Alex
Offline
Re: (4.0.4) PHP error in publish.php
Thanks for the clarification Alex and the info about the rev number to fix the error display.
I’ll probably do that, because replacing the tags as the FAQ says breaks the code snippet (or at least, my effort to replace the tags does).
Cheers
Offline
Re: (4.0.4) PHP error in publish.php
‘Scuse my ignorance on these matters, but I went and grabbed what I thought was r1973 from here:
http://svn.textpattern.com/releases/4.0.4/source/
Uploaded it to my site, but the diagnostics still report r1956 (and the error message reported in this thread still occurs).
What have I done wrong?
Thanks.
Offline
Re: (4.0.4) PHP error in publish.php
You understood revision numbers the wrong way. It’s an svn thing, but basically: Revision numbers are repository wide. Everything in /releases/ is basically a frozen copy of the dev-branch at some point in time (specifically when we wrap up a release and offer a download).
When revisions are mentioned it just about always relates to either the /development/4.0/ or the /development/crockery/ branch, which is fluent and hence does not have release numbers (they are after all not releases).
Diagnostics does not report the revision number of the repository when the checkout was made (that information is not available). It reports the revision number of when the most recent change in a file has occured. Given that the releases branch is frozen, no files change, and hence diagnostics always shows the same number (that’s after all the sole purpose of having the /releases/ branch in svn). All development happens in /development/.
Last edited by Sencer (2006-10-21 10:19:39)
Offline
Re: (4.0.4) PHP error in publish.php
Neil,
I had the same problem, on one of my sites I was doing an include using PHP and had to change it to use txp:php after seeing those error messages in live mode.
As for grabbing SVN and uploading the whole tree to a live site, keep this in mind. If you look at the dates of the release zip and the dates of your SVN checkout, they won’t match. Releases will show when that particular PHP file was last changed while SVN, for the most part, will use the date when you checked it out. Should you decide in the future to do any kind of synchronization based on dates to update your site when 4.0.5 comes out, well you’d run into issues.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
Re: (4.0.4) PHP error in publish.php
hcgtv wrote:
Should you decide in the future to do any kind of synchronization based on dates to update your site when 4.0.5 comes out, well you’d run into issues.
So with this bug, the one regarding thumbnails and the one for files should we expect an official 4.0.45 version?
Last edited by colak (2006-10-21 16:10:10)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: (4.0.4) PHP error in publish.php
Thanks guys for the explanation… I confess the whole svn and revision stuff doesn’t make a lot of sense to me, but that’s OK I don’t really need to understand the details, not being a cutting-edge sort of person. :)
But Bert, if you’ve made the changes in a site of yours, perhaps you could help me understand why this:
<?php $passage = urlencode("<txp:custom_field name="custom1" />"); ?><a href="javascript://" onclick="getMyHTML('http://westserve.org/bibletext.php?passage=<?php print $passage;?>','bibletext');" title="Show ESV Bible text for <txp:custom_field name="custom1" />" ><txp:custom_field name="custom1" /></a></p>
when converted to this:
<txp:php> $passage = urlencode("<txp:custom_field name="custom1" />"); </txp:php><a href="javascript://" onclick="getMyHTML('http://westserve.org/bibletext.php?passage=<txp:php> print $passage;</txp:php>','bibletext');" title="Show ESV Bible text for <txp:custom_field name="custom1" />" ><txp:custom_field name="custom1" /></a></p>
breaks?
I’m sure I’m missing something very simple!
Thanks for all the support here guys…
Last edited by NeilA (2006-10-21 21:19:06)
Offline