Skip to content
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 fix templating helper #8285

Merged
merged 5 commits into from Jan 3, 2020
Merged

M3 fix templating helper #8285

merged 5 commits into from Jan 3, 2020

Conversation

hluchas
Copy link
Contributor

@hluchas hluchas commented Jan 2, 2020

Please be sure you are submitting this against the staging branch.

Q A
Bug fix? Y
New feature?
Automated tests included?
Related user documentation PR URL
Related developer documentation PR URL
Issues addressed (#s or URLs) #8284
BC breaks?
Deprecations?

Description:

When TemplatingHelper was used via CLI, it went to fatal error.
Used PR #8276

Steps to reproduce the bug:

  1. Use local SMTP transport
  2. Manually enable integration in column mautic_plugin_integration_settings.is_publisheed by swithing to 1
  3. Ensure that you have at least 1 email to be send in one campaign
  4. Call bin/console mautic:campaigns:trigger -e dev via cli
  5. You'll get
In TemplatingHelper.php line 48:
                                                                                                                     
  [Symfony\Component\Debug\Exception\UndefinedMethodException]                                                       
  Attempted to call an undefined method named "enterScope" of class "ContainerLn4vclt\appDevDebugProjectContainer".  
                                                                                                                     

Exception trace:
  at /Users/lukas.drahy/dev/community-fork/app/bundles/CoreBundle/Helper/TemplatingHelper.php:48
 Mautic\CoreBundle\Helper\TemplatingHelper->getTemplating() at /Users/lukas.drahy/dev/community-fork/plugins/MauticCitrixBundle/EventListener/EmailSubscriber.php:204
 MauticPlugin\MauticCitrixBundle\EventListener\EmailSubscriber->decodeTokens() at /Users/lukas.drahy/dev/community-fork/plugins/MauticCitrixBundle/EventListener/EmailSubscriber.php:149

Steps to test this PR:

  1. Same as reproduction steps

@hluchas hluchas changed the base branch from staging to 3.x January 2, 2020 17:20
@hluchas hluchas added this to the 3.0.0 milestone Jan 2, 2020
@hluchas hluchas added code-review-needed PR's that require a code review before merging ready-to-test PR's that are ready to test labels Jan 2, 2020
@hluchas hluchas assigned hluchas and unassigned escopecz Jan 2, 2020
@hluchas hluchas requested a review from escopecz January 2, 2020 17:22
@hluchas hluchas mentioned this pull request Jan 2, 2020
@escopecz
Copy link
Sponsor Member

escopecz commented Jan 3, 2020

I cannot replicate:

bin/console mautic:campaigns:trigger -e dev -v
Triggering events for campaign 581
Triggering events for newly added contacts
5 total events(s) to be processed in batches of 100 contacts
 5/5 [============================] 100%
5 total events were executed
0 total events were scheduled
...

I can see that the error originates from the Citrix bundle. Which one from the GoTo* plugins do you have enabled?

@hluchas
Copy link
Contributor Author

hluchas commented Jan 3, 2020

I can't reproduce this too. GoToWebinar plugin was enabled without credentials. I checked iif I can do this manually and it's not possible. But this fixes calls of deprecated methods.

I cannot replicate:

bin/console mautic:campaigns:trigger -e dev -v
Triggering events for campaign 581
Triggering events for newly added contacts
5 total events(s) to be processed in batches of 100 contacts
 5/5 [============================] 100%
5 total events were executed
0 total events were scheduled
...

I can see that the error originates from the Citrix bundle. Which one from the GoTo* plugins do you have enabled?
I can't reproduce this too without manually enabled integration in DB. GoToWebinar plugin was enabled without credentials. I checked iif I can do this in UI and it's not possible. But this fixes calls of deprecated methods.

When I enable integration in DB and remove condition it works. But this is not usual settings of app.
It had sense I believe. Request/stack is not available in container when called via CLI. I'll try to find why

@hluchas
Copy link
Contributor Author

hluchas commented Jan 3, 2020

Removed condition. Updated reproduction steps

@hluchas hluchas requested a review from escopecz January 3, 2020 14:27
@escopecz escopecz merged commit e3b7331 into mautic:3.x Jan 3, 2020
@escopecz escopecz removed code-review-needed PR's that require a code review before merging ready-to-test PR's that are ready to test labels Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants