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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 16:28:32
Script start
Timing: Jan 18 2025 16:28:32
Module start 'layout'
Timing: Jan 18 2025 16:28:32
Module start 'content'
Timing: Jan 18 2025 16:28:33
Module end 'content'
Timing: Jan 18 2025 16:28:33
Script end

Main resources:

Total runtime0.7232 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0044 589.1797152.6406
Module start 'layout' 0.00440.0024 741.820339.4766
Module start 'content' 0.00680.7150 781.2969585.9609
Module end 'content' 0.72180.0014 1,367.257820.1250
Script end 0.7232  1,387.3828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4193160.0002
Check MTime0.00120.1700160.0001
Mysql Total
Database connection0.00050.074410.0005
Mysqli_queries0.634087.6693600.0106
Looping result0.00050.0758580.0000
Template Total0.693095.820.3465
Template load0.00180.253720.0009
Template processing0.691195.563220.3456
Template load and register function0.00020.030010.0002
states
state_id_array0.00090.123610.0009
state_identifier_array0.00110.153820.0006
Override
Cache load0.00190.26351460.0000
Sytem overhead
Fetch class attribute can translate value0.00040.061820.0002
Fetch class attribute name0.00110.153350.0002
XML
Image XML parsing0.00060.084220.0003
class_abstraction
Instantiating content class attribute0.00000.001860.0000
General
dbfile0.00080.1114160.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
9content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 30
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs