Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-14 09:12:35

maple
Member
From: China
Registered: 2006-06-28
Posts: 11
Website

I cannot preview comment and submit it ~~

I just transfer my weblog from wordpress to txp . And now making a skin .

Now , when I hit “preview” , nothing happen but the comment form disappeared . I have try to add some code like this , but it doesn’t work .

Maybe it’s an obvious mistake but I a beginner , I find a approximate one like this but I use a Linux host

This is the example

and my comments_display form:

<code><txp:if_comments></code><br/> <code> <h3 id=“comment”><txp:comments_count /> Responses to “<txp:title />”</h3></code><br/> <code> <txp:comments /></code><br/>
<code></txp:if_comments></code><br/>
<code><txp:if_comments_preview></code><br/> <code> <div id=“cpreview”></code><br/> <code> <txp:comments_preview form=“comments_preview”/></code><br/> <code> <txp:comments_form preview=“1” /></code><br/> <code> </div></code><br/>
<code><txp:else /></code><br/>
<code> <txp:if_comments_allowed></code><br/> <code> <txp:comments_form /></code><br/> <code> <txp:else /></code><br/> <code> <p><txp:text item=“comments_closed” /></p></code><br/> <code> </txp:if_comments_allowed></code><br/>
<code></txp:if_comments_preview></code><br/>

and my Diagnostics:

Textpattern version: 4.0.3 (r1188)
Last Update: 2006-10-09 17:53:37/2006-10-09 17:44:35
Document root: /home/bororod/public_html/weblog
$path_to_site: /home/bororod/public_html/weblog/txp
Textpattern path: /home/bororod/public_html/weblog/txp/textpattern
Permanent link mode: section_title
Temporary directory path: /home/bororod/public_html/weblog/txp/textpattern/tmp
Site URL: weblog.bororo.org/txp
PHP version: 4.3.11
Register globals: 1
Server Local Time: 2006-10-14 15:00:27
MySQL: 4.1.21-standard
Locale: en_GB.UTF-8
Server: Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
PHP Server API: cgi
Server OS: Linux 2.6.17.6.dn2.p4

Pre-flight check:
————————————
Your version of PHP has security related risks. Please turn register_globals off or update to a newer PHP version.
————————————

.htaccess file contents:
————————————
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#RewriteBase /relative/web/path/

<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteRule ^(.*) index.php </IfModule>

#php_value register_globals 0

————————————

Charset (default/config): latin1/utf8
character_set_client: utf8
character_set_connection: utf8
character_set_database: latin1
character_set_results: utf8
character_set_server: latin1
character_set_system: utf8
character_sets_dir: /usr/share/mysql/charsets/
18 Tables: OK

PHP extensions: xslt, xmlrpc/0.51, xml, wddx, tokenizer/0.1, standard/4.3.11, sockets, session, pspell, posix, pcre, overload, mysql, mhash, mcrypt, mbstring, imap, iconv, gettext, gd, ftp, exif/1.4 $Id: exif.c,v 1.118.2.37 2005/03/22 22:07:03 edink Exp $, domxml/20020815, curl, ctype, calendar, bcmath, zlib/1.1, openssl, Zend Optimizer
/include/txp_category.php: r1154 (dffd7979531373149c74e3eedfbb50e2)
/include/txp_plugin.php: r1167 (c2c7d7fc1e4918c79cd3658c62e4fbda)
/include/txp_auth.php: r1166 (3e2eaca7b151e14561125ab68e722203)
/include/txp_form.php: r947 (c0e4393328985742bd81cda61d10d5ed)
/include/txp_section.php: r1154 (d85c1ce405fccd9dac364c8ef4eb72eb)
/include/txp_tag.php: r1134 (3e2dfbd6fdccf0693c147ba22a9705e7)
/include/txp_list.php: r1042 (e85d2de1c63b41f0e5bdcf268e3c487b)
/include/txp_page.php: r876 (e22dc37b465b87757722732a225b25f3)
/include/txp_discuss.php: r1170 (1e56e08cc95c255783410076db12529f)
/include/txp_prefs.php: r1170 (c806be1b1f238e75a5ff6b7cf8432d17)
/include/txp_log.php: r906 (68c4f32b70ce41a349f197b6bba6c200)
/include/txp_preview.php: r628 (a16f84b6610fc66db0bce51e25b7af34)
/include/txp_image.php: r1168 (e8ec79ff9b3a21c356ee23da7973b1f0)
/include/txp_article.php: r1170 (88689d7469d16c13d51bd4adff03ebd7)
/include/txp_css.php: r922 (0c596d9968052b89581d1ca65a77c5de)
/include/txp_admin.php: r1074 (7e87ff0e29101593fb170b1a2de9fd59)
/include/txp_link.php: r1154 (7c0c55ff6580793dff0626f169e64ad6)
/include/txp_diag.php: r1154 (5d66b90f7e7720dd0e3526ca1b24cf89)
/lib/admin_config.php: r877 (9aea12193cc76eea1964eb0383ec6513)
/lib/txplib_misc.php: r1170 (7000a1b27aa40c90978211e6cff358ec)
/lib/taglib.php: r628 (493878f922262157601c26a999a1c478)
/lib/txplib_head.php: r1183 (fb85b66b4e379476935233f844844bef)
/lib/classTextile.php: r1141 (b066c2bfa94a26ae3d70b245dcf81369)
/lib/txplib_html.php: r1166 (bd11de6e6daa3391eab75a46db55ae36)
/lib/txplib_db.php: r1170 (5a2c3a1e328cd343a067cbb8fd25cd79)
/lib/IXRClass.php: r765 (2efb0fb05b55c634072b0bae9af38bdd)
/lib/txplib_forms.php: r950 (74da2c67abe4786c353ea416c13656eb)
/publish/taghandlers.php: r1188 (4e8eaeb0543d8fde09d6e423af4253b9)
/publish/atom.php: r1117 (14c1aa23c708898d7723b3d6b9c89050)
/publish/log.php: r864 (c3d16d3dfe375819a19fcd62398e4b86)
/publish/comment.php: r1187 (d55dde574418d2eaf6a394d703056d9a)
/publish/search.php: r884 (80f942f1dc301857c2fa9dcb16aa1246)
/publish/rss.php: r1099 (ce0d82b9435d8f1de01c8e2b6c585f93)
/publish.php: r1186 (d5c20bf2298e87969575f9e622bf2797)
/index.php: r1172 (52f753ebb51c1f7d5312485d9dbad7e4)
/css.php: r944 (df1c754417bdfb4e97a2c83ae5b454ee)

Who can tell me why? Thanks in advance !

Last edited by maple (2006-10-14 15:06:29)


世界真奇妙,后来才知道

Offline

#2 2006-10-14 19:48:47

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: I cannot preview comment and submit it ~~

Try this:

<txp:if_comments>

	<h3 id="comment"><txp:comments_count /> Responses to "<txp:title />"</h3>

	<txp:comments />

</txp:if_comments>



<txp:if_comments_allowed>

	<txp:if_comments_preview>

		<div id="cpreview">
			<txp:comments_preview form="comments_preview"/>
		</div>

	</txp:if_comments_preview>

	<txp:comments_form preview="1" />

<txp:else />

	<p><txp:text item="comments_closed" /></p>

</txp:if_comments_allowed>

:) If that doesn’t work, then please post a tag trace.

Offline

#3 2006-10-14 21:16:03

maple
Member
From: China
Registered: 2006-06-28
Posts: 11
Website

Re: I cannot preview comment and submit it ~~

Thanks a lot ! Although it doesn’t work (~~)

But now I think “tag trace” is a cooooool function .

In the long code . I find “[<txp:if_comments_preview>: false]” in it , and also I don’t know why. like this:
<pre><code>
&lt;txp:if_comments_allowed&gt; [&lt;txp:if_comments_allowed&gt;: true] &lt;txp:if_comments_preview&gt; [&lt;txp:if_comments_preview&gt;: false] &lt;/txp:if_comments_preview&gt; &lt;txp:comments_form preview=“1” /&gt; [SQL (0.000493): insert into `txp_discuss_nonce` set issue_time=now(), nonce=‘bd83bdbeb7b1f0b570cdc0f05c2bf86e’, secret=‘0cd3007d0074553cecc1bac39c877beb’] [SQL (0.000304): select Form from `txp_form` where `name` = ‘comment_form’ limit 1] &lt;txp:if_comments_error&gt; [&lt;txp:if_comments_error&gt;: false] &lt;/txp:if_comments_error&gt; &lt;txp:comments_help/&gt; &lt;/txp:if_comments_allowed&gt;
</code></pre>

It looks a little perplexing , maybe other form wrong ? but the “comments_preview” and “comment_form” are simple . follow the full —

<pre><code>
[SQL (0.000937): select name from `txp_lang` where lang=‘en-gb’ limit 1]
[SQL (0.013123): select name, data from `txp_lang` where lang=‘en-gb’ AND ( event=‘public’ OR event=‘common’)]
[SQL (0.000410): select name, code from `txp_plugin` where status=‘1’]
[SQL (0.001580): select ID,Section from `textpattern` where url_title like ‘blogbus-hack-waste’ AND Section=‘papyrus’ limit 1]
[SQL (0.000550): select * from `txp_section` where name = ‘papyrus’ limit 1]
[SQL (0.000240): select Posted, AuthorID, Keywords from `textpattern` where ID=47]
[SQL (0.000374): select ID, Title, url_title, unix_timestamp(Posted) as uposted from textpattern where Posted &gt; ’2006-10-08 07:53:00’ and Section = ‘papyrus’ and Status=4 and Posted &lt; now() order by Posted asc limit 1]
[SQL (0.000548): select ID, Title, url_title, unix_timestamp(Posted) as uposted from textpattern where Posted &lt; ’2006-10-08 07:53:00’ and Section = ‘papyrus’ and Status=4 and Posted &lt; now() order by Posted desc limit 1]
[SQL (0.000402): select RealName from `txp_users` where `name` = ‘admin’ limit 1]
[SQL (0.000409): select host from `txp_log` where ip=‘222.20.242.198’ limit 1]
[SQL (0.000366): select user_html from `txp_page` where name=‘default’]
[Page: default]
&lt;txp:output_form form=“doctype” /&gt; [SQL (0.000353): select form from `txp_form` where `name` = ‘doctype’ limit 1] &lt;txp:css/&gt;
&lt;txp:if_article_list&gt; [&lt;txp:if_article_list&gt;: false]
&lt;/txp:if_article_list&gt;
&lt;txp:if_individual_article&gt; [&lt;txp:if_individual_article&gt;: true] &lt;txp:page_title separator=” | “ /&gt; [SQL (0.000236): select Title from `textpattern` where ID = 47]
&lt;/txp:if_individual_article&gt;
&lt;txp:link_to_home&gt; &lt;txp:sitename/&gt;
&lt;/txp:link_to_home&gt;
&lt;txp:site_slogan/&gt;
&lt;txp:output_form form=“sidebar-1” /&gt; [SQL (0.000196): select form from `txp_form` where `name` = ‘sidebar-1’ limit 1] &lt;txp:if_article_list&gt; [&lt;txp:if_article_list&gt;: false] &lt;txp:section_list label=”“ exclude=“about,article,Socks” break=“li” wraptag=“ul” /&gt; [SQL (0.000362): select name,title from `txp_section` where name != ‘default’ order by name] &lt;txp:category_list label=”“ break=“li” wraptag=“ul” /&gt; [SQL (0.000544): select name,title from `txp_category` where name != ‘default’ and type=‘article’ order by name] &lt;/txp:if_article_list&gt;
&lt;txp:output_form form=“sidebar-2” /&gt; [SQL (0.000238): select form from `txp_form` where `name` = ‘sidebar-2’ limit 1] &lt;txp:site_url/&gt; &lt;txp:if_article_list&gt; [&lt;txp:if_article_list&gt;: false] &lt;txp:related_articles label=”“ limit=“7” break=“li” wraptag=“ul” /&gt; [SQL (0.000225): select Category1,Category2 from `textpattern` where ID=‘47’ limit 1] [SQL (0.002192): select *, id as thisid, unix_timestamp(Posted) as posted from `textpattern` where Status=4 and ((Category1=‘design’) or (Category2=‘design’) or (Category1=‘ride’) or (Category2=‘ride’)) and Posted &lt;= now() order by Posted desc limit 0,7] &lt;/txp:if_article_list&gt;
&lt;txp:if_search&gt; [&lt;txp:if_search&gt;: false] &lt;txp:article limit=“7”/&gt; [SQL (0.000607): select *, unix_timestamp(Posted) as uPosted from `textpattern` where ID=‘47’ and Status in (4,5) limit 1] [article 47] [SQL (0.000233): select Form from `txp_form` where `name` = ‘default’ limit 1] [Form: default] &lt;txp:posted format=”%a”/&gt; &lt;txp:posted format=”%m%y”/&gt; &lt;txp:permlink&gt; &lt;txp:title/&gt; &lt;/txp:permlink&gt; &lt;txp:posted format=”%m”/&gt; &lt;txp:posted format=”%y”/&gt; &lt;txp:if_first_article&gt; [&lt;txp:if_first_article&gt;: true] &lt;txp:if_section name=“papyrus,Socks” &gt; [&lt;txp:if_section name=“papyrus,Socks” &gt;: true] &lt;/txp:if_section&gt; &lt;/txp:if_first_article&gt; &lt;txp:if_first_article&gt; [&lt;txp:if_first_article&gt;: true] &lt;txp:body/&gt; &lt;/txp:if_first_article&gt; &lt;txp:comments_invite/&gt; &lt;txp:site_url/&gt; &lt;txp:category1/&gt; &lt;txp:category1 title=“1” /&gt; [SQL (0.000334): select title from `txp_category` where name=‘design’ and type=‘article’] &lt;txp:category1 title=“1” /&gt; &lt;txp:site_url/&gt; &lt;txp:category2/&gt; &lt;txp:category2 title=“2” /&gt; [SQL (0.000269): select title from `txp_category` where name=‘ride’ and type=‘article’] &lt;txp:category2 title=“2” /&gt; [SQL (0.000258): select Form from `txp_form` where `name` = ‘comments_display’ limit 1] [Form: comments_display] &lt;txp:if_comments&gt; [&lt;txp:if_comments&gt;: true] &lt;txp:comments_count/&gt; &lt;txp:title/&gt; &lt;txp:comments/&gt; [SQL (0.000281): select Form from `txp_form` where `name` = ‘comments’ limit 1] [Form: comments] [SQL (0.000946): select *, unix_timestamp(posted) as time from `txp_discuss` where parentid=‘47’ and visible=1 order by posted asc] &lt;txp:message/&gt; &lt;txp:comment_name/&gt; &lt;txp:comment_time/&gt; &lt;txp:comment_permlink&gt; &lt;/txp:comment_permlink&gt; &lt;txp:message/&gt; &lt;txp:comment_name/&gt; &lt;txp:comment_time/&gt; &lt;txp:comment_permlink&gt; &lt;/txp:comment_permlink&gt; &lt;txp:message/&gt; &lt;txp:comment_name/&gt; &lt;txp:comment_time/&gt; &lt;txp:comment_permlink&gt; &lt;/txp:comment_permlink&gt; &lt;txp:message/&gt; &lt;txp:comment_name/&gt; &lt;txp:comment_time/&gt; &lt;txp:comment_permlink&gt; &lt;/txp:comment_permlink&gt; &lt;txp:message/&gt; &lt;txp:comment_name/&gt; &lt;txp:comment_time/&gt; &lt;txp:comment_permlink&gt; &lt;/txp:comment_permlink&gt; &lt;txp:message/&gt; &lt;txp:comment_name/&gt; &lt;txp:comment_time/&gt; &lt;txp:comment_permlink&gt; &lt;/txp:comment_permlink&gt; &lt;txp:message/&gt; &lt;txp:comment_name/&gt; &lt;txp:comment_time/&gt; &lt;txp:comment_permlink&gt; &lt;/txp:comment_permlink&gt; &lt;txp:message/&gt; &lt;txp:comment_name/&gt; &lt;txp:comment_time/&gt; &lt;txp:comment_permlink&gt; &lt;/txp:comment_permlink&gt; &lt;/txp:if_comments&gt; &lt;txp:if_comments_allowed&gt; [&lt;txp:if_comments_allowed&gt;: true] &lt;txp:if_comments_preview&gt; [&lt;txp:if_comments_preview&gt;: false] &lt;/txp:if_comments_preview&gt; &lt;txp:comments_form preview=“1” /&gt; [SQL (0.000493): insert into `txp_discuss_nonce` set issue_time=now(), nonce=‘bd83bdbeb7b1f0b570cdc0f05c2bf86e’, secret=‘0cd3007d0074553cecc1bac39c877beb’] [SQL (0.000304): select Form from `txp_form` where `name` = ‘comment_form’ limit 1] &lt;txp:if_comments_error&gt; [&lt;txp:if_comments_error&gt;: false] &lt;/txp:if_comments_error&gt; &lt;txp:comments_help/&gt; &lt;/txp:if_comments_allowed&gt;
&lt;/txp:if_search&gt;
&lt;txp:if_individual_article&gt; [&lt;txp:if_individual_article&gt;: true] &lt;txp:link_to_prev&gt; &lt;txp:prev_title/&gt; [SQL (0.000738): select *,ID as thisid, unix_timestamp(Posted) as posted from `textpattern` where ID=46] &lt;/txp:link_to_prev&gt; &lt;txp:link_to_next&gt; &lt;/txp:link_to_next&gt;
&lt;/txp:if_individual_article&gt;
&lt;txp:if_article_list&gt; [&lt;txp:if_article_list&gt;: false]
&lt;/txp:if_article_list&gt;
&lt;txp:output_form form=“foot” /&gt; [SQL (0.000323): select form from `txp_form` where `name` = ‘foot’ limit 1] &lt;txp:link_to_home&gt; &lt;/txp:link_to_home&gt;
[ —- secondpass —- ]
</code></pre>

Last edited by maple (2006-10-14 21:33:56)


世界真奇妙,后来才知道

Offline

#4 2006-10-15 03:10:55

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: I cannot preview comment and submit it ~~

First, your comments_form appears to be wonky. Please post it’s contents.

Offline

#5 2006-10-15 04:26:32

maple
Member
From: China
Registered: 2006-06-28
Posts: 11
Website

Re: I cannot preview comment and submit it ~~

You are right . I set a wonky form . I have correctted it . Thank you very much !

By the way~~ I want to Chang the URL form “xxx.com/txp” to root (“xxx.com/”) , at the same server, any handy way?

Last edited by maple (2006-10-15 04:41:29)


世界真奇妙,后来才知道

Offline

#6 2006-10-15 05:43:10

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: I cannot preview comment and submit it ~~

It’s pretty simple.

  1. Move all your Textpattern files to your root directory.
  2. Open up config.php and correct $txpcfg['txpath'].
  3. Login, head to your admin prefs and update your site url.

Offline

#7 2006-10-16 22:21:00

roryrory
New Member
Registered: 2006-10-11
Posts: 7

Re: I cannot preview comment and submit it ~~

I am also having this problem – I can’t preview comment and submit :(

I’ve been searching through the FAQ & Forum, this is th eonly relevant post i have found ~ which strangely seems to be a very rescent post too.

The comments above DONT* seem to clearly say what the solution to the problem is? perhaps somebody could kindly point out to me exactly what the solution to the problem of the comments not working is?

or

alternatively i have tried re-installing from scratch, and still i couldnt get the comments to preview & submit, which leads me to think there is a bug, or is it just me?

..could somebody point me in the direction of the steps to take, to create a very simple blog section on the site using the predefined form & tags etc..?

my project is residing here at the moment – www.waymoby.co.uk/pregalates …(still working on it so there’s other issues/bugs that may not be working, but plz feel free to point out)

thanks :)

Rory

Last edited by roryrory (2006-10-16 22:56:59)

Offline

#8 2006-10-16 22:30:44

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: I cannot preview comment and submit it ~~

Rory,

Please read the FAQ for a guide to asking for help.


Alex

Offline

#9 2006-10-16 22:44:46

maple
Member
From: China
Registered: 2006-06-28
Posts: 11
Website

Re: I cannot preview comment and submit it ~~

@Mary: Thank you very much . I have finished most things . Welcome to my site —— the only problem is I’m write in Chinese :)

@Rory: Maybe you can take some try like me . At least describe it clearly .


世界真奇妙,后来才知道

Offline

Board footer

Powered by FluxBB