Ergebnis 1 bis 1 von 1

Thema: Formhandler Subscripiton / enableRecord Problem

      
  1. #1
    Forum Zuschauer
    Registriert seit
    30.07.2010
    Ort
    Düsseldorf
    Beiträge
    1

    Frage Formhandler Subscripiton / enableRecord Problem

    Hallo liebe Typo3ler,

    ich habe mich in den letzten Tagen mit den Extension "formhandler" und "formhandler_subscription" beschäftigt.

    Ich möchte damit eine Newsletteranmeldung realisieren.

    Es funktioniert auch alles wunderbar bis auf eine Sache:

    Nach klicken auf den AuthCode-Link den der Nutzer nach der Newsletter-Anmeldung in einer E-Mailadresse geschickt bekommt, führt zwar zur richtigen Seite und es wird auch angezeigt, dass das Abo aktiviert wurde, aber in der Tabelle tt_address wird – bei dem entsprechenden Eintrag – "hidden=1" nicht auf hidden="0" geändert.

    Der generierte Authcode-Link aus der E-Mail sieht so aus:

    Code:
    http://testpage.de/?id=256&tx_formhandler_subscription[table]=tt_address&tx_formhandler_subscription[uid]=2154&tx_formhandler_subscription[uidField]=uid&tx_formhandler_subscription[authCode]=8cbba8ab3abee52c09cf8f1496be2578
    So wie ich es verstanden habe müsste "enableRecord" für die Änderung der Sichtbarkeit des Abonnenten-Eintrags zuständig sein.

    Ich versuche schon einige Zeit das Problem selbst zu lösen, leider ohne Erfolg. Ich hoffe ihr könnt mir weiterhelfen.



    Hier ist der Typoscript-Code meiner setup.ts:

    plugin.Tx_Formhandler.settings.predef {


    formhandler_subscription_request_subscription {

    formValuesPrefix = tx_formhandler_subscription

    langFile.1 = {$plugin.formhandler_subscription.globalLanguageFile}

    addErrorAnchors = 0
    debug = 1

    additionalIncludePaths {
    1 = EXT:formhandler_subscription/Classes/Finisher
    2 = EXT:formhandler_subscription/Classes/PreProcessor
    }

    singleErrorTemplate {
    totalWrap = <strong class="message">|</strong>
    singleWrap = |<br />
    }

    isErrorMarker {
    default = error
    global (
    <div class="error">
    <strong>###LLL:global_error_header###</strong><br />
    ###LLL:global_error_message###
    </div><br />
    )
    }

    }


    formhandler_subscription_confirm_subscription < .formhandler_subscription_request_subscription
    formhandler_subscription_request_update < .formhandler_subscription_request_subscription
    formhandler_subscription_update_subscription < .formhandler_subscription_request_subscription
    formhandler_subscription_remove_subscription < .formhandler_subscription_request_subscription


    formhandler_subscription_request_subscription {

    name = Subscription request form

    templateFile = {$plugin.formhandler_subscription.templatePath}/RequestSubscription.html

    validators {
    1.class = Tx_Formhandler_Validator_Default
    1.config.fieldConf {
    gender.errorCheck.1 = required
    first_name.errorCheck.1 = required
    last_name.errorCheck.1 = required
    email.errorCheck.1 = required
    email.errorCheck.2 = email
    email.errorCheck.3 = isNotInDBTable
    email.errorCheck.3 {
    table = tt_address
    field = email
    showHidden = 1
    }
    }
    }

    finishers {

    1.class = Tx_FormhandlerSubscription_Finisher_Subscribe
    1.config {

    subscribersTable = {$plugin.formhandler_subscription.subscribersTable}

    checkConfirmedSelect.pidInList = {$plugin.formhandler_subscription.subscriberRecordsPID}
    checkConfirmedSelect.markers.email.data = GP:tx_formhandler_subscription|email
    checkConfirmedSelect.where = email=###email###

    checkExistenceSelect < .checkConfirmedSelect
    checkExistenceSelect.showHidden = 1

    finishersNewSubscriber {

    10.class = Tx_Formhandler_Finisher_DB
    10.config {
    table = {$plugin.formhandler_subscription.subscribersTable}
    fields {
    gender.mapping = gender
    first_name.mapping = first_name
    last_name.mapping = last_name
    email.mapping = email
    hidden = 1
    pid = {$plugin.formhandler_subscription.newSubscriberRecordsPID}
    }
    }

    20.class = Tx_FormhandlerSubscription_Finisher_GenerateAuthCodeDB
    20.config {
    table = {$plugin.formhandler_subscription.subscribersTable}
    selectFields = uid,email
    authCodePage = {$plugin.formhandler_subscription.confirmSubscriptionPID}
    action = enableRecord

    }

    30.class = Tx_Formhandler_Finisher_Mail
    30.config.mailer.class = Tx_FormhandlerSubscription_Mailer_TYPO3Mailer
    30.config.view = Tx_FormhandlerSubscription_View_AuthCodeMail
    30.config.user {
    subject = TEXT
    subject.data = LLL:{$plugin.formhandler_subscription.globalLanguageFile}:request_subscription_email_u ser_subject
    sender_email = {$plugin.formhandler_subscription.emailSenderAddress}
    sender_name = {$plugin.formhandler_subscription.emailSenderName}
    to_name = TEXT
    to_name.value = {GP:tx_formhandler_subscription|first_name} {GP:tx_formhandler_subscription|last_name}
    to_name.insertData = 1
    to_email = TEXT
    to_email.value = {GP:tx_formhandler_subscription|email}
    to_email.insertData = 1
    }
    }

    // unconfirmed subscribers get the same mail as new subscribers
    // but no new record is added to the database
    finishersExistingUnconfirmedSubscriber < .finishersNewSubscriber
    finishersExistingUnconfirmedSubscriber.10 >

    // confirmed subscribers also get an email with an authcode
    // but with a different link and a different text
    finishersExistingConfirmedSubscriber < .finishersExistingUnconfirmedSubscriber
    finishersExistingConfirmedSubscriber.20.config {
    authCodePage = {$plugin.formhandler_subscription.updateSubscriptionFormPID}
    action = accessForm
    }
    }

    10.class = Tx_Formhandler_Finisher_Redirect
    10.config.redirectPage = {$plugin.formhandler_subscription.requestSubscriptionSuccessPID}
    }
    }


    formhandler_subscription_confirm_subscription {

    name = Subscription confirmation

    templateFile = {$plugin.formhandler_subscription.templatePath}/RequestSubscription.html
    templateSuffix = _SUBSCRIPTION_CONFIRMED

    preProcessors.10.class = Tx_FormhandlerSucription_PreProcessor_ValidateAuthCodeDB
    preProcessors.10.config {
    errorRedirectPage = {$plugin.formhandler_subscription.authCodeInvalidPID}
    }
    }


    formhandler_subscription_request_update {

    name = Subscription update request

    templateFile = {$plugin.formhandler_subscription.templatePath}/RequestUpdate.html


    validators {
    1.class = Tx_Formhandler_Validator_Default
    1.config.fieldConf {
    gender.errorCheck.1 >
    first_name.errorCheck.1 >
    last_name.errorCheck.1 >
    email.errorCheck.1 = required
    email.errorCheck.2 = email
    }
    }

    finishers {

    1 < plugin.Tx_Formhandler.settings.predef.formhandler_subscription_request_subscription.fi nishers.1

    1.config {

    // new subscribers only get an email with a notice that they
    // aren't subscribed, no database record is created, no auth
    // code is generated
    finishersNewSubscriber {
    10 >
    20 >
    }

    finishersExistingConfirmedSubscriber {
    30.config.user.subject.data = LLL:{$plugin.formhandler_subscription.globalLanguageFile}:request_update_email_user_su bject
    }
    }

    10.class = Tx_Formhandler_Finisher_Redirect
    10.config.redirectPage = {$plugin.formhandler_subscription.requestUpdateSuccessPID}
    }
    }


    formhandler_subscription_update_subscription {

    name = Subscription update form

    templateFile = {$plugin.formhandler_subscription.templatePath}/UpdateSubscription.html

    preProcessors.10 < plugin.Tx_Formhandler.settings.predef.formhandler_subscription_confirm_subscription.pr eProcessors.10
    preProcessors.10.config.mergeRecordDataToGP = 1

    // Use the same validators as for the subscription request but
    // remove the validation for the email since it can not be updated
    validators < plugin.Tx_Formhandler.settings.predef.formhandler_subscription_request_subscription.va lidators
    validators.1.config.fieldConf.email >

    finishers {

    // Make sure the submitted UID matches the one for which the
    // used auth code was created
    10.class = Tx_FormhandlerSubscription_Finisher_ValidateAuthCodeUID

    20.class = Tx_Formhandler_Finisher_DB
    20.config {
    table = {$plugin.formhandler_subscription.subscribersTable}
    updateInsteadOfInsert = 1
    key = uid
    fields {
    gender.mapping = gender
    first_name.mapping = first_name
    last_name.mapping = last_name
    }
    }

    30.class = Tx_FormhandlerSubscription_Finisher_InvalidateAuthCodeDB

    40.class = Tx_Formhandler_Finisher_Redirect
    40.config.redirectPage = {$plugin.formhandler_subscription.updateSubscriptionSuccessPID}
    }
    }

    formhandler_subscription_remove_subscription {

    name = Subscription removal

    templateFile = {$plugin.formhandler_subscription.templatePath}/RemoveSubscription.html

    checkBoxFields = confirm_removal

    preProcessors.1.class = Tx_Formhandler_PreProcessor_LoadDefaultValues
    preProcessors.1.config.1.confirm_removal.defaultValue = 1

    preProcessors.10 < plugin.Tx_Formhandler.settings.predef.formhandler_subscription_confirm_subscription.pr eProcessors.10

    validators {
    1.class = Tx_Formhandler_Validator_Default
    1.config.fieldConf {
    confirm_removal.errorCheck.1 = required
    }
    }

    finishers {

    10.class = Tx_FormhandlerSubscription_Finisher_RemoveAuthCodeRecord

    20.class = Tx_Formhandler_Finisher_Redirect
    20.config.redirectPage = {$plugin.formhandler_subscription.removeSubscriptionSuccessPID}
    }
    }
    }
    Geändert von mrmoree (14.02.2012 um 18:26 Uhr)

 

 

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Facebook Kommentare

Ähnliche Themen

  1. Struktur Problem oder einfache Lösung?
    Von rudirüssel im Forum GMENU, HMENU, TMENU und Co.
    Antworten: 2
    Letzter Beitrag: 30.09.2011, 20:27
  2. Antworten: 1
    Letzter Beitrag: 17.03.2010, 16:42
  3. Antworten: 0
    Letzter Beitrag: 03.12.2009, 10:01
  4. Problem mit Sende E-Mail
    Von cse im Forum powermail
    Antworten: 7
    Letzter Beitrag: 06.10.2009, 09:18
  5. Navigation und Template Problem
    Von mathiaspf im Forum TYPO3 4.x Fragen und Probleme
    Antworten: 2
    Letzter Beitrag: 14.07.2009, 15:12

Stichworte

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74