Module Comments Cannot Post Comment
Posted: Thu Apr 01, 2010 9:19 pm
Here is my problem: I have combined the news and module comments. When trying to post a comment, I get an error message asking to enter the author name (what I have done of course) and the comment is not sent. Can somebody help me wit h this?
My detailed article template :
_______________________________________________________________________________________
{* set a canonical variable that can be used in the head section if process_whole_template is false in the config.php *}
{if isset($entry->canonical)}
{assign var='canonical' value=$entry->canonical}
{/if}
{$entry->title|cms_escape:htmlall}
{eval var=$entry->content}
{if $entry->extra}
{$extra_label} {$entry->extra}
{/if}
{$entry->printlink}
{if $return_url != ""}
Voir les autres articles
{/if}
{if isset($entry->fields)}
{foreach from=$entry->fields item='field'}
{if $field->type == 'file'}
{* this template assumes that every file uploaded is an image of some sort, because News doesn't distinguish *}
file_location}/{$field->value}"/>
{else}
{$field->name}: {eval var=$field->value}
{/if}
{/foreach}
{/if}
{cms_module module='comments' localedateformat='le %d/%m/%Y à %I:%M %p' lang='fr_FR' modulename='News' pageid=$entry->id}
________________________________________________________________________________________________
My template for comments display:
________________________________________________________________________________________________
{if FALSE == $errormessage}
{startExpandCollapse id="name" title="$addacomment"}
{else}
{$errormessage}
{/if}
{$addacomment}
{$startform}
{$image}
{if $spamprotect}
{$spamprotectimage}
{/if}
{if $spamprotect}
{$entercodetxt}:
{$inputentercode}
{/if}
{$yournametxt}(*):
{if $emailfield}
{$emailtxt}:
{$inputemail}
{/if}
{if $websitefield}
{$websitetxt}:
{$inputwebsite}
{/if}
{$commenttxt}(*):
{$inputcomment}
{$submit} {$cancel}
{$endform}
{if FALSE == $errormessage}
{stopExpandCollapse}
{/if}
{foreach from=$items item=entry}
{$entry->date} -
{if $entry->author_email}
author_email|escape:"hexentity"}">{$entry->comment_author}
{else}
{$entry->comment_author}
{/if}
{if $entry->author_website}(author_website}" target="_blank">{$entry->author_website}){/if}
{$entry->comment_data}
{/foreach}
____________________________________________________________________________________
My detailed article template :
_______________________________________________________________________________________
{* set a canonical variable that can be used in the head section if process_whole_template is false in the config.php *}
{if isset($entry->canonical)}
{assign var='canonical' value=$entry->canonical}
{/if}
{$entry->title|cms_escape:htmlall}
{eval var=$entry->content}
{if $entry->extra}
{$extra_label} {$entry->extra}
{/if}
{$entry->printlink}
{if $return_url != ""}
Voir les autres articles
{/if}
{if isset($entry->fields)}
{foreach from=$entry->fields item='field'}
{if $field->type == 'file'}
{* this template assumes that every file uploaded is an image of some sort, because News doesn't distinguish *}
file_location}/{$field->value}"/>
{else}
{$field->name}: {eval var=$field->value}
{/if}
{/foreach}
{/if}
{cms_module module='comments' localedateformat='le %d/%m/%Y à %I:%M %p' lang='fr_FR' modulename='News' pageid=$entry->id}
________________________________________________________________________________________________
My template for comments display:
________________________________________________________________________________________________
{if FALSE == $errormessage}
{startExpandCollapse id="name" title="$addacomment"}
{else}
{$errormessage}
{/if}
{$addacomment}
{$startform}
{$image}
{if $spamprotect}
{$spamprotectimage}
{/if}
{if $spamprotect}
{$entercodetxt}:
{$inputentercode}
{/if}
{$yournametxt}(*):
{if $emailfield}
{$emailtxt}:
{$inputemail}
{/if}
{if $websitefield}
{$websitetxt}:
{$inputwebsite}
{/if}
{$commenttxt}(*):
{$inputcomment}
{$submit} {$cancel}
{$endform}
{if FALSE == $errormessage}
{stopExpandCollapse}
{/if}
{foreach from=$items item=entry}
{$entry->date} -
{if $entry->author_email}
author_email|escape:"hexentity"}">{$entry->comment_author}
{else}
{$entry->comment_author}
{/if}
{if $entry->author_website}(author_website}" target="_blank">{$entry->author_website}){/if}
{$entry->comment_data}
{/foreach}
____________________________________________________________________________________