Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: comments form appears twice.
So if you need 2 <txp:article /> tags on a single page, yet don’t want two article forms, you have to add manually add a comment form instead of relying on the auto-append preference.
Offline
Re: comments form appears twice.
Hi ruud the reason for the two article tags is to achieve the placement of the article_image. But you did figure out te problem.
So the last question would be… how do I manually add a comment form? I’ve been a txp user since… forever…. but I never had to do that. Do I call the form in a template or … I’m lost here:)
Alternatively is there a way to call for the article_image without triggering the comments form?
Last edited by colak (2007-08-09 17:25:33)
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: comments form appears twice.
<txp:output_form form="comments_display" />
Last edited by ruud (2007-08-09 18:00:34)
Offline
#16 2007-08-09 20:44:50
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: comments form appears twice.
There is some help in the FAQ: Comment display confusion :)
Offline
Re: comments form appears twice.
sorted it!!! rud, els, Gocom, jstubbs thanks sooo much.
The solution?
Replaced <txp:article form="yfc-articleimg" limit="1" /> with <txp:output_form form="yfc-articleimg" />
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: comments form appears twice.
Now that this problem is solved, another problem appeared…
The runtime is toooooooo slow. This happens only when a page has comments enabled
I read the FAQ: diagnosing performance problems
Before I write for txd support can anyone here spot what might be causing this lag? here’s the tag trace…
<!-- Runtime: 81.190 -->
<!-- Query time: 0.033844 -->
<!-- Queries: 42 -->
<!-- Memory: 3420Kb, <txp:if_comments_preview>
<script type="text/javascript">
<!--
function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'none')
e.style.display = 'block';
else
e.style.display = 'none';
}
//-->
</script>
<div class="cmntpreview">
<h1>Preview your comment</h1>
<h2>Hi <txp:php>echo pcs('name');</txp:php></h2>
<p><strong>Your comment is not yet submitted.</strong><br />
This is what you wrote:</p>
<div class="previewtext">
<txp:comments_error wraptag="ul" break="li" />
<txp:comments_preview wraptag="p" />
</div>
<h2>To submit your comment, please click the button below.</h2>
<label><input type="submit" name="submit" value="Submit" class="button disabled" id="txpCommentSubmit" disabled="disabled" /></label>
<br /><br />
<p><strong>To make changes, please click <a href="#commentsform">edit</a></strong></p>
<p style="text-align:right"><a href="#" onclick="toggle_visibility('cmntform');">Close</a></p>
</div>
</txp:if_comments_preview> -->
<!-- txp tag trace:
[SQL (0.000119): select name from txp_lang where lang='en-gb' limit 1]
[SQL (0.001382): select name, data from txp_lang where lang='en-gb' AND ( event='public' OR event='common')]
[SQL (0.008219): select name, code, version from txp_plugin where status = 1]
[SQL (0.000276): select ID,Section from textpattern where ID = 22 and Status >= 4 limit 1]
[SQL (0.000096): select ID,Section from textpattern where ID = 22 and Status >= 4 limit 1]
[SQL (0.000127): select * from txp_section where name = 'article' limit 1]
[SQL (0.000273): select *, unix_timestamp(Posted) as uPosted from textpattern where ID=22 and Status = 4]
[article 22]
[SQL (0.000404): select ID, Title, url_title, unix_timestamp(Posted) as uposted
from textpattern where Posted > '2007-08-08 14:56:15' and Section = 'article' and Status=4 and Posted < now() order by Posted asc limit 1]
[SQL (0.000601): select ID, Title, url_title, unix_timestamp(Posted) as uposted
from textpattern where Posted < '2007-08-08 14:56:15' and Section = 'article' and Status=4 and Posted < now() order by Posted desc limit 1]
[SQL (0.000100): select user_html from txp_page where name='archive']
[Page: archive]
<txp:output_form form="yfc-header" />
[SQL (0.000087): select Form from txp_form where name='yfc-header']
[Form: yfc-header]
<txp:page_title/>
<txp:feed_link flavor="atom" format="link" label="Atom" />
<txp:feed_link flavor="rss" format="link" label="RSS" />
<txp:glx_if_frontpage>
[<txp:glx_if_frontpage>: false]
<txp:css format="link" />
</txp:glx_if_frontpage>
<txp:site_url/>
<txp:site_url/>
<txp:js n="instant"/>
<txp:text item="go_content" />
<txp:text item="go_search" />
<txp:image id="11" class="instant" />
[SQL (0.000139): select * from txp_image where id = 11 limit 1]
<txp:output_form form="yfc-articleimg" />
[SQL (0.000080): select Form from txp_form where name='yfc-articleimg']
[Form: yfc-articleimg]
<txp:if_individual_article>
[<txp:if_individual_article>: true]
<txp:chh_if_data>
[<txp:chh_if_data>: true]
<txp:article_image class="instant" />
[<txp:chh_if_data>: false]
<txp:aro_slideshow category="banner" show="caption" height="182" width="227" type="zoom" zoom="50" duration="[2000, 8000]" />
[SQL (0.010971): select id,name,w,h,caption,alt,category,ext from txp_image where (category in ('banner')) ORDER BY category LIMIT 0,99999]
</txp:chh_if_data>
</txp:if_individual_article>
<txp:image id="40" />
[SQL (0.004501): select * from txp_image where id = 40 limit 1]
<txp:output_form form="yfc-menu" />
[SQL (0.000097): select Form from txp_form where name='yfc-menu']
[Form: yfc-menu]
<txp:site_url/>
<txp:image class="noborder" id="51" />
[SQL (0.000129): select * from txp_image where id = 51 limit 1]
<txp:site_url/>
<txp:image class="noborder" id="49" />
[SQL (0.000129): select * from txp_image where id = 49 limit 1]
<txp:site_url/>
<txp:image class="noborder" id="50" />
[SQL (0.000138): select * from txp_image where id = 50 limit 1]
<txp:site_url/>
<txp:image class="noborder" id="52" />
[SQL (0.000130): select * from txp_image where id = 52 limit 1]
<txp:site_url/>
<txp:image class="noborder" id="48" />
[SQL (0.000130): select * from txp_image where id = 48 limit 1]
<txp:if_individual_article>
[<txp:if_individual_article>: true]
<txp:page_title/>
</txp:if_individual_article>
<txp:article limit="9" />
[SQL (0.000272): select *, unix_timestamp(Posted) as uPosted from textpattern where ID = 22 and Status = 4 limit 1]
[article 22]
[SQL (0.000102): select Form from txp_form where name='default']
[Form: default]
<txp:if_article_list>
[<txp:if_article_list>: false]
<txp:body/>
<txp:rss_article_edit>
</txp:rss_article_edit>
</txp:if_article_list>
[SQL (0.000081): select Form from txp_form where name='comments_display']
[Form: comments_display]
<txp:if_comments>
[<txp:if_comments>: true]
<txp:comments_count/>
<txp:title/>
</txp:if_comments>
<txp:comments/>
[SQL (0.000139): select *, unix_timestamp(posted) as time from txp_discuss where parentid=22 and visible=1 order by posted ASC]
[SQL (0.000096): select Form from txp_form where name='comments']
[Form: comments]
<txp:comment_time/>
<txp:comment_name/>
<txp:comment_message/>
[Form: comments]
<txp:comment_time/>
<txp:comment_name/>
<txp:comment_message/>
<txp:if_comments_allowed>
[<txp:if_comments_allowed>: true]
<txp:comments_form/>
[SQL (0.000167): select ip from txp_discuss_ipban where `ip` = 'xxx.xxx.xxx.xxx' limit 1]
[SQL (0.000164): select Form from txp_form where `name` = 'comment_form' limit 1]
<txp:if_comments_preview>
[<txp:if_comments_preview>: false]
</txp:if_comments_preview>
</txp:if_comments_allowed>
<txp:output_form form="yfc-sidebar" />
[SQL (0.000105): select Form from txp_form where name='yfc-sidebar']
[Form: yfc-sidebar]
<txp:image id="4" />
[SQL (0.000143): select * from txp_image where id = 4 limit 1]
<txp:glx_if_frontpage>
[<txp:glx_if_frontpage>: false]
<txp:link_to_home>
</txp:link_to_home>
</txp:glx_if_frontpage>
<txp:category_list wraptag="" break="br" />
[SQL (0.000108): select name, title from txp_category where type = 'article' and name not in('default','root') order by name ASC]
<txp:search_input wraptag="p" label="" />
[SQL (0.000105): select form from txp_form where `name` = 'search_input' limit 1]
<txp:if_individual_article>
[<txp:if_individual_article>: true]
<txp:related_articles limit="10" break="br" />
[SQL (0.000953): select *, unix_timestamp(Posted) as posted from textpattern where ID != 22 and Status = 4 and Posted <= now() and (Category1 in('about') or Category2 in('about')) order by Posted desc limit 0,10]
</txp:if_individual_article>
<txp:recent_articles limit="10" break="br" label="" wraptag="p" sortdir="desc" />
[SQL (0.001229): select *, id as thisid, unix_timestamp(Posted) as posted from textpattern where Status = 4 and Posted <= now() order by Posted desc limit 0,10]
<txp:linklist form="plainlinks" limit="10" sort="date desc" wraptag="p" />
[SQL (0.000138): select *, unix_timestamp(date) as uDate from txp_link where 1 order by date desc limit 10]
[SQL (0.000128): select Form from txp_form where name='plainlinks']
[Form: plainlinks]
<txp:linkdesctitle/>
<txp:output_form form="yfc-nav" />
[SQL (0.000083): select Form from txp_form where name='yfc-nav']
[Form: yfc-nav]
<txp:glx_if_frontpage>
[<txp:glx_if_frontpage>: false]
</txp:glx_if_frontpage>
<txp:if_individual_article>
[<txp:if_individual_article>: true]
<txp:link_to_prev>
[SQL (0.000111): select ID as thisid, Section as section, Title as title, url_title, unix_timestamp(Posted) as posted from textpattern where ID = 21]
</txp:link_to_prev>
<txp:site_url/>
<txp:link_to_next>
</txp:link_to_next>
</txp:if_individual_article>
<txp:output_form form="yfc-footer" />
[SQL (0.000106): select Form from txp_form where name='yfc-footer']
[Form: yfc-footer]
<txp:php>
</txp:php>
<txp:article_custom status="sticky" form="body" id="2" />
[SQL (0.000543): select *, unix_timestamp(Posted) as uPosted from textpattern where 1 and Status >= 4 and Posted <= now() and ID = '2' order by Posted desc limit 0, 10]
[article 2]
[SQL (0.000097): select Form from txp_form where name='body']
[Form: body]
<txp:rss_article_edit>
</txp:rss_article_edit>
<txp:body/>
[ ~~~ secondpass ~~~ ]
-->
Last edited by colak (2007-08-11 17:13:37)
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: comments form appears twice.
this is the basic stats of the page above with the comments set to off
<!-- Runtime: 0.0670 -->
<!-- Query time: 0.01508 -->
<!-- Queries: 40 -->
<!-- Memory: 3367Kb, <txp:body /> -->
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: comments form appears twice.
Try disabling the use of DNS in your preferences
Offline
Re: comments form appears twice.
Ruud I don’t know how to thank you for all this support!
With dns lookup to off here are the basic stats
<!-- Runtime: 81.598 -->
<!-- Query time: 0.247949 -->
<!-- Queries: 42 -->
<!-- Memory: 3420Kb, <txp:if_comments_preview>
No change:(
Last edited by colak (2007-08-11 13:11:36)
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: comments form appears twice.
Try making the blacklists preference empty.
Offline
Re: comments form appears twice.
by emptying (deleting sbl.spamhaus.org.) the spamlist the runitime dropped to normal
<!-- Runtime: 0.5497 -->
<!-- Query time: 0.476084 -->
<!-- Queries: 42 -->
Does this mean that i have to disable the spamlist?
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: comments form appears twice.
Yes, either disable the spamlist or get the DNS service on your webhost working correctly. Looks like it just waits until a timeout without getting answers, causing the long runtime.
Offline