4

enter image description here

I'm facing an issue on selecting certain workflow in workbox

Edit 1: the workflow that has the issue is the one in the select box that has black label , approval workflow - generic.

Sitecore 10.1.0

steps taken to resolve issue,

  1. check item name validation configuration. https://stackoverflow.com/questions/23931721/sitecore-workbox-empty-string-is-not-allowed-error

  2. push all items in that workflow to a final state using powershell script, In case content is the issue.

  3. make sure according to relevant answer here that default comment template has a value https://stackoverflow.com/questions/37201210/sitecore-server-error-in-application-empty-strings-are-not-allowed-param

tried all the above fixes,however issue still persists, If anyone has any info regarding this issue, please share with us, thank you.

Edit 2 :

enter image description here

Also extra check has been made to make sure workflow item that has the issue and all children items under it like commands, action items, has only 1 language (English by default) and only 1 version

detailed exception can be found below

Server Error in '/' Application.
Empty string is not allowed.
Parameter name: value.
Actual value was .
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.ArgumentOutOfRangeException: Empty string is not allowed.
Parameter name: value.
Actual value was .

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:


[ArgumentOutOfRangeException: Empty string is not allowed.
Parameter name: value.
Actual value was .]
   Sitecore.Diagnostics.Error.AssertString(String argument, String name, Boolean allowEmpty) +172
   Sitecore.Shell.Framework.CommandBuilders.CommandBuilder.Add(String key, String value) +64
   Sitecore.Shell.Applications.Workbox.WorkboxForm.CreateCommand(IWorkflow workflow, WorkflowCommand command, Item item, XmlControl workboxItem) +443
   Sitecore.Shell.Applications.Workbox.WorkboxForm.CreateItem(IWorkflow workflow, Item item, Control control) +2747
   Sitecore.Shell.Applications.Workbox.WorkboxForm.DisplayState(IWorkflow workflow, WorkflowState state, StateItems stateItems, Control control, Int32 offset, Int32 pageSize) +267
   Sitecore.Shell.Applications.Workbox.WorkboxForm.DisplayStates(IWorkflow workflow, XmlControl placeholder) +1300
   Sitecore.Shell.Applications.Workbox.WorkboxForm.DisplayWorkflow(IWorkflow workflow) +660
   Sitecore.Shell.Applications.Workbox.WorkboxForm.Pane_Toggle(String id) +229

[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) +132
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +146
   Sitecore.Shell.Framework.Commands.MethodCommandProcessor.Invoke(PipelineArgs args) +461
   Sitecore.Nexus.Pipelines.NexusPipelineApi.Resume(PipelineArgs args, Pipeline pipeline) +348
   Sitecore.Pipelines.Pipeline.Start(PipelineArgs args, Boolean atomic) +167
   Sitecore.Shell.Framework.Commands.MethodCommand.Execute(CommandContext context) +621
   Sitecore.Web.UI.Sheer.ClientPage.Dispatch(String command) +231
   Sitecore.Web.UI.Sheer.ClientPage.RaiseEvent() +124
   Sitecore.Web.UI.Sheer.ClientPage.OnPreRender(EventArgs e) +795
   System.Web.UI.Control.PreRenderRecursiveInternal() +200
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7479
2
  • What is name of your workflow and it's steps? Can you update the question with this. I assume that either whitespace or character like . is in the name and that's why this is failing... Oct 24, 2022 at 5:57
  • Thank you for your interest, however the workflow has a name, updated the question with the info needed Oct 24, 2022 at 8:36

3 Answers 3

2

Adding up to Anna's answer After Investigation by our principal we sent a support ticket to sitecore regarding the issue to confirm the right action to be taken we confirmed with sitecore support the issue and it truly was regarding item versions that doesn't contain a language, they said "It is likely possible that another record for same item id/field id combination exist in this table." they suggested to do a clean up for such unwanted fields using the following query against master db

delete from [VersionedFields] where Language = ''

this sorted out the issue for us and the workbox worked again without any issues. They also added "Such issue can happen when items packaged from an environment are installed in another environment where language does not exists. So, if these fields are necessary, you can create necessary language item before installing any such package."

1

Looking at the stack trace, the exception is thrown when Sitecore tries to build a list of available workflow commands for each content item and gets a command parameter with empty value.

Here is the list of all parameters from the method CreateCommand(), and the exception means that an empty value is passed for at least one of them:

CommandBuilder commandBuilder = new CommandBuilder("workflow:send");
commandBuilder.Add("id", item.ID.ToString());
commandBuilder.Add("la", item.Language.Name);
commandBuilder.Add("vs", item.Version.ToString());
commandBuilder.Add(nameof (command), command.CommandID);
commandBuilder.Add("wf", workflow.WorkflowID);
commandBuilder.Add("ui", command.HasUI);
commandBuilder.Add("suppresscomment", command.SuppressComment);

It does not say explicitly which parameter is empty but realistically it can be something with language of some content items because all other parameters are boolean and IDs. Potentially you have a content item version that uses a language that does not exist in the system or an issue with custom language setup.

5
  • Thank you for your input , Although that might have been potentially the issue, I have checked the workflow item and all It's children items that it only has 1 language (English by default) and only 1 version so unfortunately I don't think the language nor the version has something to do with the issue now Oct 25, 2022 at 10:42
  • 1
    @MohamedAbbas sorry, by "item version" I mean the actual page/content item that use this workflow. The problem is not with workflow or its child items but with a content item that uses this workflow.
    – Anna Gevel
    Oct 25, 2022 at 11:14
  • 1
    Thank you so much for answer, after investigation by our principal, we confirmed with sitecore support the issue and it truly was regarding item versions that doesn't contain a language, they said "It is likely possible that another record for same item id/field id combination exist in this table." they just we a clean up for such unwanted fields using the following query against master db --- delete from [VersionedFields] where Language = '' ---- this sorted out the issue for us and the workbox worked again without any issues Oct 26, 2022 at 9:35
  • they also added "Such issue can happen when items packaged from an environment are installed in another environment where language does not exists. So, if these fields are necessary, you can create necessary language item before installing any such package." Oct 26, 2022 at 9:39
  • 1
    @MohamedAbbas thanks for the update, I'm glad you resolved the problem.
    – Anna Gevel
    Oct 26, 2022 at 9:52
1

Thanks Mohamed, you give me very good clue.

I do have similar issue recently for my SC9 project for workbox.

I am not quite sure the cause but might be from the "approve all" issue

When I run the query "select * from [VersionedFields] where [Language] = ''", there are many records. After I refine the query as below, I got more meaningful result.

select * from [VersionedFields] where [Language] = '' and FieldId = '3E431DE1-525E-47A3-B6B0-1CCBEC3A8C98'

For my case, if I change the language to "en", it will cause the DB issue for duplicate key. After further check, there is already a record with same row, except the Value and Language. I try to delete them and the workbox back to work.

delete from [VersionedFields] where [Language] = '' and FieldId = '3E431DE1-525E-47A3-B6B0-1CCBEC3A8C98'

Helpfully it will be useful for anyone who experience the same issue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.