Problem with CGFeedback

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
kerryshamblin
Forum Members
Forum Members
Posts: 87
Joined: Wed Apr 14, 2010 5:21 pm

Problem with CGFeedback

Post by kerryshamblin »

Hello,

I'm using:

CMS Made Simple 1.9.3
CGExtensions 1.23
CGSimpleSmarty 1.47
CGBlog 1.7.1
CGFeedback 1.3.2

In my CGBlog Detail Template, I've called the CG Feedback module like so:

Code: Select all

{CGFeedback action='summary'}
<h2>Feedback Welcome</h2>
{CGFeedback}
The CGFeedback comment form template looks like:

Code: Select all

{* comment form template *}
{if isset($message)}
  <div class="pagemessage">{$message}</div>
{else}
{* no message... display the form *}
<div class="cgfeedback_addcoment">
{if isset($error)}
  <div class="error">{$error}</div>
{/if}
{$formstart}

  <div>
    <div class="prompt">
      {$mod->Lang('prompt_title')}:
    </div>
    <div>
      <input type="text" name="{$actionid}title" size="40" maxlength="255" value="{$title}"/>
    </div>
  </div>
  <div class="clearfix"></div>

  <div>
    <div class="prompt">
      {$mod->Lang('prompt_your_name')}:
    </div>
    <div>
      <input type="text" name="{$actionid}author_name" size="40" maxlength="255" value="{$author_name}"/>
    </div>
  </div>
  <div class="clearfix"></div>

  <div>
    <div class="prompt">
      {$mod->Lang('prompt_your_email')}:
    </div>
    <div>
      <input type="text" name="{$actionid}author_email" size="40" maxlength="255" value="{$author_email}"/>
    </div>
  </div>
  <div class="clearfix"></div>




  <div>
    <div class="prompt">
      Comments:
    </div>
    <div>
      {$input_comment}
    </div>
  </div>
  <div class="clearfix"></div>

  <div>

      <input type="checkbox" name="{$actionid}author_notify" value="1" {if $author_notify == 1}checked="checked"{/if}/>

      <span>{$mod->Lang('prompt_notify')}</span>
  </div>
  <div class="clearfix"></div>

  {* custom fields *}
  {if isset($fields)}
  {foreach from=$fields key='fieldid' item='field'}
  <div>
    <div>
      {$field.name}:
    </div>
    <div>
    {if isset($field.input)}
      {$field.input}
    {elseif $field.type == 0 or $field.type == 1 }
      <input type="text" name="{$actionid}field_{$fieldid}" value="{$field.value}" size="{$field.attrib.length}" maxlength="{$field.atrrib.maxlength}"/>
    {elseif $field.type == 2}
      {* text area fields should have an input... so this should never get caled... but just in case *}
      <textarea name="{$actionid}field_{$fieldid}">{$field.value}</textarea>
    {elseif $field.type == 3}
      <select name="{$actionid}field_{$fieldid}">
        {html_options options=$field.attrib.options selected="{$field.value}"}
      </select>
    {elseif $field.type == 4}
      <select multiple="multiple" size="4" name="{$actionid}field_{$fieldid}[]">
        {html_options options=$field.attrib.options selected="{$field.value}"}
      </select>
    {/if}
    </div>
  </div>
  {/foreach}
  {/if}

  {if isset($captcha_img)}
 <div class="captcha">    {* handle captcha image *}
      {$captcha_img}<br />
please type the characters you see<br />
      <input type="text" name="{$actionid}feedback_captcha" value="" size="20" />
</div>
  {/if}

<div>
      <input type="submit" name="{$actionid}submit" value="{$mod->Lang('submit')}" />
</div>

{$formend}
</div>
{/if}
Captcha is enabled in the CGFeedback admin options.

When a comment is submitted, there is NO "Message displayed after successful comment submission." Rather, what I get is:


URL:
Key 1: __page__
Key 2: 64
Author: kerry ---
IP Address: ---
Title: test
Rating:
Comment:
Catchable fatal error: Object of class cgfb_comment could not be converted to string in server-location/cms/tmp/templates_c/CGFeedback^%%F1^F14^F141CB5F%%module_db_tpl%3ACGFeedback%3Bnotification_template.php on line 63

This is begun with an <__html> tag and truncates after the comment field.

Any ideas?

Thanks!
Paul J
Forum Members
Forum Members
Posts: 52
Joined: Tue Feb 02, 2010 6:51 pm

Re: Problem with CGFeedback

Post by Paul J »

No concrete ideas, I'm afraid, but I've just run into the same problem. I'd initially thought it was a problem with the module upgrade process, but seeing that we both got exactly the same error, now I'm not so sure.

I had the previous version of the module working under 1.93 with CGBlog 1.72, CGSimpleSmarty 1.48, CGExtensions 1.23. I recently upgraded the CMS to 1.94.1 and the module to 1.32. I had to install via an XML file as module manager couldn't do it. This resulted in an error message when trying to submit a comment, which was due to the 'notified' field not getting written into the database. I added that manually, and now get the same error as you did. Strangely though, in admin notifications, if I set:


Send notifications of new comments to members of this group.
(set to none to disable notifications):

to 'none'

then the comment submits OK (although of course I don't receive a notification email, which isn't any good for my needs).

I'm in a hurry so I'm going to take copies of all my templates and settings etc and uninstall and reinstall the module. If THAT doesn't work, I'll install the previous version again.

I hope you get your problem sorted out!
uniqu3

Re: Problem with CGFeedback

Post by uniqu3 »

A bug was already reported http://dev.cmsmadesimple.org/bug/view/6245
Adding "notified" to cms_module_cgfeedback_comments" worked for me.
Edit: ok it only works in combination with notification set to "none" as mentioned above.
Paul J
Forum Members
Forum Members
Posts: 52
Joined: Tue Feb 02, 2010 6:51 pm

Re: Problem with CGFeedback

Post by Paul J »

uniqu3 wrote:A bug was already reported http://dev.cmsmadesimple.org/bug/view/6245
Adding "notified" to cms_module_cgfeedback_comments" worked for me.
Edit: ok it only works in combination with notification set to "none" as mentioned above.
Thanks for confirmation of that.

I'm pleased that I managed to work that all out for myself: shows I'm learning more about the technical side of things instead of asking questions here all the time :)

Danke schön :)
Post Reply

Return to “Modules/Add-Ons”