Archive for March, 2013

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

Issue

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] com.day.cq.workflow.rule.impl.ScriptingRuleEngine
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)
org.apache.sling.api.scripting.ScriptEvaluationException: Failure running script /etc/workflow/scripts/workitem.ecma:
ReferenceError: “workItem” is not defined (/etc/workflow/scripts/workitem.ecma#2)

Reason

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

Solution

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: 5.8/10 (5 votes cast)

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

Issue

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’

Result:
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).

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

Reason

This seems to be related to a problem in IE8.

Solution
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

Issue

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

*ERROR* DelegatingObservationDispatcher: Error while dispatching events. (DelegatingObservationDispatcher.java, line 129)
 java.lang.NullPointerException
  at org.apache.jackrabbit.core.security.authorization.acl.CompiledPermissionsImpl.canRead(CompiledPermissionsImpl.java:215)
  at org.apache.jackrabbit.core.security.DefaultAccessManager.canRead(DefaultAccessManager.java:251)
  at org.apache.jackrabbit.core.observation.EventConsumer.canRead(EventConsumer.java:306)
  at org.apache.jackrabbit.core.observation.EventConsumer.prepareEvents(EventConsumer.java:158)
  at org.apache.jackrabbit.core.observation.ObservationDispatcher.prepareEvents(ObservationDispatcher.java:184)
  at org.apache.jackrabbit.core.observation.EventStateCollection.prepare(EventStateCollection.java:459)
  at org.apache.jackrabbit.core.observation.DelegatingObservationDispatcher.dispatch(DelegatingObservationDispatcher.java:126)
  at org.apache.jackrabbit.core.observation.DelegatingObservationDispatcher.dispatchEvents(DelegatingObservationDispatcher.java:99)
  at org.apache.jackrabbit.core.observation.EventStateCollection.dispatch(EventStateCollection.java:475)
 ...

Reason

This error occurs due to an issue in Jackrabbit issue: https://issues.apache.org/jira/browse/JCR-3272.

It occurs as the canRead() method in CompiledPermissionsImpl.java 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.

Solution

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: 10.0/10 (1 vote cast)

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

Issue

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″.

Solution

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.

Workaround

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)