Giter Club home page Giter Club logo

mautic / mautic-typo3 Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 19.0 1.13 MB

Add-on TYPO3 extension that enhances the "EXT:marketing_automation" TYPO3 extension by connecting it to the Mautic Marketing Automation platform: Determine "Persona" from Mautic segments. Also provides additional services e.g. language synchronisation between Mautic and TYPO3.

Home Page: https://www.Leuchtfeuer.com

License: GNU General Public License v2.0

PHP 92.26% HTML 3.91% JavaScript 3.61% Shell 0.22%
typo3-extension mautic php typo3 marketing-automation personas forms content

mautic-typo3's Introduction

The Mautic Extension for TYPO3

Mautic

Welcome to the official Mautic extension for TYPO3.

Supported Versions

We currently support Mautic v4.

  • For TYPO3 v11 and above on PHP8, please use extension release 4.4.x
  • For TYPO3 v10 and v11 on PHP7, please use extension release 4.3.x
  • For TYPO3 v9, please use extension release 3.x

Features

The Mautic TYPO3 extension has many features that allow you to integrate your marketing automation workflow in TYPO3.

Dynamic Content Blocks

Ever wanted to serve different content to different users based on their Mautic segments? With this extension you will be able to set aside content in your TYPO3 website for specific Mautic segments. This way, you will be able to decide what content to serve to which people. In good TYPO3 fashion, this can apply not only to content elements but also to entire pages or even data sets, templates, ...

Form Synchronization

With the Mautic extension for TYPO3 you can create your forms in the TYPO3 backend, and have all data collected in Mautic too! You no longer need to maintain two forms, the extension will automatically sync all forms you have marked as 'Mautic forms' with Mautic. You can then easily post form results to Mautic, while your form will always stay up-to-date with your TYPO3 edits.

TYPO3 Form Customization

In case you got own elements or similiar customization within the EXT:form component you should be aware of the possibly necessary adaptions you have to do. A custom element needs a transformation and field property depending of the element content and what you want to do with it. In case of an e.g. LinkedCheckbox element providing an GDPR checkbox along with a linked text you might not want the data to be transferred into mautic. In this case you can do the following:

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['mautic']['transformation']['formField']['LinkedCheckbox'] = \Bitmotion\Mautic\Transformation\FormField\IgnoreTransformation::class;

If you actually want to transfer the data into mautic you need to choose a fitting Transformation class along with extending the inheritance of the custom element to use the mautic mixin. This provides the possibility to choose a property for the element in the form module.

The side effect of not handling those custom elements could be that the form data is not transferred into mautic correctly. This is only the case on initial setup and first submitting of the form with such an non configured element. Once the form is submitted those custom elements are getting ignored.

Mautic Form Actions

Create contacts or modify the points of a contact straight from a TYPO3 Form.

Mautic Form Content Element

If you wish to use Mautic forms directly, you can now add them with the Mautic Form content element that comes shipped with this extension.

Tracking Script Integration

Integrate the Mautic tracking script into your frontend with one click of a button!

OAuth support

All requests made by this extension are secured using OAuth (with Mautic only supping OAuth2 in recent versions). You can easily configure your API tokens in the extension manager of TYPO3.

Tags

Set tags for users when they are visiting a page!

Assets

Link to Mautic assets directly in TYPO3 using file relations or the TYPO3 link wizard!

API

The Mautic API https://developer.mautic.org/#rest-api is made available (see "ContactRepository")

Installation

First, install the extensions marketing_automation and mautic in your TYPO3.

Afterwards, establish the API connection:

  • Go to "API Credentials" in Mautic and create a new "OAuth2" credential set (give your TYPO3 website's domain as "redirect URI")
  • write down public and secret key
  • go to the "API Connection" backend module in TYPO3, select "OAuth2", and enter the keys from above
  • Now hit "Authorize with Mautic"
  • A Mautic login windows comes up. Log in, and click "Accept"

Documentation

Documentation and a getting started guide can be found here.

Known Issues

TYPO3 Form Builder

Want to map to a field (e.g. "contact email") but can't find it?

Currently, only 30 Mautic custom fields are offered in TYPO3's field mapping.

-> You can use Mautic's field sorting as a workaround, thus control which fields are offered.

Packaging for use in the Extension Manager

Clone the repository and run the following in the extension root directory:

composer package

Contributing Partners

Contributing

You can contribute by making a pull request to the master branch of this repository.

Questions or Suggestions?

You can always open an issue in this repository if you find a bug or have a feature request. Next to that you can also come visit us on Slack (Mautic or TYPO3> in the channel #typo3-mautic.

mautic-typo3's People

Contributors

brosua avatar drprofesq avatar ekkeguembel avatar flossels avatar frans-beech-it avatar ichhabrecht avatar juliopontes avatar kreativekrise avatar moongazer avatar ruudsilvrants avatar stfnwbr avatar woeler avatar yabid21 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mautic-typo3's Issues

OAuth2: No creation / sync of TYPO3 forms with Mautic

I have experienced a problem upgrading an existion system from OAuth1 to OAuth2. OAuth1 is working just fine. But not in OAuth2.By saving a form in TYPO3 Backend, the sync starts, but Mautic shows an error in log (and also by using the form in TYPO3-Frontend):

mautic.CRITICAL: Uncaught PHP Exception OAuth2\OAuth2AuthenticateException: "invalid_request" at /var/www/html/mautic/vendor/friendsofsymfony/oauth2-php/lib/OAuth2.php line 517 {"exception":"[object] (OAuth2\OAuth2AuthenticateException(code: 0): invalid_request at /var/www/html/mautic/vendor/friendsofsymfony/oauth2-php/lib/OAuth2.php:517)"} []

Therefore no form or any fields are created in Mautic.
All the other features like sync of Segments, Tags, ... work quite well.

Systems:

  • TYPO3 10.4.23
  • mautic-typo3 plugin 4.1.0
  • Mautic 3 and 4 (only oAuth2)

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

OAuth2 requestAccessToken() fails with 500 server error

Describe the bug
Connecting Mautic with the T3 plugin fails with a 500 server error, because the redirect response after OAuth-authorization is empty which the json_decode() method does not expect.

To Reproduce

  1. In T3 backend module "API Connection", click button "Authorize with Mautic"

  2. A new tab is opened requesting https://mautic.ddev.site:444/oauth/v2/authorize?client_id=1_2...o40&redirect_uri=https%3A%2F%2Ft3backend.ddev.site%3A444%2Fmautic%2Fauthorize%2Feac...963&state=9fb...99f&scope=&response_type=code which displays a Mautic page "The application TYPO3 DDEV would like to connect to your account." (TYPO3 DDEV is the name of my app added to Mautic)

  3. Clicking the "Accept" button, a POST request is made to https://mautic.ddev.site:444/oauth/v2/authorize accepted=Accept&fos_oauth_server_authorize_form%5Bclient_id%5D=1_2...o40&fos_oauth_server_authorize_form%5Bresponse_type%5D=code&fos_oauth_server_authorize_form%5Bredirect_uri%5D=https%3A%2F%2Ft3backend.ddev.site%3A444%2Fmautic%2Fauthorize%2Fe...963&fos_oauth_server_authorize_form%5Bstate%5D=9fb...99f&fos_oauth_server_authorize_form%5Bscope%5D=

  4. The response of this POST request is a 302 redirect with location https://t3backend.ddev.site:444/mautic/authorize/eac...963?state=9fb...99f&code=NmR...iNA

  5. T3 follows the redirect and opens GET https://t3backend.ddev.site:444/mautic/authorize/eac...963?state=9fb...99f&code=NmR...iNA which results in

GuzzleHttp\Exception\InvalidArgumentException
json_decode error: Syntax error
in /var/www/html/vendor/guzzlehttp/guzzle/src/functions.php line 305
at GuzzleHttp\json_decode('', true)
in /var/www/html/public/typo3conf/ext/mautic/Classes/Middleware/AuthorizeMiddleware.php line 123

Debugging
After the redirect described in 5) EXT:mautic calls Mautic\Auth\OAuth::validateAccessToken() and tries to request an access token because non is found, by calling Mautic\Auth\OAuth::requestAccessToken(). This call should submit a request to https://mautic.ddev.site:444/oauth/v2/token, but it is never received by the Mautic installation! I added a breakpoint inside the AppKernel: the first request for authorization comes in, the second one (https://mautic.ddev.site:444/oauth/v2/token) not.

I could follow the request until Mautic\Auth\AbstractAuth::makeRequest() to line 181:

$response = new Response(curl_exec($curl), curl_getinfo($curl));

It seems that the cUrl request is never send (like I said, the breakpoint in Mautic Kernel is not hit), instead an empty response is created here with status-code 0 and empty body, which results in a UnexpectedResponseFormatException leading to the above JSON-decode exception.

In both apps, no log entries occur to help investigation.

Additional context
TYPO3 v10.4.28 (composer install)
EXT:marketing_automation v1.2.3 (composer install)
EXT:mautic: v4.1.0 (composer install)
Mautic v4.2.1 and also current v4.4.1 (Stable release from website)
PHP v7.4 + Apache2 in DDEV

Maybe related


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Make DNC API available through ContactRepository

Is your feature request related to a problem? Please describe.
Currently it's only possible to set DNC options by providing an array for the payload of createContact() or editContact(), but not to unset (remove) these options:

            $contactData = [
               'doNotContact' = [
                    [
                        'reason' => 3,
                        'comments' => 'user',
                        'channel' => 'email',
                    ], [
                        'reason' => 3,
                        'comments' => 'user',
                        'channel' => 'sms',
                    ],
                ];
            ];

Describe the solution you'd like
The ContactRepository should implement the addDnc() and removeDnc() API calls, which would provide a cleaner way to handle DNC setting and un-setting.

Describe alternatives you've considered

Additional context

Mautic connection lost after time

Mautic was successfully connected via the REST API. However, after a while, before editing forms or calling the file list, you always seem to have to open the "API Connection" menu item once.

Otherwise, when editing the form, you only get "None" as an option when selecting the Mautic Property Type.

Also the file storage cannot be accessed.

I guess that the access token did expire. How do you handle this?

Is this the intended behavior or do I need to configure something else?

Unresolvable dependency to mautic/api-library

Describe the bug
When trying to add the current release 4.4.3 in a fresh typo3 11.5 project, The depencency to mautic/api-library cannot be resolved. Reason: The composer.json requires mautic/api-library from version 4, but it only exists up to version 3.1, at least on packagist.

Is this an error in the composer.json or do I have to add another repository to my composer setup?

Thx in advance!

Error on installation

Error on installation (marketing-automation is installed),

Typo3 11.5.30 installation via Typo3 Extension Manager
Version 4.4.3
PHP Version 8.1.27

[..]/typo3conf/ext/mautic/Libraries/vendor/autoload.php does not exist. Dependencies could not be loaded.

To Reproduce

  1. Download and install extension in Typo3 Extension Manager

Expected behavior
Class should be found

Support for 9.5 on the new releases

Hi,

What is the reason that the new 4.x are not available for TYPO3 9.5 (still LTS)?
There have been a lot of commits after the release of 3.0.0 so it would cost me too much time to go through all the changes, but maybe if I know the problems with compatibility I could contribute to making it compatible with 9 and 10.

Currently installing the extension for a customer who is on 9.5 and would like to have the most updated version possible.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Not more than 30 contact fields shown for mapping in form

When creating a form in TYPO3, you can map every field from the form with a contact field in Mautic ("Mautic Property Type"). The list contains max. 30 contact fields. If you have more than 30 contact fields in Mautic, e.g. because you have some custom fields, other fields will disappear from that dropdown and are not available for mapping.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Forms and create a form of prototype "Mautic Form"
  2. Add a text field to your form
  3. Click on "Mautic Property Type" and see the list of contact fields from Mautic
  4. See that not all your Mautic Contact fields are shown

Expected behavior
Be able to map on any Mautic Contact field.

Workaround
If a certain field is missing in that list but you need it for a form, you can edit that field in Mautic and for "Order" choose a higher position.

Adding more elements like form/gatedvideo

If you look at other connectors (e.g. Mautic/WordPress) many additional use cases are implemented. Maybe we should add basic content elements to bind mautic elements into a website.
In the future we can improve step by step e.g. sync between elements and more.

Connection between TYPO3 and Mautic not working

I'm using TYPO3 9.x with the mautic extension (v3.x). On Mautic side I'm getting the following error:
[2020-03-16 07:38:36] mautic.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\HttpException: "parameter_absent" at /vendor/willdurand/oauth-server-bundle/Service/OAuthServerService.php line 109 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\HttpException(code: 0): parameter_absent at /vendor/willdurand/oauth-server-bundle/Service/OAuthServerService.php:109)"} []

404 with authorization

Hello,

The "Authorize with mautic" button leads to https://mon-site/mautic/authorize
Mautic is well installed in the Mautic directory and works. My public key and my secret key have been generated.
In TYPO3, "API Connection" module, I fill in my public and secret key and my mautic base URL.
But the button still takes me to https://mon-site/mautic/authorize and leads to a 404.

I have empty the caches of MAUTIC, checked the logs of mautic and apache. My database is up to date.
I really do not see.

Could you help me please?

Additional context
TYPO3 10.4
EXT: marketing_automatisation version 1.2.3
EXT: matic 4.1.0

Thank you :)


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Determining the personas of a visitor is incomplete

Describe the bug
A contact belongs to two mautic segments (Segment1, Segment2).
Each mautic segment defines a persona in Typo3 (Persona1=>Segment1, Persona2=>Segment2).
Only one persona is determined by the findBySegments method in the PersonaRepository (e.g. Persona1).
Content elements configured for Persona2 are not displayed to the contact, even though he belongs to this persona.

Expected behavior
The contact sees content elements for each persona he belongs to.

Question
Do I miss something here? Is this not a valid use case?

MauticService pushForm returns value instead of bool

When performing a debug on the methode pushForm(), it doesn't return a boolean but a string like:

<head> 
    <meta charset="UTF-8" /> 
    <meta http-equiv="refresh" content="1;url=http://my.domain"/>
    <title>Redirecting to http://my.domain</title>
</head>
 <body> Redirecting to <a href="http://my.domain">http://my.domain</a>. </body>
 </html>```

Iframe same origin policy

Hi,

we got some struggle with the same-origin policy. After clicking on the authorize button the iframe will be successfully rendered inside the TYPO3 backend, but the following lines will be written to the browser dev tools console:

Blocked autofocusing on a <input> element in a cross-origin subframe.
libraries.js?v80b9d231:366
Uncaught DOMException: Blocked a frame with origin "https://...." from accessing a cross-origin frame.
    at HTMLDocument.<anonymous> (https://..../media/js/app.js?v80b9d231:254:162)
    at mightThrow (https://..../media/js/libraries.js?v80b9d231:355:18)
    at process (https://..../media/js/libraries.js?v80b9d231:357:89)

So the authorization does not work, I can open the authorize button target in a new tab (outside of TYPO3), and then the authorization will work, but then TYPO3 will not get the requested OAuth token and the authorization will not work either.

So I think the mautic instance has to be on the same host as the TYPO3 instance or am I wrong? Or is there a way to change this?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Re-create authorization instances after refreshAccessToken() was called

Is your feature request related to a problem? Please describe.
We extending EXT:mautic-typo3 to submit API requests via EventListeners, which are called on certain events in our system (e.g. UserBookedSomethingEvent). If such an event is dispatched, we want to add a certain Tag to the related Mautic contact.

All this works very well, except the access-token stored in the Mautic YAML is expired! To make sure that we always have a valid token, the EventListener checks it before doing anything else:

    public function __invoke(UserBookedSomethingEvent $event): void
    {
        if ($authorizeService->accessTokenToBeRefreshed()) {
            $authorizeService->refreshAccessToken();
        }

    // we should be able to make API requests here, because the YAML config holds a valid access-token

But here comes the problem: yes, the YAML config is updated with a new access-token (in case the prior one was expired), but the singletons e.g. in AbstractRepository->$authorization and AuthorizationFactory::$oAuth still holding the old access-token! We're not able to set, overwrite or dynamically reload these instances, which makes the API request failing.

We was wondering why the singleton instances with the old YAML values are created so early, before the Mautic API is used through the repositories. The reason seems to be, that AuthorizationFactory::createAuthorizationFromExtensionConfiguration() is called already during the Container creation for DI very early in the TYPO3 life-circle, that's why the auth objects are created with the old values.

Describe the solution you'd like
Not sure what is a good solution for this problem, but here are some proposals:

  1. Before returning the singleton $oAuth instance, AuthorizationFactory::createAuthorizationFromExtensionConfiguration() should always check if the YAML holds new values. If so, it should re-create the $oAuth instance and return it.
  2. Adding a method AbstractRepository->setAuthorization() to manually overwrite the OAuth object during runtime. If then AbstractRepository->getApi() is called, it uses the new authorization object.

Do you have any other solutions for this problem? Discussion welcome.

Additional context
TYPO3: v10.4.28
mautic-typo3: v4.1

Compatible with TYPO3 11

Hello,

Is your feature request related to a problem? Please describe.
This extension is not compatible with TYPO3 11

Describe the solution you'd like
A Version compatible with TYPO3 11

Thanks

FormFinisher "Send to Mautic Form" creates multiple form-fields on Mautic side if an existing form is edited

When a new Mautic form is created in TYPO3 backend using the FormFramework and the FormFinisher "Send to Mautic Form", the first saving action creates the form with all it fields also on the Mautic side. The form config looks like the following (shorted):

        renderables:
          -
            properties:
              mauticTable: firstname
              mauticId: 36
              mauticAlias: text_1
            defaultValue: ''
            type: Text
            identifier: text-1
            label: Firstname

As we can see, TYPO3 saves the attributes mauticId and mauticAlias returned from Mautic with values of the newly created fields.

If we edit this form in TYPO3, for example to add a new field, the saving action successfully creating this field on the Mautic side, BUT TYPO3 does not receive or save the attributes mauticId and mauticAlias of that new field to the form config!

        renderables:
          -
            properties:
              mauticTable: firstname
              mauticId: 36
              mauticAlias: text_1
            defaultValue: ''
            type: Text
            identifier: text-1
            label: Firstname
          -
            properties:
              mauticTable: lastname
            defaultValue: ''
            type: Text
            identifier: text-2
            label: Lastname

What happens now if we edit the form a 3rd or 4th time is, that the field for "lastname" is created again and again on Mautic side, basically filling the form in Mautic with multiple (identical) fields on every saving action.

Expected behavior
When editing an existing form, new fields must saved with their related mauticId and mauticAlias.

Environment
Server: DDEV / Nginx
TYPO3: 10.4.37
EXT:mautic: 4.1
PHP: 7.4
(The issue also exists in the version for TYPO3 v11 with EXT:mautic 4.4)

Edit 1:
Found this line in code

// TODO: Add check whether Mautic field exists - remove mauticId and mauticAlias from properties
but not sure if this was implemented already somewhere else (because it mentions exactly the missing attributes), nor why it should be like this.

Create Mautic tag in TYPO3 results in error "Record with UID x from table tx_mautic_domain_model_tag not found"

Describe the bug
In certain cases it can happen, that adding Mautic tags in TYPO3 resulting in the following errors after saving the tag:

Record with UID x from table tx_mautic_domain_model_tag not found

Edit form could not be loaded: The edit form could not be loaded for the requested records. This might be due to insufficient permissions.

Regardless, the tag is created in Mautic. The reason is a different AUTO_INCREMENT counter-value of the tag-tables on both systems (tx_mautic_domain_model_tag for TYPO3, lead_tags for Mautic). For example adding a new "TestTag" this is what happens:

  1. The new tag record is added to tx_mautic_domain_model_tag, e.g. with UID 10
  2. The new tag is created in Mautic via TCEmainHook, e.g. with ID 5
  3. TYPO3 calls TagRepository->synchronizeTags() which fetches all tags from Mautic (including their IDs), deletes all tags in tx_mautic_domain_model_tag and adds each Mautic tag with their ID as UID.
  4. TYPO3 tries to re-display the created record in edit-mode by its UID 10, which is marked as deleted=1 now. The form-framework doesn't know that in the background the UID was changed to 5 in this example, leading to the error above.

To Reproduce
Steps to reproduce the behavior:

  1. Manually change the AUTO_INCREMENT counters for both tables (tx_mautic_domain_model_tag for TYPO3, lead_tags for Mautic) to differnt values.
  2. In TYPO3, open a page or content-element, go to the "Mautic" tab and create a new tag
  3. Saving the tag results in the errors mentioned above

Expected behavior
After saving the new created tag, the tag edit-form is displayed like for any other TYPO3 record.

Environment
TYPO3 v10, v11
EXT:mautic (any version)

Additional context
This issue is the result of a conceptual software-design decision, which expects the tag-tables to be always equal in both databases (TYPO3 and Mautic). Therefor the sync-process between both tables also syncronizes the IDs which leads to the behaviour described here.

The best solution would be, if we're able to change/overwrite the UID which the form-framework tries to open (edit-form) after the sync-process. If this is not possible, we should document this error as "known issue", so database administrators must make sure that both tag-tables always having the equal AUTO_INCREMENT value.

404 on Authorization Button Click

Describe the bug
Clicking on the "Authorize with Mautic" button leads to a 404 page.
The URL it tries to connect to is https://www.mautic-integration.sunzity.de/mautic/authorize the mautic instance is installed as seen in the screenshots.
Deleting the cache does not help.
I tried using HTTP, HTTPS and entering the TYPO3 Domain as Callback URI.

To Reproduce
Steps to reproduce the behavior:
0. Follow the installation process without any issues.

  1. Click on "Authorize with Mautic" button

Expected behavior
I should be redirected to the login mask asking for permission to connect the TYPO3 to my account in the Mautic backend.

Screenshots
Bildschirmfoto 2020-09-15 um 15 22 27
Bildschirmfoto 2020-09-15 um 15 23 08
Bildschirmfoto 2020-09-15 um 15 23 56
Bildschirmfoto 2020-09-15 um 15 24 06
Bildschirmfoto 2020-09-15 um 15 24 22

Additional context
The TYPO3 is installed in the web/ directory, one level above the mautic/.
TYPO3 10.4
EXT: marketing_automation version 1.2.3
EXT: mautic 4.0.1
The page is htaccess protected. Removing the htaccess protection does not help either.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

TYPO3 12 compatibility

Hi, are you planning to provide a TYPO3 12 and/or Mautic 5 compatible version? Mautic 4 is no longer provided with security updates.

Preview in frontend (admin panel) with simulation of persona

I think it would be very beneficial for editors to be able to preview how a page with personalized content would look like. The admin panel as base is a logical choice.
By selecting one or more of the personas know to the system, simulate a page visit and display what it deus look like.

As a bonus, and that would probably be an edge case, make the selection an OR choice, just for completeness.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Preview mode on disabled pages throw exception.

Administrators can view disabled pages in the preview mode, but your extension don't work in this mode.
This exception fully lock this mode!

Core: Exception handler (WEB): Uncaught TYPO3 Exception: Return value of Bitmotion\Mautic\Hooks\MauticTagHook::getPage() must be of the type array, boolean returned | TypeError thrown in file .../typo3conf/ext/mautic/Classes/Hooks/MauticTagHook.php in line 37.

No submit button in mautic forms

No submit button in mautic forms.
If I create a Mautic form in TYPO3 using EXT: forms or use the example mautic contact form , the form is displayed in the frontend but without the submit button.
The button is displayed in Mautic under the form fields.

We have a TYPO3 10.4.20
and mautic 4.0.
newsletter-form
mautic-form.html.pdf


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Resetting mautic Id in override finisher

In a override finisher it is desired to reset the mauticId. Perhaps by an extra checkbox?

Alternative using an mautic id of 0? But this will (probably) been tried to sent to mautic.

Hide a content item if the user does not belong to a specific persona

Is your feature request related to a problem? Please describe.
How can I configure a content item to only display if the user does not belong to a specific persona?
Currently, there doesn't seem to be a way to do this.

The use case would be to display a form element only if the user does not belong to the "Prospects" persona. However, the user could/could be in other personas.
Submitting the form would move the contact to the "Prospects" segment (within Mautic) and thus to the "Prospects" persona.
When he visits the page again, he would no longer see the form.

Authorize with Mautic is KO

Hello,

When I click on the "Authorize with Mautic" button leads to a 404 page.
image

image

All the configuration seems OK. I don't understand why this error occurs.

We have a TYPO3 9.5.30
et mautic 3.1.2
Any ideas?

Thanks

[FEATURE] Deleting Mautic contact via API

Currently its not possible to delete a Mautic contact via API using this extension. But sometimes just setting the DNC flag is not enough, e.g. if the user requested all its data-deletion based on GDPR rules.

If TYPO3 is used as CRM, it would be great to be able to submit an API call to Mautic, if a user-record is deleted in the central storage system.

Mautci/MauticApi::newApi()

Describe the bug
This error occurs several times in my error log, most of the time everything works fine.
Core: Exception handler (WEB): Uncaught TYPO3 Exception: Argument 2 passed to Mautic\MauticApi::newApi() must implement interface Mautic\Auth\AuthInterface, instance of Bitmotion\Mautic\Mautic\OAuth given, called in /kunden/331271_70794/rp-hosting/13148/63148/typo3cms/firma10/typo3conf/ext/mautic/Classes/Domain/Repository/AbstractRepository.php on line 46 | TypeError thrown in file /kunden/331271_70794/rp-hosting/13148/63148/typo3cms/firma10/typo3conf/ext/mautic/Libraries/vendor/mautic/api-library/lib/MauticApi.php in line 61.

To Reproduce
I cannot reproduce this error.

TYPO3 10.4.21
EXT:mautic 4.1.0


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Make content element "mautic_form" dynamic.

Is your feature request related to a problem? Please describe.
Currently I can't limit a "mautic_form" element to specific personas (like in other content elements).

Describe the solution you'd like
I want to limit a "mautic_form" element to specific personas.

Remove debug values

Please remove DebuggerUtility::var_dump($formValues); in MauticService.
This is only for testing, not for production or extension releases

400 Bad request response because auth-bearer token is set twice

When a Nginx reverse-proxy is used in the system setup, Mautic API requests like api/contacts/new will fail with 400 Bad request response.

The reason is that api-library v3.1 adds the bearer token for OAuth2 connections already, which was not the case in v2.x. This extension also adds the bearer token as header in settings for the request, so in the final cUrl request this header exists twice, and Nginx reject it with 400 Bad request.

Environment

  • OS: DDEV v1.21.6
  • PHP: v7.4
  • EXT:mautic: v4.3
  • API-Library: v3.1

API not working properly

Regarding to: https://docs.typo3.org/p/mautic/mautic-typo3/master/en-us/Installation/Index.html
I've generated the API Key with OAuth 1 and entered the information in TYPO3. Then I've clicked "Authorize with Mautic", then the Login appears, after this the Authorization but the I've got the first error and didn't get redirected to TYPO3 Backend.
At this point the connection seemed to work anyway, as I can see the Segments in the Backend.

Regarding to the Documentation there should be a green flashmessage that the connection to the Mautic API was successfull. But mine is red.

TYPO3 Installation:
TYPO3 10.4.17
mautic 4.0.1
marketing_automation 1.2.3
PHP Version 7.4.13

MAUTIC Installation:
matic v3.3.3
PHP Version 7.4.13

Mautic Installation is using a subdomain web.domain.com and the TYPO3 Website is using www.domain.com.
I've did some var_dumps to get an idea what happening. The only thing I found "strange" is one setting where I don't know where it comes from. $this->authorization returns the following (bold):

Bitmotion\Mautic\Mautic\OAuthprototypeobject
authorization => protectedMautic\Auth\OAuthprototypeobject
_access_token => protected'kkkkkkfffffff' (50 chars)
_access_token_secret => protected'kkkkkkkeeeeeee' (48 chars)
_access_token_updated => protectedFALSE
_access_token_url => protected'https://web.domain.com/oauth/v1/access_token' (47 chars)
_authorize_url => protected'https://web.domain.com/oauth/v1/authorize' (44 chars)
_callback => protected'https://www.domain.com/mautic/authorize' (42 chars)
_client_id => protected'aaaaabbbbbb' (49 chars)
_client_secret => protected'ccccccdddddd' (50 chars)
_do_not_redirect => protectedFALSE
_expires => protectedNULL
_redirect_type => protected'code' (4 chars)
_refresh_token => protectedNULL
_request_token_url => protected'https://web.domain.com/oauth/v1/request_token' (48 chars)
_scope => protectedarray(empty)
_token_type => protectedNULL
_debug => protectedFALSE
_httpResponseHeaders => protectedNULL
_httpResponseInfo => protectedNULL
_curlTimeout => protectedNULL
baseUrl => protected'https://web.domain.com' (25 chars)

This URL doesn't exist. Where does this callback come from. After I clicked "Authorize with Mautic" he was trying to redirect me to exactly the same URL that doesn't exist. The Error in both cases is:

array(2 items)
errors => array(1 item)
0 => array(2 items)
code => 500 (integer)
message => 'The response has unexpected status code (500). Response: {"errors":[{"messa
ge":"The site is currently offline due to encountering an error. If the prob
lem persists, please contact the system administrator. System administrators
, check server logs for errors.","code":500,"type":null}]}{"errors":[{"messa
ge":"Es sieht so aus, als ob wir auf einen Fehler gesto\u00dfen sind (Fehler
#500). Bitte melden Sie dies dem Administrator wenn es nochmal passiert. ",
"code":500,"type":null}]}' (481 chars)
error => array(2 items)
code => 500 (integer)
message => 'The response has unexpected status code (500). Response: {"errors":[{"messa
ge":"The site is currently offline due to encountering an error. If the prob
lem persists, please contact the system administrator. System administrators
, check server logs for errors.","code":500,"type":null}]}{"errors":[{"messa
ge":"Es sieht so aus, als ob wir auf einen Fehler gesto\u00dfen sind (Fehler
#500). Bitte melden Sie dies dem Administrator wenn es nochmal passiert. ",
"code":500,"type":null}]}' (481 chars)

Did I miss something or is this is some sort of bug. Any help is very appriciated. Thank's in advance.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Missing error handling on form submit

If there is an error when submitting a form, it is currently not handled.
At this point, mautic (unfortunately) returns a response with the status code 302 and would like to redirect to the current page with the query argument ?mauticError. E.g.:

Redirecting to <a href="https://www.typo3-mautic.de/gewinnspiel-typo3-mautic/?mauticError=Fehler%3A%3Cbr%20%2F%3E%3Col%3E%3Cli%3E%27Geburtstag%27%20ist%20erforderlich.%3C%2Fli%3E%3C%2Fol%3E#gewinnspiel">https://www.typo3-mautic.de/gewinnspiel-typo3-mautic/?mauticError=Fehler%3A%3Cbr%20%2F%3E%3Col%3E%3Cli%3E%27Geburtstag%27%20ist%20erforderlich.%3C%2Fli%3E%3C%2Fol%3E#gewinnspiel</a>.

In the FormRepository, however, it is only checked whether the HTTP-Status-Code is < 200 | >= 400 and only in this case logs an error (if the logging for production was overwritten)

Expected behavior
The error should at least be logged or, even better, an error message should be displayed for the user.

automatic persona creation from segments upon import

In TYPO3 the segments of mautic can be imported into the system to be used for persona composition.
In order to ease the barrier for editors or integrators, it would be nice to the have personas automatically created as a one to one representation for each segment. Usually the segment composition of mautic already represents the persona structure required for personalized content on the webpage, so this would be a logical conclusion.
They would be named exactly like the segment and also only reference that single segment they were build for.
Adjustments can still be made, and the automatic creation should have an opt-out (or opt-in) in extension settings to let the integrator have control.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Mautic oauth v2 is not usable

I am using mautic 3.2.5 and want to use the oauth v2 version for communication. With this configured, the extension is not able to connect.

To Reproduce
Configure an oauth v2 credential pair in the extension and see how it does not connect.

Expected behavior
I want the connection to be made.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.