bihor / fp_newsletter

TYPO3 plugin for newsletter subscription and unsubscription. Used table: tt_address. A log is written.
https://extensions.typo3.org/extension/fp_newsletter/
GNU General Public License v3.0
7 stars 18 forks source link

Unsubscribe per Formular not working #104

Closed soerenwachsmuth closed 3 weeks ago

soerenwachsmuth commented 1 month ago

Hi there,

I'm using fp_newsletter v7.0.5 on a TYPO3 12.4.20 with the standard templates brought within the extension. I (think) I set up everything correct within flexform and TypoScript. I added all pages in the flexform and added the settings.unsubscribeUid also in TS. (as I read that might be a problem) I'm using fe_users as table for the registration and the subscription is working.

When I try to submit the ubsubscribe form nothing happens. When I open up the action link in the form it shows the error from the error message uid 1. I debugged through the controller and found the error that was thrown: It's in the LogController line 921. So the $log is empty there is no email set it seems.

Am I missing something?

Thank you for any help! Best regards, Sören

bihor commented 1 month ago

Yes, this is a know problem: there are more plugins and it depends from where you submit to where. So I need to know what you have selected on page 1 and which plugin you have selected on page 2. On page 1 its sometimes necessary to set the plugin-key for page 2 with: pluginName="xxx" in the form. So I guess in this case the pluginName is wrong. I didn´t find an automatic solution till now...

soerenwachsmuth commented 1 month ago

Thank you for the answer.

So I set up the pages the same in the FlexForm in both plugins. grafik

So on the unsubscribe page 218 is the plugin unsibscribe and on the 481 is the unsubscribe verify.

I tried to set in the f:form in the unsubscribe.html template the unsibscribeVerifyUid and setting the pluginName to verifyUnsubscribe

But it didnt change a thing.
bihor commented 1 month ago

I am still not sure, from where you submit the form. From the a page with a subscription + unsubscription form? Or from the page 218. If you submit the form from page 218 it should work without any problems. Page 218 should use the Unsubscribe.html template and the form should looks like this image: unsubscribe

PS: its normal that the link without post-parameters does not work: https://typo3-12.test/testseiten/abmelden?tx_fpnewsletter_unsubscribe%5Baction%5D=delete&tx_fpnewsletter_unsubscribe%5Bcontroller%5D=Log&cHash=95ef6c28aeda4ffa4d81e2588ac14f4f

soerenwachsmuth commented 1 month ago

Yes, I'm submitting from the page 218 and the form itself is looking good I think: grafik

I'm using the standard templates from the extension in this example.

bihor commented 1 month ago

Well, I see you have enabled the Honeypot. You should disable it and try again. And I guess you have modified the partial FormFieldsOut.html, because there is data-lastpass-icon-root. You should try to use only Templates and Partials from fp_newsletter. If nothings helps, you should debug the LogController.php, because it should work. You can add echo 'E-Mail: ' . $log->getEmail(); in public function deleteAction.

soerenwachsmuth commented 3 weeks ago

Thank you very much for your time and your answers.

I had the unsubscribeVerifyMessageUid set to the same values as the verifyUnsubscribe which made it look like it was still on the same site doing nothing. Had so set them with TypoScript. Also I had some JS function that interfered. So nothing Extension related.

Maybe it would be a good idea to include the value unsubscribeVerifyMessageUid and the subscribeVerifyMessageUid to the flexform configuration?

Thanks again and greetings, Sören