# Campaign Workflow in 1.2.0

**URL:** <https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295>\
**Category:** Product Support\
**Created:** [September 7, 2015, 12:01am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295 "2015-09-07T00:01:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![zuno](https://avatars.discourse-cdn.com/v4/letter/z/eb8c5e/32.png) [@zuno](https://forum.mautic.org/u/zuno)\
**Post date:** [September 7, 2015, 12:01am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/1 "2015-09-07T00:01:50Z")

</div>

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](http://zuno.ws/mautic-workflow.png)  
  
  
  
Any and all help is greatly appreciated!  
  
Jon

---

<div class="post-metadata">

**Author:** ![zuno](https://avatars.discourse-cdn.com/v4/letter/z/eb8c5e/32.png) [@zuno](https://forum.mautic.org/u/zuno)\
**Post date:** [September 7, 2015, 12:01am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/2 "2015-09-07T00:01:50Z")

</div>

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 ☹

![](http://zuno.ws/mautic-workflow.png)

Any and all help is greatly appreciated!  
Jon

---

<div class="post-metadata">

**Author:** ![habib](https://avatars.discourse-cdn.com/v4/letter/h/71e660/32.png) [@habib](https://forum.mautic.org/u/habib)\
**Post date:** [September 7, 2015, 7:32am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/3 "2015-09-07T07:32:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [September 7, 2015, 8:19am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/4 "2015-09-07T08:19:23Z")

</div>

If the cron jobs are configured correctly ([https://www.mautic.org/docs/setup/index.html](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.

---

<div class="post-metadata">

**Author:** ![habib](https://avatars.discourse-cdn.com/v4/letter/h/71e660/32.png) [@habib](https://forum.mautic.org/u/habib)\
**Post date:** [September 7, 2015, 9:03am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/5 "2015-09-07T09:03:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [September 7, 2015, 9:09am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/6 "2015-09-07T09:09:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![habib](https://avatars.discourse-cdn.com/v4/letter/h/71e660/32.png) [@habib](https://forum.mautic.org/u/habib)\
**Post date:** [September 7, 2015, 9:24am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/7 "2015-09-07T09:24:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [September 7, 2015, 9:30am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/8 "2015-09-07T09:30:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![habib](https://avatars.discourse-cdn.com/v4/letter/h/71e660/32.png) [@habib](https://forum.mautic.org/u/habib)\
**Post date:** [September 7, 2015, 9:40am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/9 "2015-09-07T09:40:22Z")

</div>

Thanks mate… works like Super Awesomeness 🙂

---

<div class="post-metadata">

**Author:** ![Sokoban](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Sokoban](https://forum.mautic.org/u/Sokoban)\
**Post date:** [September 23, 2015, 1:40am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/10 "2015-09-23T01:40:47Z")

</div>

[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]

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [September 23, 2015, 4:49am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/11 "2015-09-23T04:49:58Z")

</div>

@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](https://gist.github.com/escopecz/9a1a0b10861941a457f4) What is the output?

---

<div class="post-metadata">

**Author:** ![Sokoban](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Sokoban](https://forum.mautic.org/u/Sokoban)\
**Post date:** [September 23, 2015, 9:18am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/12 "2015-09-23T09:18:32Z")

</div>

@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]

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [September 23, 2015, 10:20am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/13 "2015-09-23T10:20:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sokoban](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Sokoban](https://forum.mautic.org/u/Sokoban)\
**Post date:** [September 23, 2015, 10:42am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/14 "2015-09-23T10:42:06Z")

</div>

@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](http://mydomain.com/cron.php?ILoveMauticReallyIDo) loads fine but when I click any option = error.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [September 23, 2015, 10:55am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/15 "2015-09-23T10:55:54Z")

</div>

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

Is the error still this?

```auto
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.

---

<div class="post-metadata">

**Author:** ![Sokoban](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Sokoban](https://forum.mautic.org/u/Sokoban)\
**Post date:** [September 23, 2015, 11:01am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/16 "2015-09-23T11:01:04Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [September 23, 2015, 11:10am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/17 "2015-09-23T11:10:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sokoban](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Sokoban](https://forum.mautic.org/u/Sokoban)\
**Post date:** [September 23, 2015, 11:24am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/18 "2015-09-23T11:24:41Z")

</div>

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) . ‘
’;

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [September 23, 2015, 11:31am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/19 "2015-09-23T11:31:38Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Sokoban](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Sokoban](https://forum.mautic.org/u/Sokoban)\
**Post date:** [September 23, 2015, 11:41am UTC](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295/20 "2015-09-23T11:41:15Z")

</div>

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:  
 ![](http://2effes.com/root.jpg)

[Next page](https://forum.mautic.org/t/campaign-workflow-in-1-2-0/2295.md?page=2)
