Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
r1637 - comments preview fails upon second preview
Steps:
1. fill in the comments form for an article
2. preview
3. edit comment
4. preview
Result: the textarea is empty and txp returns the ‘Please enter a comment.’ message where the preview of the comment should be. I did a View Source, and the whole code for the comment preview is not in the page source (???).
This is tested in ‘live’ mode, ‘testing’ and ‘debugging’ mode on an absolutely default install with default templates. (the same happens on my more or less ‘live’ install.)
Tested with Firefox (Minefield trunk build), Safari (2.04 release build), Opera (9.01 release build).
TXP running on my OS X dev server
Server: Apache/1.3.33 (Darwin) PHP/5.1.2, MySQL: 4.1.18-standard.
Afaik, this was working fine at rev 1595.
<!-- Runtime: 0.1387 -->
<!-- Query time: 0.03404 -->
<!-- Queries: 28 -->
<!-- Memory: no info available -->
<!-- txp tag trace:
[SQL (0.000964): select name from txp_lang where lang='en-gb' limit 1]
[SQL (0.009228): select name, data from txp_lang where lang='en-gb' AND ( event='public' OR event='common')]
[SQL (0.001947): select name, code, version from txp_plugin where status='1']
[SQL (0.000944): select ID, Section from textpattern where ID = 4 and Section = 'article' and Status >= '4' limit 1]
[SQL (0.000618): select * from txp_section where name = 'article' limit 1]
[SQL (0.000947): select *, unix_timestamp(Posted) as uPosted from textpattern where ID='4' and Status = '4']
[article 4]
[SQL (0.000744): select ID, Title, url_title, unix_timestamp(Posted) as uposted
from textpattern where Posted > '2006-08-07 11:10:18' and Section = 'article' and Status=4 and Posted < now() order by Posted asc limit 1]
[SQL (0.000724): select ID, Title, url_title, unix_timestamp(Posted) as uposted
from textpattern where Posted < '2006-08-07 11:10:18' and Section = 'article' and Status=4 and Posted < now() order by Posted desc limit 1]
[SQL (0.000724): select host from txp_log where ip='127.0.0.1' limit 1]
[SQL (0.000586): insert into txp_log set `time`=now(),page='/txptest/article/4/test-article-for-nothing-more-than-testing',ip='127.0.0.1',host='localhost',refer='',status='200',method='POST']
[SQL (0.000570): select user_html from txp_page where name='archive']
[Page: archive]
<txp:css/>
<txp:page_title/>
[SQL (0.000632): select Title from textpattern where ID = 4]
<txp:link_to_home>
<txp:sitename/>
</txp:link_to_home>
<txp:linklist wraptag="p" />
[SQL (0.000581): select Form from txp_form where name='plainlinks']
[Form: plainlinks]
[SQL (0.000879): select *, unix_timestamp(date) as uDate from txp_link where 1 order by linksort asc ]
<txp:linkdesctitle/>
<txp:linkdesctitle/>
<txp:linkdesctitle/>
<txp:search_input label="Search" wraptag="p" />
[SQL (0.000498): select form from txp_form where `name` = 'search_input' limit 1]
<txp:popup type="c" label="Browse" wraptag="p" />
[SQL (0.000941): select name, title from txp_category where type = 'article' and name != 'root' order by name]
<txp:feed_link label="RSS" />
<txp:feed_link label="Atom" flavor="atom" />
<txp:site_url/>
<txp:article/>
[SQL (0.001220): select *, unix_timestamp(Posted) as uPosted from textpattern where ID='4' and Status='4' limit 1]
[article 4]
[SQL (0.000576): select Form from txp_form where name='default']
[Form: default]
<txp:comments_preview bc="1" id="4" />
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:posted/>
<txp:author/>
[SQL (0.000627): select RealName from txp_users where `name` = 'txpUser' limit 1]
<txp:body/>
<txp:comments_invite wraptag="p" />
<txp:site_url/>
[SQL (0.000655): select Form from txp_form where name='comments_display']
[Form: comments_display]
<txp:comments/>
[SQL (0.000558): select Form from txp_form where name='comments']
[Form: comments]
[SQL (0.000895): select *, unix_timestamp(posted) as time from txp_discuss where parentid='4' and visible=1 order by posted asc]
<txp:message/>
<txp:comment_name/>
<txp:comment_time/>
<txp:comment_permlink>
</txp:comment_permlink>
<txp:if_comments_allowed>
[<txp:if_comments_allowed>: true]
<txp:comments_form/>
</txp:if_comments_allowed>
<txp:if_individual_article>
[<txp:if_individual_article>: true]
<txp:link_to_prev>
[SQL (0.001201): select *,ID as thisid, unix_timestamp(Posted) as posted from textpattern where ID=3]
<txp:prev_title/>
</txp:link_to_prev>
<txp:link_to_next>
</txp:link_to_next>
</txp:if_individual_article>
<txp:if_article_list>
[<txp:if_article_list>: false]
</txp:if_article_list>
[ ~~~ secondpass ~~~ ]
<txp:comments_preview bc="1" id="4" />
[SQL (0.002207): select *, unix_timestamp(Posted) as uPosted from textpattern where ID='4' and Status >= 4]
[article 4]
[Form: comments_display]
<txp:comments/>
[Form: comments]
<txp:message/>
<txp:comment_name/>
<txp:comment_time/>
<txp:comment_permlink>
</txp:comment_permlink>
<txp:if_comments_allowed>
[<txp:if_comments_allowed>: true]
<txp:comments_form/>
[SQL (0.000680): insert into txp_discuss_nonce set issue_time=now(), nonce='7e1036bdce314d6154abf7f747b8fde5', secret='82398a0c0a9455ab76e2f58fddb60d7a']
[SQL (0.000749): select nonce, secret from txp_discuss_nonce where nonce in ('490b59a4c06ddf9994fa1ff353d8145b')]
[SQL (0.000874): select Form from txp_form where `name` = 'comment_form' limit 1]
<txp:comments_error wraptag="ul" break="li" />
<txp:comments_error/>
<txp:text item="name" />
<txp:text item="email" />
<txp:text item="message" />
<txp:comments_help/>
</txp:if_comments_allowed>
-->
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: r1637 - comments preview fails upon second preview
Thank you for the bug report.
Please try r1639 which should fix this bug.
Offline
Re: r1637 - comments preview fails upon second preview
Sencer,
Unfortunately, it doesn’t work..
1. fill in comments form
2. Preview
Result: the comment is previewed correctly, BUT immediately below, I get the warning message ‘Please enter a comment.’ The textarea is empty.
If I then
3. copy paste my comment text in the textarea and hit submit, it goes through
or
4. copy paste my comment text in the text area and hit preview, then the preview space is empty, but the text is still in the textarea (and I can hit submit without a problem).
Live mode, comments moderation turned on (turning it off doesn’t improve anything).
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: r1637 - comments preview fails upon second preview
Here is the tag trace (default templates, etc,…). We are at step 2 from my previous post here.
<!-- Runtime: 0.1406 -->
<!-- Query time: 0.039726 -->
<!-- Queries: 27 -->
<!-- Memory: no info available -->
<!-- txp tag trace:
[SQL (0.001156): select name from txp_lang where lang='en-gb' limit 1]
[SQL (0.007617): select name, data from txp_lang where lang='en-gb' AND ( event='public' OR event='common')]
[SQL (0.004348): select name, code, version from txp_plugin where status='1']
[SQL (0.001050): select ID, Section from textpattern where ID = 4 and Section = 'article' and Status >= '4' limit 1]
[SQL (0.000773): select * from txp_section where name = 'article' limit 1]
[SQL (0.002248): select *, unix_timestamp(Posted) as uPosted from textpattern where ID='4' and Status = '4']
[article 4]
[SQL (0.000963): select ID, Title, url_title, unix_timestamp(Posted) as uposted
from textpattern where Posted > '2006-08-07 11:10:18' and Section = 'article' and Status=4 and Posted < now() order by Posted asc limit 1]
[SQL (0.000985): select ID, Title, url_title, unix_timestamp(Posted) as uposted
from textpattern where Posted < '2006-08-07 11:10:18' and Section = 'article' and Status=4 and Posted < now() order by Posted desc limit 1]
[SQL (0.000957): select host from txp_log where ip='127.0.0.1' limit 1]
[SQL (0.000728): insert into txp_log set `time`=now(),page='/txptest/article/4/test-article-for-nothing-more-than-testing',ip='127.0.0.1',host='localhost',refer='',status='200',method='POST']
[SQL (0.000708): select user_html from txp_page where name='archive']
[Page: archive]
<txp:css/>
<txp:page_title/>
[SQL (0.001029): select Title from textpattern where ID = 4]
<txp:link_to_home>
<txp:sitename/>
</txp:link_to_home>
<txp:linklist wraptag="p" />
[SQL (0.000669): select Form from txp_form where name='plainlinks']
[Form: plainlinks]
[SQL (0.001055): select *, unix_timestamp(date) as uDate from txp_link where 1 order by linksort asc ]
<txp:linkdesctitle/>
<txp:linkdesctitle/>
<txp:linkdesctitle/>
<txp:search_input label="Search" wraptag="p" />
[SQL (0.000573): select form from txp_form where `name` = 'search_input' limit 1]
<txp:popup type="c" label="Browse" wraptag="p" />
[SQL (0.000912): select name, title from txp_category where type = 'article' and name != 'root' order by name]
<txp:feed_link label="RSS" />
<txp:feed_link label="Atom" flavor="atom" />
<txp:site_url/>
<txp:article/>
[SQL (0.002028): select *, unix_timestamp(Posted) as uPosted from textpattern where ID='4' and Status='4' limit 1]
[article 4]
[SQL (0.000642): select Form from txp_form where name='default']
[Form: default]
<txp:comments_preview bc="1" id="4" />
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:posted/>
<txp:author/>
[SQL (0.000589): select RealName from txp_users where `name` = 'txpUser' limit 1]
<txp:body/>
<txp:comments_invite wraptag="p" />
<txp:site_url/>
[SQL (0.002976): select Form from txp_form where name='comments_display']
[Form: comments_display]
<txp:comments/>
[SQL (0.000582): select Form from txp_form where name='comments']
[Form: comments]
[SQL (0.001023): select *, unix_timestamp(posted) as time from txp_discuss where parentid='4' and visible=1 order by posted asc]
<txp:message/>
<txp:comment_name/>
<txp:comment_time/>
<txp:comment_permlink>
</txp:comment_permlink>
<txp:message/>
<txp:comment_name/>
<txp:comment_time/>
<txp:comment_permlink>
</txp:comment_permlink>
<txp:message/>
<txp:comment_name/>
<txp:comment_time/>
<txp:comment_permlink>
</txp:comment_permlink>
<txp:message/>
<txp:comment_name/>
<txp:comment_time/>
<txp:comment_permlink>
</txp:comment_permlink>
<txp:if_comments_allowed>
[<txp:if_comments_allowed>: true]
<txp:comments_form/>
</txp:if_comments_allowed>
<txp:if_individual_article>
[<txp:if_individual_article>: true]
<txp:link_to_prev>
[SQL (0.001273): select *,ID as thisid, unix_timestamp(Posted) as posted from textpattern where ID=3]
<txp:prev_title/>
</txp:link_to_prev>
<txp:link_to_next>
</txp:link_to_next>
</txp:if_individual_article>
<txp:if_article_list>
[<txp:if_article_list>: false]
</txp:if_article_list>
[ ~~~ secondpass ~~~ ]
<txp:comments_preview bc="1" id="4" />
[SQL (0.001152): select *, unix_timestamp(Posted) as uPosted from textpattern where ID='4' and Status >= 4]
[article 4]
[Form: comments_display]
<txp:comments/>
[Form: comments]
<txp:message/>
<txp:comment_name/>
<txp:comment_time/>
<txp:comment_permlink>
</txp:comment_permlink>
<txp:if_comments_allowed>
[<txp:if_comments_allowed>: true]
<txp:comments_form/>
[SQL (0.000809): insert into txp_discuss_nonce set issue_time=now(), nonce='213d1f497c3f7ff44e5f1b0de4583bf8', secret='7e6189696d501d1cb3544b517939b9aa']
[SQL (0.000819): select Form from txp_form where `name` = 'comment_form' limit 1]
<txp:comments_error wraptag="ul" break="li" />
<txp:comments_error/>
<txp:text item="name" />
<txp:text item="email" />
<txp:text item="message" />
<txp:comments_help/>
</txp:if_comments_allowed>
-->
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: r1637 - comments preview fails upon second preview
phiw13 wrote:
Sencer,
Unfortunately, it doesn’t work..
Yes, sorry about that. Fixing the repeated preview broke the first preview. Note to myself: Never check in under time pressure. Please give r1641 a try.
Offline
Re: r1637 - comments preview fails upon second preview
Sencer wrote:
Yes, sorry about that. Fixing the repeated preview broke the first preview. Note to myself: Never check in under time pressure. Please give r1641 a try.
Much better, but not yet perfect. Preview 1 is perfect. Preview 2 has a little problem: the previewed text doesn’t display, just a blank space. All is there in the textarea, and submit works fine.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: r1637 - comments preview fails upon second preview
I will refrain from claiming anything fixed, and only casually drop the number “1642” and await your further comments (no pun intended).
Thanks :)
Offline
Re: r1637 - comments preview fails upon second preview
Sencer wrote:
(no pun intended)
r1641 – Your ad here. Contact Team Textpattern today ;)
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
#9 2006-08-07 16:20:19
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: r1637 - comments preview fails upon second preview
Yeah, that gave me a really good laugh early this morning.
Offline
Re: r1637 - comments preview fails upon second preview
Sencer wrote:
I will refrain from claiming anything fixed, and only casually drop the number “1642” and await your further comments.
Testing before early morning coffee and breakfast (dedicated tester…): It works correctly now !
(no pun intended).
Lol :-)
Thanks Sencer.
edit: spellcheck.
Last edited by phiw13 (2006-08-07 23:44:00)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline