# Error when appending &firstname={leadfield=firstname|true} to email link

**URL:** <https://forum.mautic.org/t/error-when-appending-firstname-leadfield-firstname-true-to-email-link/3199>\
**Category:** Product Support\
**Created:** [January 11, 2016, 1:54pm UTC](https://forum.mautic.org/t/error-when-appending-firstname-leadfield-firstname-true-to-email-link/3199 "2016-01-11T13:54:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![craigbenstock](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@craigbenstock](https://forum.mautic.org/u/craigbenstock)\
**Post date:** [January 11, 2016, 1:54pm UTC](https://forum.mautic.org/t/error-when-appending-firstname-leadfield-firstname-true-to-email-link/3199/1 "2016-01-11T13:54:53Z")

</div>

When I edit a link in an email to look like this:  
  
  
  
Extract  
  
  
  
for the purpose of populating form fields on a landing page when they visit the landing page via the email, I get the following error from the mautic:campaigns:trigger cron task (pagelink=2 is definitely correct as I can drag and drop it in the email from the sidebar):  
  
  
  
======================================  
  
  
  
Triggering events for campaign 1  
  
Triggering first level events  
  
1 total events(s) to be processed in batches of 100  
  
0/1 [\>---------------------------] 0%PHP Notice: Undefined index: {pagelink=2}&firstname={leadfield=firstname|true}&email={leadfield=email|true} in /var/www/mautic/app/bundles/PageBundle/EventListener/BuilderSubscriber.php on line 595  
  
  
  
[DoctrineDBALDBALException]  
  
An exception occurred while executing ‘INSERT INTO page\_redirects (is\_published, date\_added, created\_by, created\_by\_user, date\_modified, modified\_by, modified\_by\_user, checked\_out, checked\_out\_by, checked\_out\_by\_user, redirect\_id, url, hits, unique\_hits, email\_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [1, “2016-01-11 13:35:02”, null, null, null, null, null, null, null, null, “40dbd3b29463040b1569a626b”, null, 0, 0, 1]:  
  
SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘url’ cannot be null  
  
  
  
[PDOException]  
  
SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘url’ cannot be null  
  
  
  
mautic:campaigns:trigger [-i|–campaign-id[="…"]] [-l|–batch-limit[="…"]] [-m|–max-events[="…"]] [-f|–force]  
  
  
  
Script in progress. Use -f or --force to force execution.  
  
Script in progress. Use -f or --force to force execution.  
  
Script in progress. Use -f or --force to force execution.  
  
Script in progress. Use -f or --force to force execution.  
  
  
  
==========  
  
  
  
Any help please?

---

<div class="post-metadata">

**Author:** ![craigbenstock](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@craigbenstock](https://forum.mautic.org/u/craigbenstock)\
**Post date:** [January 11, 2016, 1:54pm UTC](https://forum.mautic.org/t/error-when-appending-firstname-leadfield-firstname-true-to-email-link/3199/2 "2016-01-11T13:54:53Z")

</div>

When I edit a link in an email to look like this:

Extract

for the purpose of populating form fields on a landing page when they visit the landing page via the email, I get the following error from the mautic:campaigns:trigger cron task (pagelink=2 is definitely correct as I can drag and drop it in the email from the sidebar):

======================================

Triggering events for campaign 1  
Triggering first level events  
1 total events(s) to be processed in batches of 100  
0/1 [\>---------------------------] 0%PHP Notice: Undefined index: {pagelink=2}&firstname={leadfield=firstname|true}&email={leadfield=email|true} in /var/www/mautic/app/bundles/PageBundle/EventListener/BuilderSubscriber.php on line 595

[DoctrineDBALDBALException]  
An exception occurred while executing ‘INSERT INTO page\_redirects (is\_published, date\_added, created\_by, created\_by\_user, date\_modified, modified\_by, modified\_by\_user, checked\_out, checked\_out\_by, checked\_out\_by\_user, redirect\_id, url, hits, unique\_hits, email\_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [1, “2016-01-11 13:35:02”, null, null, null, null, null, null, null, null, “40dbd3b29463040b1569a626b”, null, 0, 0, 1]:  
SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘url’ cannot be null

[PDOException]  
SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘url’ cannot be null

mautic:campaigns:trigger [-i|–campaign-id[="…"]] [–scheduled-only] [–negative-only] [-l|–batch-limit[="…"]] [-m|–max-events[="…"]] [-f|–force]

Script in progress. Use -f or --force to force execution.  
Script in progress. Use -f or --force to force execution.  
Script in progress. Use -f or --force to force execution.  
Script in progress. Use -f or --force to force execution.

==========

Any help please?

---

<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:** [January 11, 2016, 3:35pm UTC](https://forum.mautic.org/t/error-when-appending-firstname-leadfield-firstname-true-to-email-link/3199/3 "2016-01-11T15:35:15Z")

</div>

It seems this fix could solve your issue:

[https://github.com/mautic/mautic/pull/1310](https://github.com/mautic/mautic/pull/1310)

If you get a chance to test it, write a comment below the PR. I’ll speed up release of the new version.
