Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2006-02-04 02:28:51

mattrobin
Member
From: Hertfordshire, UK
Registered: 2005-10-08
Posts: 37
Website

Re: Ability to write comments is not working - please help!

Yep….I’ve got the ‘Automatically append comments to articles?’ selected to ‘yes’ in the Site Preferences area….and still no difference….


— — — — — — — — —
www.mattrobin.com

Offline

#14 2006-02-04 02:38:49

mattrobin
Member
From: Hertfordshire, UK
Registered: 2005-10-08
Posts: 37
Website

Re: Ability to write comments is not working - please help!

Ah…this looks promising:…
It’s my comments-type form, called (imaginatively!) <i>‘Comments’</i>….and I get this warning when I try to preview the form:

<code>Warning: extract(): First argument should be an array in /home/www/mattrobi/textpattern/publish/taghandlers.php on line 872</code><br />
<code>Warning: extract(): First argument should be an array in /home/www/mattrobi/textpattern/publish/taghandlers.php on line 872</code><br />
<code>Warning: extract(): First argument should be an array in /home/www/mattrobi/textpattern/publish/taghandlers.php on line 872</code><br /><br />

Any ideas how I fix this then?

it does refer to the line: <code>extract($thiscomment);</code> in the following section of the taghandlers.php:

<code> function comment_name($atts) { global $thiscomment, $prefs; extract($prefs); extract($thiscomment); $web = str_replace(“http://”, “”, $web);</code>

<code>if ($email && !$web && !$never_display_email) $name = ‘<a href=”’.eE(‘mailto:’.$email).’”’.(@$txpac[‘comment_nofollow’] ? ‘ rel=“nofollow”’ : ‘’).’>’.$name.’</a>’;</code><br />

<code>if ($web) $name = ‘<a href=“http://’.$web.’” title=”’.$web.’”’.(@$txpac[‘comment_nofollow’] ? ‘ rel=“nofollow”’ : ‘’).’>’.$name.’</a>’;</code><br />

<code>return $name; }
</code><br /><br />

And here is the content of my ‘Comments’ form:

<code>
<div class=“divcommentsmade<txp:ajw_if_comment_owner name=“Matt” email=“mattrobin05@gmail.com”>me</txp:ajw_if_comment_owner>”>
<div class=“contentbody id0”>
<h4 class=“c_userlink”><txp:comment_name /></h4>
<div class=“c_commentbody”><txp:message /><br /></div>
<div class=“c_commentinfo”><txp:comment_time /></div>
</div>
</div>
</code><br />

And yes <code><div class=“divcommentsmade<txp:ajw_if_comment_owner name=“Matt” email=“mattrobin05@gmail.com”>me</txp:ajw_if_comment_owner>”></code> does look like a complete load of nonsense…but that’s what I’ve got…how can it be made right?!

(note: the reason the comments form has that line is from the ‘leaf’ template design):

<i>“The next form you must modify is the “comments” form. On the first line, you will find some code calling on the If_Comment_Owner plugin. Change YourName and you@example.com to your actual name and email address.

<code><txp:ajw_if_comment_owner name=“YourName” email=“you@example.com”></code><br /><br />

That’s it!, you’re done.”</i>

….But my comments were working EVEN before – when the ‘leaf’ template was already up and running…..(puzzled!)

Last edited by mattrobin (2006-02-04 03:38:15)


— — — — — — — — —
www.mattrobin.com

Offline

#15 2006-02-04 08:49:50

mattrobin
Member
From: Hertfordshire, UK
Registered: 2005-10-08
Posts: 37
Website

Re: Ability to write comments is not working - please help!

Update: 05/02/2006

<br />
Right – I found what the problem was….(this only came to light though after a COMPLETE reinstall of Textpattern on my site!!!)
<br />

In Textpattern, there is an (article-type) form called ‘comments_display’ – and the code looks like this:

<code><txp:comments /></code>
<code><txp:if_comments_allowed></code>
<code><txp:comments_form /></code>
<code></txp:if_comments_allowed></code><br /><br />
The error was that the ‘Leaf’ Template version of this same form has a typo…one less letter ‘s’ on the ‘comments_form’ line, see comparison below:<br />
<code><h2 class=“commentsmade”>Comments made</h2></code>
<code><txp:comments /></code>
<code><txp:if_comments_allowed></code>
<code><txp:comment_form /></code>
<code></txp:if_comments_allowed></code><br /><br />

This does seem like a logical problem because the template designer correctly assumed the name of the textpattern form (‘comment_form’)….but the textpattern coding at that part is actually labelled with an extra ‘s’ for some reason!
This error might have caught other template designers out too…so ‘Leaf’ might not be the only design effected in this way.<br />

Of course – this bug needs to be fixed in the ‘Leaf’ template…..but perhaps naming consistancy for this form should be considered by the Textpattern development team too?<br />

I’m glad I found the problem in the end…but it was a real nuisance and nearly had me thinking about dumping Textpattern altogether!

Last edited by mattrobin (2006-02-05 11:37:29)


— — — — — — — — —
www.mattrobin.com

Offline

Board footer

Powered by FluxBB