Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-06-03 12:29:52

redpen
Member
From: Maine USA
Registered: 2005-11-01
Posts: 24

Trouble with < txp:title / >

I am suddenly having trouble with the txp:title tag.

This is my article form:
<code>
<h3><txp:permlink><txp:title /></txp:permlink></h3>
<p style=“font-size: 0.7em;”>Posted <txp:posted /> by <txp:author /></p>
<p><txp:article_image align=“right” style=“margin:-50px 0 0 5px;” /><txp:body /></p>
<txp:comments_invite wraptag=“p” />
<div align=“center”><img src=”<txp:site_url />images/1.gif” style=“height:1px;width:400px” class=“divider” alt=”“ /></div>
</code>

This is HTML out:

<code>
<div align=“center”><img src=“http://www.berwick.lib.me.us/images/1.gif” style=“height:1px;width:400px” class=“divider” alt=”“ /></div><h3></h3>
<p style=“font-size: 0.7em;”>Posted 11 hours ago by the webmaster</p>
<p> <p>dum de dum de dum</p>
</p>
</code>

This is debugging info:

<code>
[article 49]
<txp:permlink> <txp:title/>
</txp:permlink>
<txp:posted/>
<txp:author/>
<txp:article_image align=“right” style=“margin:-50px 0 0 5px;” />
<txp:body/>
<txp:comments_invite wraptag=“p” />
<txp:site_url/>
</code>

This is HTML out after replacing < txp:title / > with text ‘title goes here’:

<code>
<div align=“center”><img src=“http://www.berwick.lib.me.us/images/1.gif” style=“height:1px;width:400px” class=“divider” alt=”“ /></div>
<h3><a href=“http://www.berwick.lib.me.us/index.php?id=49” title=“Permanent link to this article”>title goes here</a></h3>
<p style=“font-size: 0.7em;”>Posted 11 hours ago by the webmaster</p>
<p> <p>dum de dum de dum</p>
</p>
</code>

and the associated debugging info:

<code>
[article 49]
<txp:permlink>
</txp:permlink>
<txp:posted/>
<txp:author/>
<txp:article_image align=“right” style=“margin:-50px 0 0 5px;” />
<txp:body/>
<txp:comments_invite wraptag=“p” />
<txp:site_url/>
</code>

The titles still exist. They just don’t appear. I feel like I’m overlooking something simple, but these eyes are crossed. Help?

Offline

#2 2006-06-04 00:11:07

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Trouble with < txp:title / >

You’re saying the title shows up in the HTML output correctly?:

<h3><a href="http://www.berwick.lib.me.us/index.php?id=49" title="Permanent link to this article">title goes here</a></h3>

If that’s not visible on the page, you have a CSS or browser issue.

This FAQ makes some suggestions; in particular, try the Textpattern default stylesheet.


Alex

Offline

#3 2006-06-04 01:25:35

redpen
Member
From: Maine USA
Registered: 2005-11-01
Posts: 24

Re: Trouble with < txp:title / >

thanks for these ideas, Alex.

So far: Titles not present on either Firefox or IE, and switching to default CSS also fails to show them. Trying other ideas in the FAQ — sorry I didn’t see it sooner — and retracing my steps once again.

To clarify: I can get words to appear by entering them directly on the article form between permlink tags. They link to the correct articles in the archive (with the faux title).

Scott

Offline

#4 2006-06-04 05:20:16

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Trouble with < txp:title / >

Just a thought: try the txp:title tag by itself, without enclosing it in a permlink tag.


Alex

Offline

#5 2006-06-04 14:36:46

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Trouble with < txp:title / >

Scott, can you please post a full tag trace, so we can see what’s happening?

Offline

#6 2006-06-04 16:41:25

redpen
Member
From: Maine USA
Registered: 2005-11-01
Posts: 24

Re: Trouble with < txp:title / >

Thanks for continuing with me, Alex.

I have tried the txp:title tag between h3 and permlink tags, between just h3 tags, and just by itself — completely alone on the article form. Still no luck.

As far as I can tell, the problem continues across sections, across pages, and across styles. Wherever I have <code><txp:title /></code>, nothing shows.

Here is full tag trace, Mary. I hope something jumps out!

bc..
<!— txp tag trace:
[SQL (0.000943): select name from `txp_lang` where lang=‘en-gb’ limit 1]
[SQL (0.005890): select name, data from `txp_lang` where lang=‘en-gb’ AND ( event=‘public’ OR event=‘common’)]
[SQL (0.002294): select name, code from `txp_plugin` where status=‘1’]
[SQL (0.000789): select * from `txp_section` where name = ‘default’ limit 1]
[SQL (0.000900): select host from `txp_log` where ip=‘65.96.194.242’ limit 1]
[SQL (0.000639): insert into `txp_log` set `time`=now(),page=’/’,ip=‘65.96.194.242’,host=‘c-65-96-194-242.hsd1.xx.comcast.net’,refer=’‘,status=‘200’,method=‘GET’]
[SQL (0.000573): select user_html from `txp_page` where name=‘specta_default’]
[Page: specta_default]
<txp:css/>
<txp:page_title/>
<txp:image id=“4” /> [SQL (0.000661): select * from `txp_image` where id=‘4’ limit 1]
<txp:section_list include_default=“1” break=” | “ /> [SQL (0.001013): select name,title from `txp_section` where name != ‘default’ order by name]
<txp:category_list label=“Topics” labeltag=“strong” wraptag=“p” /> [SQL (0.000974): select name,title from `txp_category` where name != ‘default’ and type=‘article’ order by name]
<txp:linklist category=“libraries” label=“Library Links” labeltag=“strong” wraptag=“p” /> [SQL (0.000566): select Form from `txp_form` where `name` = ‘plainlinks’ limit 1] [Form: plainlinks] [SQL (0.000815): select * from `txp_link` where category=‘libraries’ order by linksort ]
<txp:linklist category=“community-resources” label=“Community Resources” labeltag=“strong” wraptag=“p” /> [Form: plainlinks] [SQL (0.000906): select * from `txp_link` where category=‘community-resources’ order by linksort ]
<txp:output_form form=“hours” /> [SQL (0.000546): select form from `txp_form` where `name` = ‘hours’ limit 1] <txp:email email=“xx@berwick.lib.me.us” linktext=“Email Sandy” title=“Email Sandy” /> <txp:email email=“xx@berwick.lib.me.us” linktext=“Email Lyn” title=“Email Lyn” />
<txp:popup type=“c” label=“Browse” wraptag=“p” /> [SQL (0.000945): select name,title from `txp_category` where name != ‘default’ and type=‘article’ order by name]
<txp:search_input label=“Search” size=“18” wraptag=“p” /> [SQL (0.000486): select form from `txp_form` where `name` = ‘search_input’ limit 1]
<txp:feed_link label=“RSS” />
<txp:feed_link label=“Atom” flavor=“atom” />
<txp:article limit=“5” /> [SQL (0.000625): select name from `txp_section` where on_frontpage != ‘1’] [SQL (0.001917): select count(*) from `textpattern` where 1 and Status=‘4’ and Posted < now()and Section != ‘calendar’ and Section != ‘about’ and Section != ‘contact’ and Section != ‘links’] [SQL (0.001739): select *, unix_timestamp(Posted) as uPosted from `textpattern` where 1 and Status=‘4’ and Posted < now()and Section != ‘calendar’ and Section != ‘about’ and Section != ‘contact’ and Section != ‘links’ order by Posted desc limit 0, 5] [SQL (0.000581): select Form from `txp_form` where `name` = ‘default’ limit 1] [Form: default] [article 50] <txp:permlink> <txp:title/> </txp:permlink> <txp:posted/> <txp:author/> [SQL (0.000600): select RealName from `txp_users` where `name` = ‘webmaster’ limit 1] <txp:article_image align=“right” style=“margin:-50px 0 0 5px;” /> <txp:body/> <txp:comments_invite wraptag=“p” /> <txp:site_url/> [article 49] <txp:permlink> <txp:title/> </txp:permlink> <txp:posted/> <txp:author/> <txp:article_image align=“right” style=“margin:-50px 0 0 5px;” /> <txp:body/> <txp:comments_invite wraptag=“p” /> <txp:site_url/> [article 48] <txp:permlink> <txp:title/> </txp:permlink> <txp:posted/> <txp:author/> <txp:article_image align=“right” style=“margin:-50px 0 0 5px;” /> <txp:body/> <txp:comments_invite wraptag=“p” /> <txp:site_url/> [article 47] <txp:permlink> <txp:title/> </txp:permlink> <txp:posted/> <txp:author/> <txp:article_image align=“right” style=“margin:-50px 0 0 5px;” /> <txp:body/> <txp:comments_invite wraptag=“p” /> <txp:site_url/> [article 46] <txp:permlink> <txp:title/> </txp:permlink> <txp:posted/> <txp:author/> <txp:article_image align=“right” style=“margin:-50px 0 0 5px;” /> <txp:body/> <txp:comments_invite wraptag=“p” /> <txp:site_url/>
<txp:output_form form=“footer” /> [SQL (0.000629): select form from `txp_form` where `name` = ‘footer’ limit 1] <txp:feed_link label=“RSS” section=“article” flavor=“rss” />
[ —- secondpass —- ] —>

Offline

#7 2006-06-04 17:12:19

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Trouble with < txp:title / >

I don’t see anything form/page-wise that could be causing this, so it’s something internal.

What kind of titles are we dealing with? Does it matter if you change the article titles any? Have you recently changed anything, like installed a new plugin?

Offline

#8 2006-06-04 18:29:10

redpen
Member
From: Maine USA
Registered: 2005-11-01
Posts: 24

Re: Trouble with < txp:title / >

A discovery! In backtracking, I remembered having defined some custom fields. I hadn’t gotten around to using any of them, and never put a txp:custom_field tag anywhere, but when I removed the custom field names in admin>preferences, the titles returned.

I don’t understand the connection and wouldn’t expect this behavior. Insights?

Scott

Offline

#9 2006-06-04 19:58:46

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Trouble with < txp:title / >

Insights?

None. Can you show us what your field names were?

Offline

#10 2006-06-04 20:30:08

redpen
Member
From: Maine USA
Registered: 2005-11-01
Posts: 24

Re: Trouble with < txp:title / >

Mary,

I had four of them: title, author, publisher, and year. That first one was my problem. I moved ‘title’ to custom field 2, but that didn’t help. When I changed ‘title’ to ‘titled,’ the article titles reappeared.

So it’s an easy fix after all… there’s no compelling reason for me to use ‘title’ for a custom field name.

Thanks for your questions… they helped me keep looking.

Scott

Edit: The Textbook example on custom_field uses uppercase T on Title, so I tried that and it’s fine. Now that’s a fine point!

Last edited by redpen (2006-06-04 20:40:30)

Offline

#11 2006-06-04 21:04:06

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Trouble with < txp:title / >

I see, a custom field name conflict. I’ll add to the TextBook entry a list of reserved words. :)

Offline

Board footer

Powered by FluxBB