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

eZ debug

Timing: Jan 18 2025 11:09:49
Script start
Timing: Jan 18 2025 11:09:49
Module start 'content'
Timing: Jan 18 2025 11:09:50
Module end 'content'
Timing: Jan 18 2025 11:09:50
Script end

Main resources:

Total runtime0.7488 sec
Peak memory usage4,096.0000 KB
Database Queries197

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0097 588.9609180.8125
Module start 'content' 0.00970.5972 769.7734591.0547
Module end 'content' 0.60690.1419 1,360.8281344.7422
Script end 0.7488  1,705.5703 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.5626210.0002
Check MTime0.00170.2255210.0001
Mysql Total
Database connection0.00090.119610.0009
Mysqli_queries0.647086.40211970.0033
Looping result0.00190.25651950.0000
Template Total0.721096.320.3605
Template load0.00210.279820.0010
Template processing0.718996.000820.3594
Template load and register function0.00020.032910.0002
states
state_id_array0.00120.162010.0012
state_identifier_array0.00150.200020.0007
Override
Cache load0.00210.27501460.0000
Sytem overhead
Fetch class attribute can translate value0.00250.336930.0008
Fetch class attribute name0.00150.197050.0003
XML
Image XML parsing0.00100.138530.0003
class_abstraction
Instantiating content class attribute0.00000.002560.0000
General
dbfile0.00460.6156270.0002
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 30
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs