Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-01-26 10:47:17

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,381
GitHub

"Notice: Undefined variable: Posted" in taghandlers.php

Hi there, I’ve read the FAQ concerning notices (I am running in debug mode to sort this out), so I’m not totally green coming to this issue :)

I have a small issue with articles that seems to manifest itself on the output page when I use <txp:permlink>, and appears with existing and new posts when I’m viewing or editing an article in the admin interface. I’ve been applying Gerhard’s hack for extra custom fields, which incidentally worked perfectly without any errors – then on my next login TXP gave me errors in the admin interface:

Notice: Undefined variable: Posted in /home/tvmacs.com/web/public/textpattern/publish/taghandlers.php on line 2477

Line 2477 of taghandlers.php is:

if (empty($posted)) $posted = $Posted;

My taghandlers.php is stock, no modifications, v4.0.5. The line is part of the function permlinkurl($article_array) section, which tallies with the <txp:permlink> error. When I use <txp:permlink> in my default article form, the output page spits out lines of debug code:

Tag error: <txp:permlink/> -> Notice: Undefined variable: Posted on line 2477
textpattern/publish/taghandlers.php:2431 permlinkurl()
textpattern/publish.php:963 permlink()
processTags()
textpattern/publish.php:922 preg_replace_callback()
textpattern/lib/txplib_misc.php:1383 parse()
textpattern/publish.php:782 parse_form()
textpattern/publish.php:808 doArticle()
textpattern/publish.php:509 parseArticles()
textpattern/publish.php:963 article()
processTags()

As it stands right now, I’d like to know what I’ve broken, rather than just zapping and reinstalling – the last backup I took was about three days ago (stupid oversight on my part), so restoring from that wouldn’t really save a great deal, and I’d be clueless as to what I’d bodged :)

As far as other disclosure is concerned, I can’t recall doing anything else whacky with either the files or the db – certainly not anything radical as I’m not that smart ;)

Any advice is gratefully received. Thank you.

Last edited by gaekwad (2008-01-26 10:49:26)

Offline

#2 2008-01-26 12:10:37

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,381
GitHub

Re: "Notice: Undefined variable: Posted" in taghandlers.php

Probably related – now I’m getting this error when I try to update an existing article:

Notice: Undefined variable: second in /home/tvmacs.com/web/public/textpattern/include/txp_article.php on line 184

which reads:

$when = strtotime($year.'-'.$month.'-'.$day.' '.$hour.':'.$minute.':'.$second)-tz_offset();

which presumably means the time/date is tubed somewhere?

Offline

#3 2008-01-26 12:21:24

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: "Notice: Undefined variable: Posted" in taghandlers.php

Please post a tag trace. It’s most likely a tag issue.

Offline

#4 2008-01-26 12:45:11

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,381
GitHub

Re: "Notice: Undefined variable: Posted" in taghandlers.php

Thanks, jm: source of http://tvmacs.com/shop/ipodtouch as an example…

<pre>Tag error:  <b>&lt;txp:permlink&gt;</b> -> <b> Notice: Undefined variable: Posted  on line 2477</b></pre>
<pre style="padding-left: 2em;" class="backtrace"><code>textpattern/publish/taghandlers.php:2431 permlinkurl()
textpattern/publish.php:963 permlink()
processTags()
textpattern/publish.php:922 preg_replace_callback()
textpattern/lib/txplib_misc.php:1383 parse()
textpattern/publish.php:782 parse_form()
textpattern/publish.php:808 doArticle()
textpattern/publish.php:509 parseArticles()
textpattern/publish.php:963 article()
processTags()</code></pre><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<link rel="shortcut icon" href="/favicon.ico" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>

iPod Touch (aka iTouch) on 

Thames Valley Macs</title>

<link rel="stylesheet" type="text/css" media="screen" href="http://tvmacs.com/textpattern/css.php?s=shop" />
</head>
<body>

<div id="frame" />
  <div id="top" />
    <div id="top-content" />
      <div id="top-content-floatset" />
        <div id="top-content-right" />











  <a href="/go/ipodtouch/apple/"><img src="/images/apple-ipodtouch_468x60.gif" alt="ipod touch" /></a>











        </div>
        <div id="top-content-left" />
          <a href="http://tvmacs.com/"><img src="http://tvmacs.com/images/trans_430x60.gif" alt="thames valley macs" /></a>
        </div>
      </div>
    </div>
  </div>

  <div id="bottom" />
    <div id="bottom-content" />
      <div id="bottom-content-floatset" />
        <div id="bottom-content-right" />
          <div id="bottom-content-right-nav" />
            <a href="http://tvmacs.com/services/">Our services and solutions</a><br />
<a href="http://tvmacs.com/news/">News</a><br />
<a href="http://tvmacs.com/casestudies/">Case studies</a><br />
<a href="http://tvmacs.com/shop/">Self-service shop</a><br />
<a href="http://tvmacs.com/promotions/">Promotions, offers and discounts</a><br />
<a href="http://tvmacs.com/contact">Contact us</a><br />
<a href="http://tvmacs.com/links">Links</a><br />
<a href="http://tvmacs.com/about/">About Thames Valley Macs</a>
          </div>
          <div id="bottom-content-right-box" />








<!--  -->
<!--  -->
<!--  -->










	<p><b>Buy iPod Touch (aka iTouch) here:</b><br />


<div class="buybox"><a href="/go/ipodtouch/amazon"><img src="/images/amazon-logo_180x40.png"></a><div class="buybox-text"><a href="/go/ipodtouch/8/amazon/">£175</a>, <a href="/go/ipodtouch/16/amazon/">£234</a></div></div>



<div class="buybox"><a href="/go/ipodtouch/apple/"><img src="/images/apple-logo_180x40.png"></a><div class="buybox-text"><a href="/go/ipodtouch/8/apple/">£199</a>, <a href="/go/ipodtouch/16/apple/">£269</a></div></div>



<div class="buybox"><a href="/go/ipodtouch/dabs"><img src="/images/dabs-logo_180x40.png"></a><div class="buybox-text"><a href="/go/ipodtouch/8/dabs/">£179</a>, <a href="/go/ipodtouch/16/dabs/">£234</a></div></div>



<div class="buybox"><a href="/go/ipodtouch/johnlewis"><img src="/images/johnlewis-logo_180x40.png"></a><div class="buybox-text"><a href="/go/ipodtouch/8/johnlewis/">£186</a>, <a href="/go/ipodtouch/16/johnlewis/">£256</a></div></div>







<p>Prices checked:&nbsp;Jan 26 2008 , see website for confirmation. Prices supplied for information only.</p>

</p>



          </div>
        </div>
        <div id="bottom-content-left" />





















<h3><a rel="bookmark" href="http://tvmacs.com/shop/ipodtouch">iPod Touch (aka iTouch)</a></h3>

	<p>Whizzy whizzy iPod touch.</p>



        </div>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-1154635-8");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>
<!-- Runtime:    0.0297 -->
<!-- Query time: 0.004034 -->
<!-- Queries: 32 -->
<!-- Memory: 2144Kb, <txp:title /> -->
<!-- txp tag trace: 
[SQL (0.000080): select name from txp_lang where lang='en-gb' limit 1]
[SQL (0.000179): select name, data from txp_lang where lang='en-gb' AND ( event='public' OR event='common')]
[SQL (0.000079): select name, code, version from txp_plugin where status = 1]
[SQL (0.000074): select ID,Section from textpattern where url_title like 'ipodtouch' AND Section='shop' and Status >= 4 limit 1]
[SQL (0.000083): select * from txp_section where name = 'shop' limit 1]
[SQL (0.000124): select *, unix_timestamp(Posted) as uPosted from textpattern where ID=3 and Status = 4]
[article 3]
[SQL (0.000393): select ID, Title, url_title, unix_timestamp(Posted) as uposted
			from textpattern where Posted > '1970-01-01 00:00:00' and Section = 'shop' and Status=4 and Posted < now() order by Posted asc limit 1]
[SQL (0.000190): select ID, Title, url_title, unix_timestamp(Posted) as uposted
			from textpattern where Posted < '1970-01-01 00:00:00' and Section = 'shop' and Status=4 and Posted < now() order by Posted desc limit 1]
[SQL (0.000401): select host from txp_log where ip='87.194.172.160' limit 1]
[SQL (0.000394): insert into txp_log set `time`=now(),page='/shop/ipodtouch',ip='87.194.172.160',host='87-194-172-160.bethere.co.uk',refer='',status='200',method='GET']
[SQL (0.000080): select user_html from txp_page where name='tvm-default']
[Page: tvm-default]
<txp:output_form form="tvm-dtd-head" />
	[SQL (0.000076): select Form from txp_form where name='tvm-dtd-head']
	[Form: tvm-dtd-head]
	<txp:if_individual_article>
		[<txp:if_individual_article>: true]
		<txp:title/>
	</txp:if_individual_article>
	<txp:site_name/>
	<txp:css format="link" />
<txp:output_form form="tvm-content-top-adblock" />
	[SQL (0.000079): select Form from txp_form where name='tvm-content-top-adblock']
	[Form: tvm-content-top-adblock]
	<txp:if_section name="default">
		[<txp:if_section name="default">: false]
	</txp:if_section>
	<txp:if_section name="services">
		[<txp:if_section name="services">: false]
	</txp:if_section>
	<txp:if_section name="news">
		[<txp:if_section name="news">: false]
	</txp:if_section>
	<txp:if_section name="casestudies">
		[<txp:if_section name="casestudies">: false]
	</txp:if_section>
	<txp:if_section name="shop">
		[<txp:if_section name="shop">: true]
		<txp:if_article_list>
			[<txp:if_article_list>: false]
			<txp:if_custom_field name="ad_468x60">
				[<txp:if_custom_field name="ad_468x60">: true]
				<txp:custom_field name="ad_468x60" />
			</txp:if_custom_field>
		</txp:if_article_list>
	</txp:if_section>
	<txp:if_section name="promotions">
		[<txp:if_section name="promotions">: false]
	</txp:if_section>
	<txp:if_section name="contact">
		[<txp:if_section name="contact">: false]
	</txp:if_section>
	<txp:if_section name="links">
		[<txp:if_section name="links">: false]
	</txp:if_section>
	<txp:if_section name="about">
		[<txp:if_section name="about">: false]
	</txp:if_section>
<txp:output_form form="tvm-top-content-left" />
	[SQL (0.000134): select Form from txp_form where name='tvm-top-content-left']
	[Form: tvm-top-content-left]
	<txp:site_url/>
	<txp:site_url/>
<txp:output_form form="tvm-content-right-nav" />
	[SQL (0.000080): select Form from txp_form where name='tvm-content-right-nav']
	[Form: tvm-content-right-nav]
	<txp:site_url/>
	<txp:site_url/>
	<txp:site_url/>
	<txp:site_url/>
	<txp:site_url/>
	<txp:site_url/>
	<txp:site_url/>
	<txp:site_url/>
<txp:output_form form="tvm-content-right-box" />
	[SQL (0.000077): select Form from txp_form where name='tvm-content-right-box']
	[Form: tvm-content-right-box]
	<txp:if_section name="default">
		[<txp:if_section name="default">: false]
	</txp:if_section>
	<txp:if_section name="services">
		[<txp:if_section name="services">: false]
	</txp:if_section>
	<txp:if_section name="news">
		[<txp:if_section name="news">: false]
	</txp:if_section>
	<txp:if_section name="casestudies">
		[<txp:if_section name="casestudies">: false]
	</txp:if_section>
	<txp:if_section name="shop">
		[<txp:if_section name="shop">: true]
		<txp:output_form form="tvm-content-right-shop" />
			[SQL (0.000074): select Form from txp_form where name='tvm-content-right-shop']
			[Form: tvm-content-right-shop]
	</txp:if_section>
	<txp:if_section name="promotions">
		[<txp:if_section name="promotions">: false]
	</txp:if_section>
	<txp:if_section name="contact">
		[<txp:if_section name="contact">: false]
	</txp:if_section>
	<txp:if_section name="links">
		[<txp:if_section name="links">: false]
	</txp:if_section>
	<txp:if_section name="about">
		[<txp:if_section name="about">: false]
	</txp:if_section>
	<txp:if_individual_article>
		[<txp:if_individual_article>: true]
		<txp:excerpt/>
			<txp:output_form form="tvm-excerpt-buy-template" />
				[SQL (0.000077): select Form from txp_form where name='tvm-excerpt-buy-template']
				[Form: tvm-excerpt-buy-template]
				<txp:title/>
				<txp:if_custom_field name="buy-amazon">
					[<txp:if_custom_field name="buy-amazon">: true]
					<txp:output_form form="tvm-buy-amazon-pre" />
						[SQL (0.000074): select Form from txp_form where name='tvm-buy-amazon-pre']
						[Form: tvm-buy-amazon-pre]
						<txp:custom_field name="buy-amazon-url" />
					<txp:custom_field name="buy-amazon" />
					<txp:output_form form="tvm-buy-amazon-post" />
						[SQL (0.000072): select Form from txp_form where name='tvm-buy-amazon-post']
						[Form: tvm-buy-amazon-post]
				</txp:if_custom_field>
				<txp:if_custom_field name="buy-apple">
					[<txp:if_custom_field name="buy-apple">: true]
					<txp:output_form form="tvm-buy-apple-pre" />
						[SQL (0.000072): select Form from txp_form where name='tvm-buy-apple-pre']
						[Form: tvm-buy-apple-pre]
						<txp:custom_field name="buy-apple-url" />
					<txp:custom_field name="buy-apple" />
					<txp:output_form form="tvm-buy-apple-post" />
						[SQL (0.000098): select Form from txp_form where name='tvm-buy-apple-post']
						[Form: tvm-buy-apple-post]
				</txp:if_custom_field>
				<txp:if_custom_field name="buy-dabs">
					[<txp:if_custom_field name="buy-dabs">: true]
					<txp:output_form form="tvm-buy-dabs-pre" />
						[SQL (0.000075): select Form from txp_form where name='tvm-buy-dabs-pre']
						[Form: tvm-buy-dabs-pre]
						<txp:custom_field name="buy-dabs-url" />
					<txp:custom_field name="buy-dabs" />
					<txp:output_form form="tvm-buy-dabs-post" />
						[SQL (0.000071): select Form from txp_form where name='tvm-buy-dabs-post']
						[Form: tvm-buy-dabs-post]
				</txp:if_custom_field>
				<txp:if_custom_field name="buy-johnlewis">
					[<txp:if_custom_field name="buy-johnlewis">: true]
					<txp:output_form form="tvm-buy-johnlewis-pre" />
						[SQL (0.000071): select Form from txp_form where name='tvm-buy-johnlewis-pre']
						[Form: tvm-buy-johnlewis-pre]
						<txp:custom_field name="buy-johnlewis-url" />
					<txp:custom_field name="buy-johnlewis" />
					<txp:output_form form="tvm-buy-johnlewis-post" />
						[SQL (0.000070): select Form from txp_form where name='tvm-buy-johnlewis-post']
						[Form: tvm-buy-johnlewis-post]
				</txp:if_custom_field>
				<txp:if_custom_field name="buy-macwarehouse">
					[<txp:if_custom_field name="buy-macwarehouse">: false]
				</txp:if_custom_field>
				<txp:if_custom_field name="buy-misco">
					[<txp:if_custom_field name="buy-misco">: false]
				</txp:if_custom_field>
				<txp:if_custom_field name="prices-checked">
					[<txp:if_custom_field name="prices-checked">: true]
					<txp:custom_field name="prices-checked" />
				</txp:if_custom_field>
	</txp:if_individual_article>
<txp:output_form form="tvm-content-left" />
	[SQL (0.000077): select Form from txp_form where name='tvm-content-left']
	[Form: tvm-content-left]
	<txp:if_section name="default">
		[<txp:if_section name="default">: false]
	</txp:if_section>
	<txp:if_section name="services">
		[<txp:if_section name="services">: false]
	</txp:if_section>
	<txp:if_section name="news">
		[<txp:if_section name="news">: false]
	</txp:if_section>
	<txp:if_section name="casestudies">
		[<txp:if_section name="casestudies">: false]
	</txp:if_section>
	<txp:if_section name="shop">
		[<txp:if_section name="shop">: true]
		<txp:output_form form="tvm-content-left-shop" />
			[SQL (0.000071): select Form from txp_form where name='tvm-content-left-shop']
			[Form: tvm-content-left-shop]
	</txp:if_section>
	<txp:if_section name="promotions">
		[<txp:if_section name="promotions">: false]
	</txp:if_section>
	<txp:if_section name="contact">
		[<txp:if_section name="contact">: false]
	</txp:if_section>
	<txp:if_section name="links">
		[<txp:if_section name="links">: false]
	</txp:if_section>
	<txp:if_section name="about">
		[<txp:if_section name="about">: false]
	</txp:if_section>
	<txp:if_individual_article>
		[<txp:if_individual_article>: true]
		<txp:article/>
			[SQL (0.000130): select *, unix_timestamp(Posted) as uPosted from textpattern where ID = 3 and Status = 4 limit 1]
			[article 3]
			[SQL (0.000071): select Form from txp_form where name='default']
			[Form: default]
			<txp:permlink>
				<txp:title/>
			</txp:permlink>
			<txp:body/>
	</txp:if_individual_article>
<txp:output_form form="google-analytics" />
	[SQL (0.000077): select Form from txp_form where name='google-analytics']
	[Form: google-analytics]
[ ~~~ secondpass ~~~ ]
 -->

Last edited by gaekwad (2008-01-26 12:59:18)

Offline

#5 2008-01-26 12:53:52

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: "Notice: Undefined variable: Posted" in taghandlers.php

Please use bc.. to post code here, a tag trace is rather messy when it’s not formatted ;)
(How do I post tags and code on the forum?)

Offline

#6 2008-01-26 12:59:18

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: "Notice: Undefined variable: Posted" in taghandlers.php

Could you post you diacnotics here?

Cheers!

Offline

#7 2008-01-26 13:00:03

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,381
GitHub

Re: "Notice: Undefined variable: Posted" in taghandlers.php

Els wrote:

Please use bc.. to post code here, a tag trace is rather messy when it’s not formatted ;)
(How do I post tags and code on the forum?)

Sorry, Els – fixed :)

Offline

#8 2008-01-26 13:01:14

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,381
GitHub

Re: "Notice: Undefined variable: Posted" in taghandlers.php

Gocom wrote:

Could you post you diacnotics here?

Sure!

Textpattern version: 4.0.5 (r2466)
Last Update: 2008-01-22 11:39:21/2008-01-22 11:37:11
Document root: /home/tvmacs.com/web/public
$path_to_site: /home/tvmacs.com/web/public
Textpattern path: /home/tvmacs.com/web/public/textpattern
Permanent link mode: section_title
Temporary directory path: /var/tmp
Site URL: tvmacs.com
TZ: GMT
PHP version: 5.2.1
GD Image Library: 2.0 or higher; supported formats: GIF, JPG, PNG.
Server Local Time: 2008-01-26 13:00:28
MySQL: 5.0.37-log
Locale: C
Server: Apache
Apache version: Apache
PHP Server API: apache2handler
RFC 2616 headers: 
Server OS: SunOS 5.11

Pre-flight check: 
------------------------
Some Textpattern files have been modified: 
	/include/txp_article.php, 
	/publish.php
------------------------

.htaccess file contents: 
------------------------
<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteCond %{REQUEST_FILENAME} -f [OR]
 RewriteCond %{REQUEST_FILENAME} -d
 RewriteRule ^(.+) - [PT,L]

 RewriteRule ^(.*) index.php
</IfModule>

php_value register_globals off

------------------------

Charset (default/config): latin1/utf8
character_set_client: utf8
character_set_connection: utf8
character_set_database: utf8
character_set_filesystem: binary
character_set_results: utf8
character_set_server: utf8
character_set_system: utf8
character_sets_dir: /opt/csw/mysql5/share/mysql/charsets/
17 Tables: -

PHP extensions: xmlwriter/0.1, libxml, xml, tokenizer/0.1, session, pcre, SimpleXML, Reflection, posix, hash/1.0, filter/0.11.0, date/5.2.1, ctype, apache2handler, bz2, curl, dba, dom/20031129, gd, gettext, gmp, iconv, standard/5.2.1, ldap, mcrypt, mhash, mysql/1.0, SPL, openssl, PDO, pgsql, pdo_pgsql/1.0.2, SQLite, pdo_sqlite/1.0.1, xmlreader/0.1, zlib/1.1, pdo_mysql/1.0.2, imap

Apache modules: core, prefork, http_core, mod_so, mod_authn_file, mod_authn_dbm, mod_authn_anon, mod_authn_dbd, mod_authn_default, mod_authn_alias, mod_authz_host, mod_authz_groupfile, mod_authz_user, mod_authz_dbm, mod_authz_owner, mod_authz_default, mod_auth_basic, mod_auth_digest, mod_file_cache, mod_cache, mod_disk_cache, mod_mem_cache, mod_dbd, mod_ext_filter, mod_include, mod_filter, mod_deflate, mod_log_config, mod_log_forensic, mod_logio, mod_env, mod_mime_magic, mod_expires, mod_headers, mod_ident, mod_usertrack, mod_unique_id, mod_setenvif, mod_version, mod_proxy, mod_proxy_connect, mod_proxy_http, mod_proxy_balancer, mod_ssl, mod_mime, mod_dav, mod_status, mod_autoindex, mod_asis, mod_info, mod_cgi, mod_dav_fs, mod_dav_lock, mod_vhost_alias, mod_negotiation, mod_dir, mod_actions, mod_speling, mod_userdir, mod_alias, mod_rewrite, mod_suexec, mod_php5, mod_dav_svn, mod_authz_svn

pretext_data: array (
  'id' => '',
  's' => '',
  'c' => '',
  'q' => '',
  'pg' => '',
  'p' => '',
  'month' => '',
  'author' => '',
  'request_uri' => '/99d7031d5fe321e03a4153006db9c33c/?txpcleantest=1',
  'qs' => 'txpcleantest=1',
  'subpath' => '\\/',
  'req' => '/99d7031d5fe321e03a4153006db9c33c/?txpcleantest=1',
)

/include/txp_category.php: r2243 (3706fea923cd77f7053f7803de169df4)
/include/txp_plugin.php: r1917 (c63f72f33986c08367672fc9fe7b42dd)
/include/txp_auth.php: r2356 (33255ec1ea1a825163c78272496d8783)
/include/txp_form.php: r1913 (ecea3fecf9d7d1f8088cda67f097eceb)
/include/txp_section.php: r1891 (1f0121b3e2969d94bc8a7fb98bfdfbd5)
/include/txp_tag.php: r2260 (1bd67bdb9dcfb72e34ea967e39406216)
/include/txp_list.php: r2450 (997a3b1bec7115bf49b76f62b28da146)
/include/txp_page.php: r2099 (56bde34b6c7bcb9123ac91e73065e894)
/include/txp_discuss.php: r2451 (91e0b29ef39a9471ae5c78d0b1bba086)
/include/txp_prefs.php: r2405 (a4b76476930b2376199f23fbfd5f1ac9)
/include/txp_log.php: r2439 (16730c34e2a437dd88b8f5cc7eff8218)
/include/txp_preview.php: r1238 (696728f35f3557b648c011bb4d6496c3)
/include/txp_image.php: r2439 (9fac6ed0d9d4c3d8196492051f38dc9a)
/include/txp_article.php: r2453 (f8d169451f4411065c2eb786db02f41e)
/include/txp_css.php: r2403 (4e8c52bb1cf5bfe2e2f0640892f9b92e)
/include/txp_admin.php: r2403 (f8700a3d453ece08e7f137b47c967eda)
/include/txp_link.php: r2463 (0a0171bf606296106332d3fdcb83a678)
/include/txp_diag.php: r2361 (dccf3269049dd25e59afdd7ad8d235cd)
/include/txp_file.php: r2403 (e62abd5fcadabe629322ed17135d89eb)
/include/txp_import.php: r1238 (70a6207c0f3604ecfc4b20369986c4d7)
/lib/admin_config.php: r1747 (a2eb09f94d7902a6e95750fc4abcea17)
/lib/txplib_misc.php: r2464 (615afd44a10311f1c0b7852d9bc15d24)
/lib/taglib.php: r1535 (9b519f9dc88791e5ee8eacc029dd6975)
/lib/txplib_head.php: r2404 (2e067b25997cf67cddbdd365570e69d5)
/lib/classTextile.php: r2462 (a031e2ea894e339711c601f230c5ee71)
/lib/txplib_html.php: r2403 (97e173da3058b438513df67fd7d1ceca)
/lib/txplib_db.php: r2406 (5ed67642f805639b54e381fb22efd208)
/lib/IXRClass.php: r765 (137b91497628f0058a2fca9eba5c3b7f)
/lib/txplib_forms.php: r2403 (438a734b52acef40b36d8a3ba23987e8)
/lib/class.thumb.php: r2329 (b2a2fda54371dbd6c40ba553941f090e)
/lib/constants.php: r2361 (ab6d51668fab1e3c98e7d520b1a59f0f)
/lib/txplib_update.php: r1239 (10f28a986d23187b436369dc29ab552f)
/lib/txplib_wrapper.php: r2286 (419125ec74a17a70bf1e86ebfcd45253)
/publish/taghandlers.php: r2444 (cc9de8f2018b01398a2ba542c5f5bdc6)
/publish/atom.php: r2402 (46c4402717f695fde0d49d806adfa4c4)
/publish/log.php: r1637 (5254d0f3942086bc55723923307a51db)
/publish/comment.php: r2460 (2d1ae1dec0784f044e7005fa5ed50930)
/publish/search.php: r1748 (8c86ebcb5be08e214d81ca15a32164ca)
/publish/rss.php: r2393 (09aac29bf22ffa71c1e118e851cff3c3)
/publish.php: r2436 (fa7bed371332423dace67c5f48985217)
/index.php: r2466 (30ecf35de5c1edc6ef68e780c8c79daa)
/css.php: r944 (8beba8f83a091068723435cdcdc02f2f)

Offline

#9 2008-01-26 13:11:59

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: "Notice: Undefined variable: Posted" in taghandlers.php

It sounds like you have deleted code that sets $posted. So, probably you have just edited wrongly /include/txp_article.php and /publish.php.

Put <txp:posted /> to your article form. Does it display correct time or not? And what are you those edited files contents?

But the answer still is: you have edited core wrongly. Correct your changes to those files and it will work again. Because hacking isn’t really smart – if you do that by following old instructions, as they are outdated.

And ofcourse, those custom fields could be done with plugin, gerhard’s plugin. Yes, it ain’t free but it works perfectly.

Cheers!

Last edited by Gocom (2008-01-26 13:15:49)

Offline

#10 2008-01-26 13:19:50

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,381
GitHub

Re: "Notice: Undefined variable: Posted" in taghandlers.php

<txp:posted /> doesn’t appear to render properly, for what it’s worth – it shows the current time, not the posted time.

Problem exists between keyboard and chair – time to reset files and start over. Thanks, Gocom :)

Last edited by gaekwad (2008-01-26 13:22:36)

Offline

#11 2008-01-27 09:58:26

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,381
GitHub

Re: "Notice: Undefined variable: Posted" in taghandlers.php

OK, I nailed the problem and found a solution.

With a fresh pair of eyes I backed up the bodged db, then installed a fresh copy and pasted the bodged bits back in bit by bit. It broke when I inserted the ‘textpattern’ table. On further inspection, the Posted value was set to 1970-01-01 00:00:00, which triggered the taghandlers.php error. Changing it something more recent, even to 1970-01-01 00:00:01 fixed the error.

I still don’t recall changing this at any point, but either way it’s fixed. Thank you to everyone here who assisted, your time is appreciated. And sorry for posting in the wrong forum initially :)

Offline

#12 2008-01-27 11:21:11

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: "Notice: Undefined variable: Posted" in taghandlers.php

Ah, 1970-01-01 00:00:00 equals zero “unix seconds”, which is what is stored in $Posted. When used in an if-construct, $Posted then evaluates to FALSE.

Offline

Board footer

Powered by FluxBB