Campaign Workflow in 1.2.0

Either I’m completely missing something or there is a bug in the campaign workflow in 1.2.0. I can’t seem to find anything (documentation or tutorials) showing step-by-step to set up a campaign workflow for 1.2.



Here’s what I’m expecting…


  1. User submits a campaign form via a landing page.
  2. Lead gets added, increase their points and add them to a list.



    Here’s what is happening…


  3. The lead gets created but none of the campaign workflow is triggered.



    Below is a screenshot of how I’ve got it set up—I’ve tried as many different combinations as I could think of but nothing is working :(



    mautic-workflow.png



    Any and all help is greatly appreciated!

    Jon

Either I’m completely missing something or there is a bug in the campaign workflow in 1.2.0. I can’t seem to find anything (documentation or tutorials) showing step-by-step to set up a campaign workflow for 1.2.

Here’s what I’m expecting…

  1. User submits a campaign form via a landing page.
  2. Lead gets added, increase their points and add them to a list.

Here’s what is happening…

  1. The lead gets created but none of the campaign workflow is triggered.

Below is a screenshot of how I’ve got it set up—I’ve tried as many different combinations as I could think of but nothing is working :frowning:

Any and all help is greatly appreciated!
Jon

I too am facing the exact same issue. Setup the campaign and the required cron jobs, but it doesn’t seem to work.

If the cron jobs are configured correctly (https://www.mautic.org/docs/setup/index.html), it should work.

From your screen shot of the campaign, could you try to remove the “Submits Form” decision? The lead source is already that same form. Maybe Mautic now expects that a lead should submit a form twice (not sure really). But the “Campaign Forms” lead source should be enough to specify from what form the leads should go to the campaign.

Hey Zuno, don’t mean to hijack your discussion, but I think our problem is the same, so for the purpose of not duplicating it, here goes:

Escopecz: My cron jobs are setup correctly. I verified it and am getting Command run notification emails just fine.

Here is the content of an email i get as part of the cron reports:
[quote]Rebuilding leads for campaign 2
There are no lists to rebuild from.
0 lead(s) affected[/quote]

I have tried it with and without the Submit Form decision. Still doesn’t seem to work. Maybe by the email report you see above, you might be able to tell us something to go by.

Thanks in advance.

Could you try to create a standalone form (you can copy the campaign form and select to be standalone) than create a new lead list and at the form’s action tab create a new action to add the leads who submits that form to that new lead list.

In the campaign, use the lead list instead of the form. Does that work for you?

Hey…
Got it working
thanks Escopecz. Din’t try the one you mentioed, however the solution was to remove the Submit Form decision from the flow.
Although I had tried this one several times, this time it worked like a charm.

One little help, if I may ask of you? Digressing a bit from the original topic of discussion.
I have setup two email to be triggered when the form is submitted, one acknowledgement email to the lead and a notification email. But both emails go to the lead. How do I configure the notification email to come to me?

Thanks in advance.

Great to hear that it works now.

I’d go again with the standalone form which has the “Send form results” action which hasn’t been ported to campaigns yet.

Thanks mate… works like Super Awesomeness :slight_smile:

[quote=2926:@escopecz]Could you try to create a standalone form (you can copy the campaign form and select to be standalone) than create a new lead list and at the form’s action tab create a new action to add the leads who submits that form to that new lead list.

In the campaign, use the lead list instead of the form. Does that work for you?[/quote]

@escopecz , I’ve tried like you mentioned above but campaign keeps frozen. I’ve changed Cron Jobs to:

[i]/usr/local/bin/php /home/myuser/public_html/app/console mautic:campaigns:trigger --env=prod

/usr/local/bin/php -f /home/myuser/public_html/app/console mautic:campaign:trigger -e prod

/usr/bin/php-cli -q /home/myuser/public_html/app/console mautic:campaigns:trigger --env=prod[/i]

@Sokoban the frozen term is usually used for UI. Like “the campaign canvas is frozen and I cannot click on anything”. Do I understand it correctly that frozen in your case means that the events does not work when you test them?

If you have SSH access, could you log in and execute the command? What is the output?

If you don’t have SSH access, try this PHP script instead. https://gist.github.com/escopecz/9a1a0b10861941a457f4 What is the output?

@escopecz , it means the events do not work.

Here’s the message:

[i]Executing console mautic:campaigns:trigger

[RuntimeException]
Failed to start the session because headers have already been sent by “/home/myuser/public_html/funciona.php” at line 48.[/i]

Ok, that’s the problem. I don’t think it’s a problem of Mautic though. Mautic doesn’t have a file functiona.php.

@escopecz , the instructions at github do not tells how the PHP file must be named. Even changing file to cron.php I got same error message.
URL mydomain.com/cron.php?ILoveMauticReallyIDo loads fine but when I click any option = error.

@Sokoban I update the description for the commands.php script. Thanks for pointing that out.

Is the error still this?

Failed to start the session because headers have already been sent by "/home/myuser/public_html/funciona.php" at line 48.

If so, you’ll have to find out what is the file finciona.php doing there. I repeat, it’s not a Mautic file so it’s not a question for Mautic support forum.

@escopecz , Error remains…

Failed to start the session because headers have already been sent by “/home/myuser/public_html/commands.php” at line 48.

I’ve installed Mautic into my root’s domain and put the PHP file as above.

What server do you use? Make sure the file starts with <?php and there is no space before it.

I’m using BizzaHost just for testing Mautic. PHP file does not have any space before neither after.

On github script shows 71 lines. When I paste into PHP server’s file it shows 59 lines due to excluded blank lines.
So if you look at line 48 at github’s script = “}” and line 48 into my server = “echo ‘

Executing ’ . implode(’ ', $args) . ‘

’;”

I’ve downloaded commands.php from github and then uploaded to my server. Now error points to line 59:

echo ‘

Executing ’ . implode(’ ', $args) . ‘

’;

Why would you remove the empty lines? What is in the /home/myuser/public_html/ folder? Are there files of Mautic? Is there anything else? WHAT IS THE funciona.php FILE?

It removed empty lines over paste command CTRL+V. I didn’t exclude anything. “funciona.php” was the name before I replaced to commands.php. Forget about funciona.php.
Here’s root’s image: