Forums / Setup & design / Trying for 4 days: Contact Us Form Not Working

Trying for 4 days: Contact Us Form Not Working

Author Message

Matthew Knell

Monday 07 July 2003 6:50:41 am

I followed the example in the SDK to get my form working. I modified the "redirect_node_to" 2 - so after a form submit, the form should resubmit to the #2 node page (my homepage) - and nothing seems to be taking - is there a bug in the code for collecting info, or the email template?

Any tips on how to get this working would be greatly appreciated, it's the last part of the site I'm building.

Thanks again.

Bruce Morrison

Monday 07 July 2003 3:29:50 pm

Not really a lot of info to work with I'm afraid.

Can you turn debuging on? The debuging output is often quite helpful when things are not working as they should.

What version are you using? What IS happeneing when the form is submitted?

Cheers
Bruce
designIT

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Matthew Knell

Tuesday 08 July 2003 8:12:36 am

First off, thanks for replying - it really is appreciated.

Version is 3.1.1 - the latest release.

I turned on the debugging for the form page and it looks like this:

Timing: Jul 08 2003 10:06:16

Script start

Debug: access.php Jul 08 2003 10:06:16

Adding 'user' to access path

Debug: access.php Jul 08 2003 10:06:16

Updated settings to use siteaccess 'user'

Timing: Jul 08 2003 10:06:16

Module start 'content'

Warning: eZModuleOperationInfo::execute Jul 08 2003 10:06:16

Missing main operation memento for key: b0cfade3706dd6b2811aa4dcf63bde76

Timing: Jul 08 2003 10:06:16

Module end 'content'

Error: eZTSTranslator::load Jul 08 2003 10:06:16

Could not load translation file: share/translations/eng-US/translation.ts

Warning: ezi18n Jul 08 2003 10:06:16

No translation for file(translation.ts) in context(design/standard/layout): '%1 front page' with comment()

Warning: ezi18n Jul 08 2003 10:06:16

No translation for file(translation.ts) in context(design/standard/layout): 'Search %1' with comment()

Warning: ezi18n Jul 08 2003 10:06:16

No translation for file(translation.ts) in context(design/standard/layout): 'Printable version' with comment()

Warning: PHP Jul 08 2003 10:06:16

Undefined index: name in (SITENAMEREMOVEDforSECURITY)/kernel/classes/ezcontentobjecttreenode.php on line 1554

Warning: PHP Jul 08 2003 10:06:16

Warning: ezi18n Jul 08 2003 10:06:16

No translation for file(translation.ts) in context(design/standard/layout): 'Go' with comment()

Warning: ezi18n Jul 08 2003 10:06:16

No translation for file(translation.ts) in context(design/standard/layout): 'Advanced search' with comment()

Timing: Jul 08 2003 10:06:16

End

So, what's happening is, I'm submitting the form, the email that's supposed to be sent to email receiver isn't getting sent, and I'm ending up at /index.php/user/content/action - the location in the form action, with nothing on my screen.

So, I fear there's something I can't see wrong with this - and I really appreciate any help you can offer.

Here is the debug for the resultant page -

Timing: Jul 08 2003 10:10:38

Script start

Debug: access.php Jul 08 2003 10:10:38

Adding 'user' to access path

Debug: access.php Jul 08 2003 10:10:38

Updated settings to use siteaccess 'user'

Timing: Jul 08 2003 10:10:38

Module start 'content'

Timing: Jul 08 2003 10:10:38

Module end 'content'

Error: eZTSTranslator::load Jul 08 2003 10:10:38

Could not load translation file: share/translations/eng-US/translation.ts

Warning: ezi18n Jul 08 2003 10:10:38

No translation for file(translation.ts) in context(design/standard/layout): '%1 front page' with comment()

Warning: ezi18n Jul 08 2003 10:10:38

No translation for file(translation.ts) in context(design/standard/layout): 'Search %1' with comment()

Warning: ezi18n Jul 08 2003 10:10:38

No translation for file(translation.ts) in context(design/standard/layout): 'Printable version' with comment()

Error: eZTemplate Jul 08 2003 10:10:38

Unknown template variable 'node' in namespace ''

Warning: PHP Jul 08 2003 10:10:38

Undefined index: name in (SITENAMEREMOVED)/kernel/classes/ezcontentobjecttreenode.php on line 1554

Warning: PHP Jul 08 2003 10:10:38

Undefined index: real_translation in (SITENAMEREMOVED)/kernel/classes/ezcontentobjecttreenode.php on line 1569

Error: eZTemplate @ design/standard/templates/page_mainarea.tpl:3[0] Jul 08 2003 10:10:38

No such attribute for array(4): content
Choose one of following: content, navigation_part, path, uri

Error: eZTemplate Jul 08 2003 10:10:38

Unknown template variable 'node' in namespace ''

Warning: ezi18n Jul 08 2003 10:10:38

No translation for file(translation.ts) in context(design/standard/layout): 'Go' with comment()

Warning: ezi18n Jul 08 2003 10:10:38

No translation for file(translation.ts) in context(design/standard/layout): 'Advanced search' with comment()

Error: eZTemplate Jul 08 2003 10:10:38

Unknown template variable 'node' in namespace ''

Error: eZTemplate Jul 08 2003 10:10:38

Unknown template variable 'node' in namespace ''

Error: eZTemplate Jul 08 2003 10:10:38

Unknown template variable 'node' in namespace ''

Timing: Jul 08 2003 10:10:38

End

Bruce Morrison

Tuesday 08 July 2003 4:42:10 pm

Nothing stands out in the debug output. Can you post the template you are using? Are you sure that the template you have modified is the one being used?

Here fragments of the information collector template (design/cfd/templates/node/view/full_class_13.tpl) we use on this site http://www.cfd.rmit.edu.au/

{default content_object=$node.object
content_version=$node.contentobject_version_object
node_name=$node.name}
<form method="post" action={"content/action"|ezurl}>
{attribute_view_gui attribute=$node.data_map.form_description}
<table border="0" cellpadding="0" cellspacing="0" align="left">
<tr>
<td valign="middle" width="100">First name:</td>
<td valign="middle"><input class="register" type="text" size="15" name="ContentObjectAttribute_ezstring_data_text_{$node.data_map.first_name.id}" value="" /></td>
</tr>
...
...
...
<tr>
<td colspan="2" valign="middle"> </td>
</tr>
<tr>
<td valign="middle">Email:</td>
<td valign="middle"><input class="register" type="text" size="15" name="ContentObjectAttribute_ezstring_data_text_{$node.data_map.email.id}" value="" /></td>
</tr>
<tr>

<td colspan="2" valign="middle"> </td>
</tr>
<tr>
<td valign="middle"> </td>
{section name=ContentAction loop=$content_object.content_action_list show=$content_object.content_action_list}
<td valign="middle" align="left"><input type="image" src={"btn_submit.gif"|ezimage} alt="Submit" width="49" height="22" border="0" name="{$ContentAction:item.action}" value="{$ContentAction:item.name}" /></td>
{/section}
</tr>
</table>

<input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
<input type="hidden" name="ContentObjectID" value="{$content_object.id}" />
<input type="hidden" name="ViewMode" value="full" />

</form>

{/default}

Also here is the template that generates the email:

design/cfd/templates/content/collectedinfomail.tpl

{set-block scope=root variable=subject}{"Collected information from %1"|i18n("design/standard/content/edit",,array($collection.object.name))}{/set-block}
{set-block scope=root variable=email_receiver}{$object.data_map.email_receiver.content}{/set-block}
{set-block scope=root variable=redirect_to_node_id}2{/set-block}

{$collection.object.name}
{"The following information was collected:"|i18n("design/standard/content/edit")}

{section name=Attribute loop=$collection.attributes}
{$Attribute:item.contentclass_attribute_name}:
{$Attribute:item.data_text}

{/section}

You should also check the mail server logs to see what is anything is happening to the mail.

Hope this helps.

Cheers
Bruce
designIT

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish