Archive for March, 2013

CQ5: Failure running script /etc/workflow/scripts/workitem.ecma: ReferenceError: “workItem” is not defined


If you are using custom ECMA scripts in workflows with CQ5, you may encounter an error similar to the following when executing the workflow:

*ERROR* POST /etc/workflow/instances HTTP/1.1]
Unable to execute rule /etc/workflow/scripts/workitem.ecma: Failure running script /etc/workflow/scripts/workitem.ecma:
ReferenceError: “workItem” is not defined (/etc/workflow/scripts/workitem.ecma#2) Failure running script /etc/workflow/scripts/workitem.ecma:
ReferenceError: “workItem” is not defined (/etc/workflow/scripts/workitem.ecma#2)


In an OR step for a workflow, only the workflowData, jcrSession, and workflowSession objects are available to be used within the check() function.


You should use the workflowData, jcrSession, and workflowSession objects in your ECMA script to implement the logic.

reference: (44185/CQ5-11022)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 7.3/10 (3 votes cast)

CQ5.5: Wrong default values displayed in forms with IE8


If you add show/hide rules on a Form (Dropdownlist or Radio Group) and set initial values as detailed below, the wrong default values are displayed on a publish instance in IE8.

1.) Create a new form
2.) Add two DDL components to the form
3.) Add three values (elema, elemb, elemc, …) to each DDL
4.) Set title=’Title 2′ and initial value to ‘elemb’ for 2nd DDL
5.) Set title=’Title 1′ and the initial value to ‘elema’ for 1st DDL
6.) Add the following rule (check ‘show/hide’) to Title 1: Show Title 1 if all of the following are met: Title 2 is equal to elemb
7.) Goto Preview, or Activate the page and call it on publish instance, or call it on author instance with param ‘wcmmode=disabled’

In IE 8, Title 1 is not shown (that is wrong), Title 2 displays elemc (that is wrong). If you change Title 2=elemb, then Title 1 does become visible, but with default value elemc (that is wrong).

elema is shown as default value in the first DDL and elemb in second one.


This seems to be related to a problem in IE8.

The problem does not occur in Chrome (tested with version 27), Firefox (tested with version 19) or IE9.

reference: (43824/CQ5-29485)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 10.0/10 (1 vote cast)

CRX 2.2: DelegatingObservationDispatcher: Error while dispatching events… java.lang.NullPointerException


If you are using CQ5.3/CRX2.2 you may notice the following error in the log files:

*ERROR* DelegatingObservationDispatcher: Error while dispatching events. (, line 129)
  at org.apache.jackrabbit.core.observation.EventConsumer.canRead(
  at org.apache.jackrabbit.core.observation.EventConsumer.prepareEvents(
  at org.apache.jackrabbit.core.observation.ObservationDispatcher.prepareEvents(
  at org.apache.jackrabbit.core.observation.EventStateCollection.prepare(
  at org.apache.jackrabbit.core.observation.DelegatingObservationDispatcher.dispatch(
  at org.apache.jackrabbit.core.observation.DelegatingObservationDispatcher.dispatchEvents(
  at org.apache.jackrabbit.core.observation.EventStateCollection.dispatch(


This error occurs due to an issue in Jackrabbit issue:

It occurs as the canRead() method in is checking for read access on an item that does not exist anymore.  It should therefore throw a RepositoryException, instead of resulting in an NPE.

We have had previous reports of this issue, but it did not have any effect on the server state or stability. In the later hotfixpacks for CRX, this NPE will be logged at the WARN level and not ERROR.


This has been fixed in a later release of the Jackrabbit core, version 2.4.  You can ignore this error or apply the latest crx-hotfixpack from PackageShare to resolve the problem.

reference: (43919/CRX-4113)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)

CQ5.5 SP1: Inserting variables in newsletters doesn’t work in Chrome


If you are using Chrome with CQ5.5 SP1 and attempting to insert variables into newsletters as detailed below, you may notice that the variables are not inserted as expected.

1. Open Chrome and go to http://localhost:4502/content/campaigns/geometrixx/monthly_newsletter.emailclient.html
2. Double click on a text component to open the Edit component window.
3. Click on insert to insert a variable, for example ‘Firstname’.

Result: The variable isn’t inserted, and Chrome logs a javascript error: “Uncaught error: Index size error: DOM Exception 1″.


This issue is fixed in CQ5.5 SP2.1.  Chrome is only supported in CQ5.5 SP2.1 and later versions, as we made many changes to offer Chrome support in these versions.


The procedure above works fine in Firefox and Internet Explorer.

reference: (44087/CQ5-16244)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 5.5/10 (2 votes cast)