[TYPO3-english] Formhandler (1.3) and AuthCodes
Alexander Dorn
debao84 at googlemail.com
Wed Jul 25 16:40:07 CEST 2012
Hello,
I have got a problem with the generation of authcodes when using Formhandler for a directmail subscription. The form is submitted via AJAX.
I used the example form from the formhandler website. This used to work until yesterday :/
When I submit the form I receive an JSON-object {"form" : "array"} instead of the submittedOkText. The mail is not send either. When I comment out Finisher_GenerateAuthCode I get the right response text but mail is still not send.
I have two similar forms without authcodes that work perfectly.
Google was no help at all :/
Greets and thanks
Alexander
plugin.Tx_Formhandler.settings.predef.formhandler-newsletter-directmail {
...
preProcessors {
1.class = PreProcessor_LoadGetPost
2.class = PreProcessor_ValidateAuthCode
2.config {
redirectPage = TEXT
redirectPage.value = {$formhandlerExamples.newsletter-registration.direct-mail.validateAuthCode.successPage}
errorRedirectPage = {$formhandlerExamples.newsletter-registration.direct-mail.validateAuthCode.errorPage}
hiddenField = hidden
}
}
validators {
1 {
class = Validator_Default
config {
fieldConf {
name {
errorCheck.1 = required
}
email {
errorCheck.1 = required
errorCheck.2 = email
errorCheck.3 = isNotInDBTable
errorCheck.3 {
table = tt_address
field = email
}
}
}
}
}
}
ajax {
class = AjaxHandler_JQuery
config {
ajaxSubmit = 1
loading = <img src="fileadmin/templates/img/ajax-loader.gif" />
ajaxSubmitLoader = <span class="loading_ajax-submit"><img src="fileadmin/templates/img/ajax-loader.gif" /></span>
}
}
# Finishers are called after the form was submitted successfully (without errors).
finishers {
1.class = Finisher_DB
1.config {
table = tt_address
key = uid
fields {
email.mapping = email
name.mapping = name
pid.postProcessing = TEXT
pid.postProcessing.value = {$formhandlerExamples.newsletter-registration.direct-mail.storagePid}
hidden.ifIsEmpty = 1
module_sys_dmail_html.ifIsEmpty = 1
}
}
# 2.class = Finisher_GenerateAuthCode
# 2.config {
# table = tt_address
# authCodePage = 73
# }
# Finisher_Mail sends emails to an admin and/or the user.
3.class = Finisher_Mail
3.config {
limitMailsToUser = 1
admin {
templateFile = TEXT
templateFile.value = {$formhandlerExamples.newsletter-registration.direct-mail.rootPath}/html/email-admin.html
sender_email = {$formhandlerExamples.newsletter-registration.direct-mail.email.admin.sender_email}
to_email = {$formhandlerExamples.newsletter-registration.direct-mail.email.admin.to_email}
subject = TEXT
subject.data = LLL:{$formhandlerExamples.newsletter-registration.direct-mail.rootPath}/lang/lang.xml:email_admin_subject
}
user {
templateFile = TEXT
templateFile.value = {$formhandlerExamples.newsletter-registration.direct-mail.rootPath}/html/email-user.html
sender_email = {$formhandlerExamples.newsletter-registration.direct-mail.email.user.sender_email}
to_email = email
subject = TEXT
subject.data = LLL:{$formhandlerExamples.newsletter-registration.direct-mail.rootPath}/lang/lang.xml:email_user_subject
}
}
4.class = Finisher_SubmittedOK
4.config {
returns = 1
}
}
}
More information about the TYPO3-english
mailing list