WFFM – incorrect formsRoot ID – Multisite

Today I want to share with you an solution for very unclear error which can occurs when we use Web Forms For Marketers in multisite solution.

You will see this error inside Experience Editor when you will be able to select forms:

Regarding to Sitecore documentation if you will add “formsRoot” parameter to the “site” node in configuration file – you will be able to define different forms root for every page.

But what will happen if ID which you will define will not exist in content tree or you will make a typo and it will not be properly ID? You will see following error:

Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.]
   System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args) +14649723
   System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args) +105
   System.String.Format(String format, Object[] args) +103
   Sitecore.Data.DataProviders.Sql.SqlDataApi.CreateCommand(String sql, Object[] parameters) +189
   Sitecore.Data.DataProviders.Sql.<>c__DisplayClass12.b__10() +30
   Sitecore.Data.DataProviders.NullRetryer.Execute(Func`1 action, Action recover) +286
   Sitecore.Data.DataProviders.Sql.SqlDataApi.CreateReader(String sql, Object[] parameters) +281
   Sitecore.Data.DataProviders.Sql.SqlDataProvider.ResolvePaths(String itemPath) +406
   Sitecore.Data.DataProviders.Sql.SqlDataProvider.SelectSingleID(String query, CallContext context) +126
   Sitecore.Data.DataProviders.DataProvider.SelectSingleID(String query, CallContext context, DataProviderCollection providers) +118
   Sitecore.Data.DataManager.SelectSingleItem(String query, Boolean& processed) +66
   Sitecore.Data.DefaultDatabase.SelectSingleItem(String query) +74
   Sitecore.Form.Core.Utility.SiteUtils.GetFormsSites() +620
   Sitecore.Form.Core.Utility.Utils.GetFormRoots() +138
   Sitecore.Forms.Shell.UI.CreateFormWizard.OnLoad(EventArgs e) +1109
   Sitecore.Forms.Shell.UI.InsertFormWizard.OnLoad(EventArgs e) +99

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +128
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +146
   Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) +89
   Sitecore.Web.UI.Sheer.ClientPage.OnLoad(EventArgs e) +593
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3811

Do not loose your time for debugging – just check IDs for ALL sites – it is not important which site you are editing at the moment.

You can have there typo or root item does not exist in content tree. You have to verify all sites because during opening InsertFormWizard control – WFFM loads all configuration nodes.

Changes are coming! – news from Sitecore Partner Day

On 15th June 2016 I had a pleasure to be on first in Poland Sitecore Partner Day.

Speakers were mainly from Sitecore and we had an opportunity to hear about:

  • Updates from the Global Solution Partner Program (Marie Louise Bouchet)
  • Make your Sitecore implementation processes efficient (Hedgehog)
  • What’s new in Sitecore 8.1 and Roadmap (Jannik Devantier)
  • xDB – what is it really and how do I use it? (Morten Ljungberg)
  • Partnering with Sitecore – use Sitecore messaging to help drive digital transformation and generate business (Marie Louise Bouchet)
  • Sitecore Poland Community (Coders.Center & I)
  • Diving deeper into the new features of Sitecore 8.1 (Morten Ljungberg)
  • Sitecore Commerce (Jannik Devantier)
  • Xccelerate Program & Case Stories (Jannik Devantier)

As you can see – most of titles are about: partnering with Sitecore , future of Sitecore and Sitecore Modules.  There was a lot of interesting information and I am not able to provide all of them to you, but I will provide for you some of the most interesting from my point of view.

  • In the second half of the year Sitecore will provide us Sitecore 8.2 version.
  • In the beginning of the year 2017 Sitecore will provide us Sitecore 8.3 version.
  • Sitecore has decided to extend their QA team to provide for use better quality (if you have ever opportunity to create an support ticket you probably will appreciate this move from Sitecore side ;)) .
  • Sitecore will provide us a new version of Web Forms For Marketers (yes another changes in our favorite and the most stable module). In the nearest future WFFM will be a part of Sitecore – not a module as now.
  • Sitecore xDB could be run as a service (infrastructure provided by Sitecore) – but you have to remember that you can not define custom structure of data which will be stored in xDB
  • In the nearest future Sitecore will change some things in Partners program
  • Sitecore Commerce – is becoming to be the most important module for Sitecore, so we can be sure that they will change a lot of things in very short period of time
  • Sitecore eLearning platform elearning.sitecore.net (you can get Sitecore training without Sitecore certificate)
  • Sitecore’s Business Optimization Services (SBOS) – check the place of your client in the road to success “click” (great move from SBOS side)
  • Sitecore webinars – Sitecore will more often share an interesting knowledge with community
  • Sitecore Community in Poland is looking for speakers for next meetup and sponsors and everyone who somehow want to involve in our community (tricky advert ;))

I hope that some of this information will be interesting for you also.

At the end I want to also share with you one photo from Sitecore Partner Day:

Sitecore Awards Coders Center

Coders Center got some Sitecore Awards 😉 I am this first guy from the left side.

WFFM – Unlicenced control – Form Designer

When you will notice a following error message inside Form Desinger:

“ComponentArt Grid :: Unlicensed control. Click here for more information”

Which looks in following way:

2016-02-01_11h06_42

You have to know that you probably removed licence file from bin directory. The solution is very easy.

Just copy file “ComponentArt.UIFramework.lic” from sitecore installation zip file and paste it into your instance.

Everything should work.

WFFM – problem with form rendering inside form desinger

I had some problems with user interface inside wffm module. Everytime when i was trying to define value and text for drop list or other multiplechoicefield – list of defined fields were rendered outside the screen.

1

 

To resolve the issue, you have to implement the following patch:
1. Navigate to \Website\sitecore\shell\Applications\Modules\Web Forms for Marketers\Dialogs\Field types folder
2. Replace the ListItemsEditor.xaml.xml file with the attached one ( here )
3. Clear the browser cache.