Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
comments form appears twice.
I’m experimenting on my computer for a possible new layout for my site but the comment form appears twice.
Can anyone spot what I’m missing in here?
This is what I have in the comments_display form
<txp:if_comments>
<h3 id="comments"><txp:comments_count /> Comments for "<txp:title />"</h3>
</txp:if_comments>
<txp:comments />
<txp:if_comments_allowed>
<txp:comments_form />
</txp:if_comments_allowed>
and this is what I have in the comment_form
<txp:if_comments_preview>
<txp:comments_error wraptag="ul" break="li" />
<txp:comments_preview wraptag="p" />
</txp:if_comments_preview>
<fieldset>
<txp:comment_message_input />
<txp:comment_name_input />
<txp:comment_email_input />
<txp:comment_web_input />
<txp:comment_remember />
<txp:comment_preview />
<txp:comment_submit />
</fieldset>
Last edited by colak (2007-08-09 06:29:38)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Offline
Re: comments form appears twice.
Looks like:
<txp:comments />
<txp:if_comments_allowed>
<txp:comments_form preview=1/>
Comments is shown with “comments”, then you have “comments_form”
Offline
Re: comments form appears twice.
Hi guys thanks for your help here but it is still not functioning properly…
@ Cocom
- the tag trace showd that
<txp:comments_form preview=1/>resulted in error but after removingpreview=1it reveals no errors. Took it out form my original post for clarity. - the prefs are set to ‘yes’
@ jstubbs
<txp:comments /> returns the actual comments whereas the <txp:comments_form /> returns the form fields for the comments.
Last edited by colak (2007-08-09 06:37:49)
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.
Can you post the tag trace here, perhaps it reveals something that could be helpful.
Offline
Re: comments form appears twice.
Hi ruud.. I wouldn’t know where to start but here it is:)
<!-- Runtime: 0.1581 -->
<!-- Query time: 0.027446 -->
<!-- Queries: 43 -->
<!-- Memory: 3696Kb, <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.000132): select name from txp_lang where lang='en-gb' limit 1]
[SQL (0.001352): select name, data from txp_lang where lang='en-gb' AND ( event='public' OR event='common')]
[SQL (0.001795): select name, code, version from txp_plugin where status = 1]
[SQL (0.000191): select ID,Section from textpattern where ID = 22 and Status >= 4 limit 1]
[SQL (0.000099): select ID,Section from textpattern where ID = 22 and Status >= 4 limit 1]
[SQL (0.000129): select * from txp_section where name = 'article' limit 1]
[SQL (0.000271): select *, unix_timestamp(Posted) as uPosted from textpattern where ID=22 and Status = 4]
[article 22]
[SQL (0.000407): 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.000692): 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.000103): select user_html from txp_page where name='archive']
[Page: archive]
<txp:output_form form="yfc-header" />
[SQL (0.000413): 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.000156): select * from txp_image where id = 11 limit 1]
<txp:article form="yfc-articleimg" limit="1" />
[SQL (0.000284): select *, unix_timestamp(Posted) as uPosted from textpattern where ID = 22 and Status = 4 limit 1]
[article 22]
[SQL (0.000488): 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.000172): 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>
[SQL (0.000224): select Form from txp_form where name='comments_display']
[Form: comments_display]
<txp:if_comments>
[<txp:if_comments>: false]
</txp:if_comments>
<txp:if_comments_allowed>
[<txp:if_comments_allowed>: true]
<txp:comments_form/>
[SQL (0.000406): 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:image id="40" />
[SQL (0.000158): select * from txp_image where id = 40 limit 1]
<txp:output_form form="yfc-menu" />
[SQL (0.000228): select Form from txp_form where name='yfc-menu']
[Form: yfc-menu]
<txp:site_url/>
<txp:image class="noborder" id="51" />
[SQL (0.000145): select * from txp_image where id = 51 limit 1]
<txp:site_url/>
<txp:image class="noborder" id="49" />
[SQL (0.000141): select * from txp_image where id = 49 limit 1]
<txp:site_url/>
<txp:image class="noborder" id="50" />
[SQL (0.000140): select * from txp_image where id = 50 limit 1]
<txp:site_url/>
<txp:image class="noborder" id="52" />
[SQL (0.000141): select * from txp_image where id = 52 limit 1]
<txp:site_url/>
<txp:image class="noborder" id="48" />
[SQL (0.000141): 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.000273): select *, unix_timestamp(Posted) as uPosted from textpattern where ID = 22 and Status = 4 limit 1]
[article 22]
[SQL (0.000332): 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>
[Form: comments_display]
<txp:if_comments>
[<txp:if_comments>: false]
</txp:if_comments>
<txp:if_comments_allowed>
[<txp:if_comments_allowed>: true]
<txp:comments_form/>
[SQL (0.009432): 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.000587): select Form from txp_form where name='yfc-sidebar']
[Form: yfc-sidebar]
<txp:image id="4" />
[SQL (0.000229): 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.000137): 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.000350): 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.000911): 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.001191): 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.000129): select *, unix_timestamp(date) as uDate from txp_link where 1 order by date desc limit 10]
[SQL (0.000376): select Form from txp_form where name='plainlinks']
[Form: plainlinks]
<txp:linkdesctitle/>
<txp:output_form form="yfc-nav" />
[SQL (0.000279): 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.000120): 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.000244): 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.000517): 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.000305): select Form from txp_form where name='body']
[Form: body]
<txp:rss_article_edit>
</txp:rss_article_edit>
<txp:body/>
[ ~~~ secondpass ~~~ ]
-->
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.
What’s in the “yfc-articleimg” form?
Offline
Re: comments form appears twice.
ruud wrote:
What’s in the “yfc-articleimg” form?
hi ruud
yfc-articleimg calls for the article image
<txp:if_individual_article><txp:chh_if_data><txp:article_image class="instant" /><txp:else /><txp:aro_slideshow category="banner" show="caption" height="182" width="227" type="zoom" zoom="50" duration="[2000, 8000]" /></txp:chh_if_data>
<txp:else />
<txp:aro_slideshow category="banner" show="caption" height="182" width="227" type="zoom" zoom="50" duration="[2000, 8000]" />
</txp:if_individual_article>
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.
Can you post the contents of the entire template?
Offline
Re: comments form appears twice.
This is the “archive” template for articles
<txp:output_form form="yfc-header" />
<body>
<!-- accessibility -->
<div id="accessibility">
<ul>
<li><a href="#content"><txp:text item="go_content" /></a></li>
<li><a href="#sidebar-2"><txp:text item="go_search" /></a></li>
</ul>
<span style="display:none"><txp:image id="11" class="instant" /></span>
</div>
<!-- head -->
<!-- head bars -->
<div id="head">
<div class="barwrap">
<div id="flashbar"><txp:article form="yfc-articleimg" limit="1" /></div>
<div class="bar"><txp:image id="40" /></div>
<div class="clear"> </div>
</div></div>
<div id="barwrap2">
<div id="bar1"> </div>
</div>
<noscript><p class="alert">To experience the full functionality of this site please enable your JavaScript</p></noscript>
<div id="containerwrap">
<div id="container">
<txp:output_form form="yfc-menu" />
<h1><txp:if_individual_article><txp:page_title /><txp:else /><txp:sitename /></txp:if_individual_article></h1>
<!-- center -->
<div id="content">
<div class="article"><txp:article limit="9" /><div class="clear"> </div></div>
<div class="clear"> </div>
</div>
<!-- menu -->
<txp:output_form form="yfc-sidebar" />
</div>
<div class="clear"> </div>
</div>
<!-- nav -->
<txp:output_form form="yfc-nav" />
<!-- footer -->
<txp:output_form form="yfc-footer" />
</body>
</html>
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.
Gocom said:
Have you manually and automatically add comments to your articles? (TXP / Prefs / Comments / Automatically append comments to articles? -> No)
colak responded:
the prefs are set to ‘yes’
but there are 2 <txp:article /> tags in the tag trace… and if the comments are auto-appended to the article tag, that would explain the two comment forms. What happens if you set that preference to ‘no’?
Offline
Re: comments form appears twice.
ruud wrote:
but there are 2 <txp:article /> tags in the tag trace… and if the comments are auto-appended to the article tag, that would explain the two comment forms. What happens if you set that preference to ‘no’?
Ruud thanks for all your help here.
The page is returned with nothing on.
Last edited by colak (2007-08-09 16:53:32)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline