Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2011-11-06 22:18:42
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: Single posts appear blank
Els:
The tag trace is visible in the source code.
keukenkikker wrote:GugUser, I’m using the default form and default page from Textpattern at the moment.
I don’t think so. Which page is assigned, for example, to the section “coaching”?
Offline
Re: Single posts appear blank
The following part of the tag trace from an individual article in the coaching section (near the bottom) confirms what colak wrote in his first answer:
<txp:if_category>
[<txp:if_category>: false]
<txp:if_search>
[<txp:if_search>: false]
</txp:if_search>
<txp:article limit="5" />
</txp:if_category>
<txp:if_individual_article>
[<txp:if_individual_article>: true]
<txp:site_url />
<txp:link_to_prev>
<txp:prev_title />
</txp:link_to_prev>
<txp:link_to_next>
<txp:next_title />
</txp:link_to_next>
</txp:if_individual_article>
Check the placement of your txp:article
tag. The tag trace shows that is within the txp:if_category
section (which means “are we on a category list view?”) and when you are looking at an individual article that is not the case (hence the false in the tag trace). There is no txp:article
tag in the if_individual_article
view so it will not output anything apart from the site name and link to next and prev. If you post your whole page template (your stripped down version is too stripped down), we can pinpoint it more exactly.
Last edited by jakob (2011-11-06 23:04:13)
TXP Builders – finely-crafted code, design and txp
Offline
Re: Single posts appear blank
Jakob, the code above is not wat I was working with in the beginning. When I started this topic I had a different page and form, but when the problems started I copied in the default page and form from Textpattern.
I reactivated my original page and form which is a very simple one.
The page:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml” xml:lang=“en”>
<head>
<title><txp:page_title /></title>
<meta http-equiv=“content-type” content=“text/html; charset=utf-8” />
<txp:rah_metas description_from=“excerpt,body” words=“50” keywords_from=“keywords” />
<link rel=“stylesheet” href=”<txp:css />” type=“text/css” media=“screen” />
<link href=“stylesheet.css” rel=“stylesheet” type=“text/css” />
<link rel=“shortcut icon” href=”/images/favicon.ico” />
<link rel=“icon” href=”/images/favicon.ico” type=“image/gif” />
</head>
<body>
<div id=“krpa”>
<div id=“top_left”>
</div>
<div id=“block_left”>
</div><div id=“block_right”>
<txp:output_form form=“menu” />
<br />
<txp:article_custom id=“17” form=“referenties” />
</div>
<div id=“content”>
<txp:article allowoverride=“0” form=“default” />
</div>
<div id=“footer”>
</div>
</div>
</body>
</html>
The default form:
<h1><txp:permlink><txp:title /></txp:permlink></h1>
<txp:body />
Offline
#16 2011-11-07 12:38:27
- mVincent
- New Member
- From: Philippines
- Registered: 2011-11-07
- Posts: 2
Re: Single posts appear blank
hi. Perhaps you can add on your default form:
<txp:if_individual_article >
<h1><txp:permlink><txp:title /></txp:permlink></h1>
<txp:body />
<txp:else/>
<h1><txp:permlink><txp:title /></txp:permlink></h1>
</txp:if_individual_article>
either case, colak’s suggestion should’ve work too.. except remove the <txp:article> tag inside your default form:
TXP calls another <txp:article> inside your Default Form – in which case you always get the <txp:if_article_list> to true and TXP never evaluates to <txp:else/> statement.
Offline
Re: Single posts appear blank
Hi mVincent, no result either.
Thanks for all your help, but I’m goint to remove the TXP installation and will reinstall it. I have more than 10 TXP installations running and they all work fine. I’ve tried pages and forms from my other installations and the default ones from TXP, and the problem still exists. Perhaps something is wrong in my database. I’ll let you know!
Offline
#18 2011-11-07 13:14:08
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: Single posts appear blank
Can you tell us more about the installation.
What’s “coaching” in the URL http://www.kernvisiemethode.nl/coaching/?
A section? A directory? Why http://www.kernvisiemethode.nl/ is redirected but http://www.kernvisiemethode.nl/coaching/ not? What is the section of the article you want to show?
Offline
Re: Single posts appear blank
‘coaching’ is a section. When I call a section all articles are shown, but as soon as I select a specific article a blank page is shown.
www.kernvisiemethode is redirected to a different site until all sections are fully operational.
Offline
Re: Single posts appear blank
maybe there’s a misunderstanding with what to insert where and how. What do you get with this as your page template (it’s colak’s original suggestion):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title><txp:page_title /></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<txp:rah_metas description_from="excerpt,body" words="50" keywords_from="keywords" />
<link rel="stylesheet" href="<txp:css />" type="text/css" media="screen" />
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/images/favicon.ico" />
<link rel="icon" href="/images/favicon.ico" type="image/gif" />
</head>
<body>
<div id="krpa">
<div id="top_left"> </div>
<div id="top_right"> </div>
<div id="theme"> </div>
<div id="block_left"> </div>
<div id="block_right">
<txp:output_form form="menu" />
<br />
<txp:article_custom id="17" form="referenties" />
</div>
<!-- #content -->
<div id="content">
<txp:article>
<txp:if_article_list>
<!-- article list view -->
<h2><txp:permlink><txp:title /></txp:permlink></h2>
<txp:excerpt />
<txp:else />
<!-- individual article view -->
<h1><txp:permlink><txp:title /></txp:permlink></h1>
<txp:body />
</txp:if_article_list>
</txp:article>
</div>
<!-- end #content -->
<div id="footer">
</div>
</div>
</body>
</html>
(Leave the html comments in the code, as it will show in the code output and help debugging.)
Last edited by jakob (2011-11-07 14:13:46)
TXP Builders – finely-crafted code, design and txp
Offline
Re: Single posts appear blank
Hi Jakob,
I’ve replaced my page template with your code, but … the problems remains the same.
Offline
Re: Single posts appear blank
Baffling.
Can you just do me a quick favour and check the names of your custom fields don’t clash with some built-in names. There’s a list of rogue names somewhere, but I can’t find it for the life of me.
EDIT: On this wiki page under ‘Custom Fields’
Last edited by Bloke (2011-11-07 14:51:23)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Single posts appear blank
Bloke, you’re my hero!!!
I had two custom fields: ‘Herhaling’ and ‘Status’. Guess what?! When I changed ‘Status’ into something else it worked!
Thank you all for your help.
Offline
Re: Single posts appear blank
keukenkikker wrote:
Bloke, you’re my hero!!!
You’re welcome. Sorry it didn’t click earlier (it offers such advice in Els’ .sig but I missed it!)
This *cough* feature is a real pain that needs fixing in the next major version.
Last edited by Bloke (2011-11-07 14:58:51)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline