wapplersystems / cleverreach Goto Github PK
View Code? Open in Web Editor NEWTYPO3 Extension for using newsletter service CleverReach
License: GNU General Public License v2.0
TYPO3 Extension for using newsletter service CleverReach
License: GNU General Public License v2.0
14 days ago the
cleverreach/ext_tables.php
was changed.
$pageTsConfig = '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:cleverreach/Configuration/TypoScript/TSconfig/Page/powermail.tsconfig">';
Now the path dont match anymore
cleverreach/Configuration/TypoScript/TsConfig/Page/powermail.tsconfig
I did fix an identifier which makes this extension for my use case unusable (#9) but the change is still not released which means i have use a dev version which i kind of dislike.
Hi,
I installed cleverreach extension in our typo3 and added cleverreach API settings. We used CleverReach Optin form(ext:forms) and included in typo3 page. For getting client id, group id, form id, i created cleverreach account and created demo list, form and app. After this I submitted form with valid email id. But nothing will happen and i didnt get any mail or no subscribers added in cleverreach demo list. How can do this..
Your extension depends on PHP 7.0 - 7.2
Typo3 9 works with PHP 7.3, could you please check against PHP 7.3?
In many forms you will want to have a checkbox like "I want to subscribe to the newsletter too". And only if the checkbox was checked by the user the subscription should be triggered (legacy version: subscription will always be triggered if there is a cleverreach-email-field defined).
I added a patch for this, would be great if you could include this in the next release.
The patch adds a feature for BE-Users
to define checkboxes as "the cleverreach trigger field" in the form editor of the form framework.
I installed the extension and successfully added a new recipient to my CleverReach list. But how can I sent attributes (lastname, firstname, gender, i.e.) to CleverReach? In the code I found the cleverreachField
Property:
But how do I set this property inside the Powermail form editor? I found nothing in that regard in the editor docs.
The extension isn't anymore compatible with TYPO3 8.7 as the dependency injection has been changed in Commit: 94ea0dc
This change is not yet included in the 0.1.5 release/tag, so it's still working with 8.7
Your next release 0.1.6 breaks compatibility to 8.7 because the dependencies aren't injected anymore:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: Call to a member function getRestUrl() on null | Error thrown in file /.../typo3conf/ext/cleverreach/Classes/CleverReach/Api.php in line 57.
The new dependency injection works from TYPO3 9.0 upwards:
https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.0/Feature-82869-ReplaceInjectWithTYPO3CMSExtbaseAnnotationInject.html
Is there a plan on making this repository compatible to the newest TYPO3 Version 10.4?
When the form is to be sent, the following message appears:
Fatal error: Declaration of WapplerSystems\Cleverreach\Powermail\Finisher\CleverReach::initializeFinisher() must be compatible with In2code\Powermail\Finisher\AbstractFinisher::initializeFinisher(): void in /path-to/typo3conf/ext/cleverreach/Classes/Powermail/Finisher/CleverReach.php on line 124
The latest Github version is used in conjunction with the latest TYPO3 version 10.
Are there any plans to adapt the extension for the 12 LTS?
Will the extension still be maintained?
Hi,
I am using:
TYPO3 v12
PHP 8.1 with warnings active
Branch feature/v12
If I reload a form that has a cleverreach finisher configured and has been already submitted, I get a PHP warning: Undefined array key "HTTP_REFERER" in file /cleverreach/Classes/CleverReach/Api.php for line 292 in the function sendSubscribeMail.
If that line is adjusted as follows, the warning disappears:
$doidata = [
'user_ip' => $_SERVER['REMOTE_ADDR'],
'user_agent' => $_SERVER['HTTP_USER_AGENT'],
'referer' => key_exists('HTTP_REFERER',$_SERVER) ? $_SERVER['HTTP_REFERER'] : '',
];
Could you adjust the code?
Thanks!
Ulrike
Typo3: 11.5.24
Webserver Apache
PHP Version: 8.1.16
DB: MySQL 10.5.15
I'm getting an error every time i submit the form.
PHP Warning: Undefined array key "cleverreach" in /home/www/[...]/typo3conf/ext/cleverreach/Classes/Powermail/Finisher/CleverReach.php line 68
The extension uses a custom REST client to perform Cleverreach requests. This implementation does however not respect any anything set in $GLOBALS['TYPO3_CONF_VARS']['HTTP']
and does therefore not work, if TYPO3 uses a proxy for outgoing HTTP requests.
I recommend to use the TYPO3 API (RequestFactory
- see https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ExtensionArchitecture/HowTo/RestRequests/Index.html) for HTTP requests which always ensures, that configured HTTP settings are applied.
Hi Sven,
thanks for your extension. This one is currently not 7 LTS compatible, as stated in the ext_emconf file, because the TypoScriptService Class got moved in 8 LTS and is not found in 7.
Hello Sven
Til now I used a fork of your formhandler_cleverreach-extension, but know I like to switch to EXT:cleverreach for upgrading to TYPO3 9.5.9.
As far as I know an API-key has to be set. But I wasn't able to find any point to enter this in extension constants.
Is it necessary to set cleverreach-admin-username and cleverreach-admin-password - I think this is unsecure ^10.
best regards
EnzephaloN
Cleverreach changed authentication. Username/password isn't possible anymore. Now oAuth 2.0 is the only way.
https://rest.cleverreach.com/howto/#authorization_code
It would be very nice, if you will update the extension.
Hello,
I am currently getting the following error message:
Undefined array key "cleverreach" in cleverreach/Classes/Powermail/Finisher/CleverReach.php line 70
System: TYPO3 v12
PHP: 8.1
cleverrReach: 12.0.0
When checking the Finisher, I noticed that the flexForm values cleverreachFormId and cleverreachGroupId are read, but the SingelSelect of cleverreach is not. Unfortunately, the individual options are not displayed here yet.
I then checked the cleverreach/Configuration/TsConfig/Page/powermail.tsconfig and saw that the SingleSelect items have not yet been adapted to the new requirements of the TCA.
tx_powermail.flexForm.addField.settings\.flexform\.main\.cleverreach.config.items.0 {
0 = ---
1 =
}
tx_powermail.flexForm.addField.settings\.flexform\.main\.cleverreach.config.items.1 {
0 = Anmelden
1 = optin
}
tx_powermail.flexForm.addField.settings\.flexform\.main\.cleverreach.config.items.2 {
0 = Abmelden
1 = optout
}
[Line 16-29]
For everything to work, the would need to be adjusted as follows:
tx_powermail.flexForm.addField.settings\.flexform\.main\.cleverreach.config.items.0 {
label = ---
value =
}
tx_powermail.flexForm.addField.settings\.flexform\.main\.cleverreach.config.items.1 {
label = Anmelden
value = optin
}
tx_powermail.flexForm.addField.settings\.flexform\.main\.cleverreach.config.items.2 {
label = Abmelden
value = optout
}
[Line 16-29]
Once this is changed, the extension works fine under TYPO3 v 12, so I would ask you to include this customization.
With kind regards
Is there a way to set firstname and lastname by this extension?
Inside the Api.php there is a function setAttributeOfReceiver which is never used.
In the addReceiversToGroup one could do something like this:
foreach ($aReceivers as $receiver) {
$attributes = $receiver['attributes'];
if (isset($attributes['email'])){
foreach($attributes as $key => $value){
$this->setAttributeOfReceiver($attributes['email'], $key, $value);
}
}
}
Maybe...?
The Powermail Validators doesn't respect the Form Group ID, only the ID which is set in the TS.
If you have multiple forms with different Group IDs the Validator doesn't work.
Example:
Opt-Out Form - Group ID: 123456
TS Group ID: 654321
The Opt-Out Validator is using Group ID 654321 and will throw the error that the user is not present in the group, even when he is.
Tried to fix this by myself - but i'm not deep enough into Powermail Validators ;)
For multi page forms in the form framework (at least with "summary page") the extension throws an error. I added the patch for this issue.
multipage_forms.patch.zip
Hello Team,
can you tell me that is it possible to Create and Send Email via Cleverreach From TYPO3 using API ?
Please response
Thanks and Regards
Nageshwar Jha
Hi,
Eine finish Page die den APi Response ausgeben kann wäre nice.
Also z.B. Kunde der sich anmeldet ist schon angemeldet!
You have addet an bc on change the inject annotation #18
TYPO3 8.7 is only compatible with 0.1.5 (without compatibility extension) :-(
OptIn and OutOut validators for EXT:form need a class property $supportedOptions to define the validators options, otherwise they are not working in TYPO3 9. This is what I added to both classes, now they are working:
/**
* @var array
*/
protected $supportedOptions = [
'groupId' => [0, 'The group id', 'integer'],
];
ext_emconf.php declares dependencies of PHP version, while composer.json does not.
So, it's currently possible to require the latest version under PHP 7.2 (I know....), but it's not possible to active it.
I just saw how you add PageTSConfig in ext_tables.php and would guess you a different solution to not use getUrl():
// $pageTsConfig = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TypoScript/TsConfig/Page/powermail.ts');
$pageTsConfig = '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:cleverreach/Configuration/TSconfig/Page/powermail.ts">';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig($pageTsConfig);
Hello,
I have installed and configured the extension (0.1.6). I use the Forms Ext., I can register a user but there is no confirmation mail. Also the name is not passed correctly although I have specified the correct field.
At the moment there is no way to define an attribute as global.
added new property in form.yaml to define localization state.
default of this is local.
properties:
cleverreachField: yourfield
cleverreachAttributeLocalization: global
According to the TSconfig Coding Guidelines and the registration in cleverreach/Configuration/TCA/Overrides/sys_template.php
, tsconfig files like Configuration/TsConfig/Page/powermail.tsconfig
should be placed under <extension>/Configuration/TsConfig/Page/
.
Currently, powermail.tsconfig
is in <extension>/Configuration/TypoScript/TsConfig/Page/
, so the registration for static includes does not work.
Hi,
I just tested the release/v12 branch and it seems to work fine.
The only issue is that the file /cleverreach/ext_typoscript_setup.txt has to be renamed into /cleverreach/ext_typoscript_setup.typoscript
Otherwise the finisher is not registered and cannot be selected in the form configuration.
Regards!
Ulrike
Hallo,
ich bekomme bei der Abmeldung über Powermail immer die Nachricht:
"E-Mail: Diese Email-Adresse befindet sich nicht in unserer Liste"
Da ich mich aber kurz vorher mit der E-Mail Adresse angemeldet habe und auch von CleaverReach eine Bestätigung bekommen habe, kann das nicht sein.
Muss ich irgend etwas beachten damit es funktioniert?
Vielen Dank
Mathias
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.