Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-01-06 03:08:27

KLS
Member
From: Singapore
Registered: 2005-12-26
Posts: 35
Website

[FIXED] Body and Comments NOT Showing in post- Assistance Required

Hey fellas, I’ve just updated from 4.0 to 4.2 (been outta touch with coding for sometime so i’m a lil rusty here) and it somehow breaks my code and layout. I’ve spent over an hour ommiting tags and whatnots and still couldnt rectify it. I suspect it could be a minor tag i’m missing due to the upgrade?

Please any kind soul, take a look at the site – http://khairudinlee.com/journal – its only suppose to show the excerpts, but the whole body is showing after the excerpts itself. [FIXED] Here’s the code for my default form too btw:

[EDIT] after fixing the above as per paperboy’s assessment, the body text [FIXED – thanks to Stuart proper code below] and comments [FIXED – due to upgrade, had to use new comment tag] are not showing in the main post…

ps: also, i got this error: The following PHP functions (which may be necessary to run Textpattern) are disabled on your server: proc_close, symlink. Is it a critical error that I need my host to enable? Cheers again…

						<div class="post-article">	
				<h2 class="post-title"><a href="<txp:permlink />" title="Permanent link to: <txp:title/>" ><txp:title /></a></h2>
				<p class="post-date"><txp:posted /></p>

			    <txp:if_article_list>
			    <!-- list page: display the short version -->
			    <txp:if_excerpt>
  				<txp:excerpt />

			    <p class="post-excerpts"><txp:permlink>( continue reading full entry )</txp:permlink></p> 
			    <txp:else />
			    <!-- article page: display the complete article -->
			    <txp:body />

			    </txp:if_article_list>
			    </txp:if_excerpt>

				<p class="post-comments"><txp:comments_invite /><br />
				// Filed under: <txp:category1 link="1" title="1" /></p>
			<ul class="hide">
				<li><a href="#navigation" title="Jump to navigation menu.">Skip to Navigation</a></li>
			</ul>
			<hr />
			</div><!-- /post-article -->

Last edited by KLS (2010-01-07 22:16:13)

Offline

#2 2010-01-06 04:53:31

paperboy
Member
From: Gothenburg, SE
Registered: 2006-01-24
Posts: 30
Website

Re: [FIXED] Body and Comments NOT Showing in post- Assistance Required

Your else-tag looks wrong: </txp:else /> – should be <txp:else />

Last edited by paperboy (2010-01-06 04:54:50)

Offline

#3 2010-01-06 11:11:20

KLS
Member
From: Singapore
Registered: 2005-12-26
Posts: 35
Website

Re: [FIXED] Body and Comments NOT Showing in post- Assistance Required

Hi mate, damn, i knew it’d be a minor thing that i’d miss! Thank you, that fixed the excerpts on the main page and fixed the layout too somehow.

But right now, in the main post itself, the body text and comments are not showing at all? :(

Offline

#4 2010-01-06 12:44:46

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: [FIXED] Body and Comments NOT Showing in post- Assistance Required

You need another <txp:else /> tag in there because you are still inside <txp:if_article_list> tag plus your closing tags are the wrong way round so something like:-

                        <div class="post-article">	
				<h2 class="post-title"><a href="<txp:permlink />" title="Permanent link to: <txp:title/>" ><txp:title /></a></h2>
				<p class="post-date"><txp:posted /></p>

			    <txp:if_article_list>
			    <!-- list page: display the short version -->
			    <txp:if_excerpt>
  				<txp:excerpt />

			    <p class="post-excerpts"><txp:permlink>( continue reading full entry )</txp:permlink></p> 
			    <txp:else />
			    <!-- list page: display the complete article if no excerpt -->
			    <txp:body />
                            </txp:if_excerpt>
                            <txp:else />
                            <!-- individual article page: display the complete article -->
                            <txp:body />
			    </txp:if_article_list>

				<p class="post-comments"><txp:comments_invite /><br />
				// Filed under: <txp:category1 link="1" title="1" /></p>
			<ul class="hide">
				<li><a href="#navigation" title="Jump to navigation menu.">Skip to Navigation</a></li>
			</ul>
			<hr />
			</div><!-- /post-article -->

Basically you have 2 “if” tags but only 1 “else” tag.

Last edited by thebombsite (2010-01-06 12:47:39)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#5 2010-01-06 12:46:48

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: [FIXED] Body and Comments NOT Showing in post- Assistance Required

You have the closing tags </txp:if_article_list> and </txp:if_excerpt> in the wrong order on the page. Try putting </txp:if_article_list> below </txp:if_excerpt>.

Offline

#6 2010-01-07 22:12:46

KLS
Member
From: Singapore
Registered: 2005-12-26
Posts: 35
Website

Re: [FIXED] Body and Comments NOT Showing in post- Assistance Required

Hi Stuart, that worked! I see, I really need to refresh myself with the tags, the comment tag is also new. Awesome. Joe, thanks for pointing that out too mate!

God bless all 3 of you for taking the time to check out my problem, really appreciate it. Have a good one (and year) guys. :)

Cheers,
Khai

Last edited by KLS (2010-01-07 22:13:44)

Offline

Board footer

Powered by FluxBB