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

Fix social monitoring command for twitter #4252

Merged
merged 5 commits into from Jun 21, 2017

Conversation

@SamWebmecanik
Contributor

SamWebmecanik commented Jun 16, 2017

Q A
Bug fix? X
New feature?
Related user documentation PR URL
Related developer documentation PR URL
Issues addressed (#s or URLs) #4100
BC breaks?
Deprecations?

Description:

When you launch this command : mautic:social:monitoring, it fail with an error :

[Symfony\Component\Debug\Exception\ContextErrorException]
Catchable Fatal Error: Argument 2 passed to Mautic\PluginBundle\Helper\oAuthHelper::__construct() must be an instance of Symfony\Component\HttpFoundation\Request, null given, called in /home/contactsiwantasp/public_html/app/bundles/PluginBundle/Integration/AbstractIntegration.php on line 1119 and defined

⚠️ This fix is not a real solution I think, but it fixes. ⚠️

Steps to reproduce the bug:

  1. Config the twitter plugin
  2. Create a social monitoring
  3. Launch mautic:social:monitoring
  4. See the error, is the same in the description of this PR.

Steps to test this PR:

  1. Apply this PR.
  2. Config the twitter plugin
  3. Create a social monitoring
  4. Launch mautic:social:monitoring
  5. See the lead create or update.
@mqueme

This comment has been minimized.

Contributor

mqueme commented Jun 16, 2017

Thank you @SamWebmecanik for spotting this, I have made a couple of changes to correctly fix this issue.

@alanhartless

Need to add a && this->request && $this->request->query->... on line 65 of the oAuthHelper.

@SamWebmecanik

This comment has been minimized.

Contributor

SamWebmecanik commented Jun 20, 2017

@alanhartless like that?

@billybobilly

This comment has been minimized.

billybobilly commented Jun 20, 2017

manually made the updates to app/bundles/PluginBundle/Helper/oAuthHelper.php and plugins/MauticSocialBundle/Integration/SocialIntegration.php

Ran the cron job

output looks like it's successfully processing everything that was collected over the past week or so since it stopped working:

...
Updating existing lead ID #429261 (breakfastcrmnls)
Updating existing lead ID #296740 (donnachaffins)
Updating existing lead ID #397103 (frostybluefarms)
Creating new lead
Creating new lead
Creating new lead
Creating new lead
Updating existing lead ID #288199 (recetaspormenos)
Updating existing lead ID #283203 (printablexpress)
Creating new lead
Creating new lead
Creating new lead
...

No errors so far.

Requested changes made.

@dongilbert

Works after making suggested changes. Thanks!

@mqueme

This comment has been minimized.

Contributor

mqueme commented Jun 21, 2017

This works for me as well.

@mqueme mqueme merged commit 5ab2a19 into mautic:staging Jun 21, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@neerajsinghsonu

This comment has been minimized.

neerajsinghsonu commented Jun 29, 2017

Twitter Social Monitoring CLI Fixed :) Yeah!! 💃 Thanks #4252 to @SamWebmecanik 👍

1 - Mautic v2.8.2
2 - Twitter CLI Symfony Error for Command (php console mautic:social:monitoring)

... Fixed Now. Check & Confirm :)

@sagarnangare

This comment has been minimized.

sagarnangare commented Dec 5, 2017

I fixed it in Mautic 2.8.2. Wrote a simple blog post here about the fix http://www.sagarnangare.net/mautic-cron-issue-fix-social-monitoring-command-twitter/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment