New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
M3: Refactor builder token helper #8204
M3: Refactor builder token helper #8204
Conversation
…okenBuilder. Refactored out use of MauticFactory from HelperTokenBuilder. Made HelperTokenBuilder a service.
…recated leadModel->getCurrentLead()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea with the factory. I noticed some issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I reviewed again and suggested small improvements.
Co-Authored-By: John Linhart <jan@linhart.email>
Co-Authored-By: John Linhart <jan@linhart.email>
Something is causing this error when I'm walking through testing.
I wanted to create a new Page so that the I could test the builder tokens are being inserted into the builder correctly, but when clicking the new button on the page list view, it failed to load the form and instead dumped this error into the logs. |
We need to update the BuilderTokenHelperFactory as well - https://github.com/mautic/mautic/pull/8204/files#diff-966ddd047b8bdaf985231305e091f415R525 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and works well. I tested page builder and email builder. Tokens are being replaced when sent to contacts. Thanks @mtshaw3 👍
\Mautic\CoreBundle\Helper\BuilderTokenHelper is dependent on MauticFactory and thus needs to be refactored to a service instead in order to use dependency injection.
This PR replaces the broken PR that was rebased to the 3.x branch: #8160
GH issue: #8088