Monday, November 30, 2015

WFFM Enrol in Engagement Plans save action cannot be added when Analytics is Disabled

Recently, our product owner complaint to us about an issue in WFFM form.

Issue was, when he try to add a "Enrol in Engagement Plans" save action into a particular WFFM form, it returns following error message.

Error Message : This action cannot be added. Your configuration does not support it.


After a some investigation, it turns out to be that analytics is disabled for this particular WFFM form

"Disable analytics for this page" checkbox was checked



After enabling Analytics (i.e. UnCheck "Disable analytics for this page" checkbox), we were able to add "Enrol in Engagement Plans" save action into WFFM form.



 Happy Sitecore !! :-)

Friday, November 6, 2015

Using Add Contact to contact List WFFM Save Action with Sitecore 8

Yesterday, I saw a question posted into Sitecore Community form related to "Add Contact to Contact List" WFFM save action.

The issue was, when "Add the contact to a contact list" save action was used in a WFFM form.



when the user submits the form, he receives following error message in the page.

We experienced a technical difficulty while processing your request. Your data may not have been correctly saved.



And when checked in the error logs, we can see following error message

11668 09:38:20 WARN  Null ids are not allowed.
Parameter name: userName
Exception: System.ArgumentNullException
Message: Null ids are not allowed.
Parameter name: userName
Source: Sitecore.Kernel
   at Sitecore.Security.Accounts.User.FromName(String userName, Boolean isAuthenticated)
   at Sitecore.Form.Submit.AddContactToContactList.Execute(ID formid, AdaptedResultList fields, Object[] data)
   at Sitecore.Form.Core.Submit.SubmitActionManager.ExecuteSaving(ID formID, ControlResult[] list, ActionDefinition[] actions, Boolean simpleAdapt, ID sessionID)

11668 09:38:20 WARN  The 'Add Contact to Contact List[id={C5E1D916-2476-4BE4-AE90-7B419B55C9E1}]' save action failed: We experienced a technical difficulty while processing your request. Your data may not have been correctly saved.
11668 09:38:20 WARN  Web Forms for Marketers: an exception: We experienced a technical difficulty while processing your request. Your data may not have been correctly saved. has occured while trying to execute an action.

Then, I tried to add "Create User" save action into the WFFM form Save actions as shown below



And then when try to fill the form and submit it, it worked.  :-)



Reason for this is, to add a user into a Contact List using "Add contact to Contact List", he should be already created in Sitecore as a user.

Update : User is now added into Contact List



Will dig deep into code how and why this happens in a later blog post.

Happy Sitecore :-)