Posts in Category "CQ"

CQ5: new page/site buttons disabled in WCM siteadmin

Issue

If you are using WCM siteadmin and wish to create a new page/site using the available buttons, they may appear disabled so that you are unable to click on them.  Firstly, you should check your permissions for these actions and/or check with an administrator or admin account.  If these problems persist it may be related to an issue in your repository structure.

Reason

These buttons can also be disabled if there is an invalid Page node in the /content tree.  A cq:Page node must have a child named jcr:content of type cq:PageContent, otherwise it is invalid and can lead to this issue.  The root /content node is not of type cq:Page and therefore does not require a jcr:content child of type cq:PageContent, but every other Page node below /content should have this structure.

It seems that if the invalid node is a top-level page/site in the content tree (e.g. /content/geometrixx) then it will affect the site actions for all other top-level nodes, and other nodes in that specific tree.
If the invalid node is a sub node (e.g. /content/geometrixx/en/services), then it seems to only affect the site actions for that level in that tree.

Such invalid nodes can appear in the tree if they were created outside of WCM (i.e. using CRXDE, or Content Explorer), or by importing a package containing such invalid nodes.

Solution

Check your content tree for such invalid page nodes, and repair the nodes as required, by creating a jcr:content child node of type cq:PageContent.

reference: (37890)

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

CQ5.5: javax.jcr.RepositoryException: Unable to register data store in cluster

Issue

If you are installing and starting a new CQ instance you may experience the following exception:

*ERROR* [FelixStartLevel] org.apache.jackrabbit.core.RepositoryImpl failed to start Repository: Unable to register data store in cluster.
javax.jcr.RepositoryException: Unable to register data store in cluster.

Caused by: java.net.UnknownHostException: <server_hostname>: <server_hostname>
at java.net.InetAddress.getLocalHost(InetAddress.java:1360)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:211)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:218)
… 56 more

Reason

This typically happens if the name returned by the “hostname” command cannot be resolved.

Solution

Add the following entry to /etc/hosts (replacing <server_hostname> with the hostname of the server where the CQ instance is running):

127.0.0.1 <server_hostname>

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

CQ5.5: NullPointerException for wcm-mobile-core after installing SP1 or SP2.1

Issue

If you have installed CQ 5.5 SP1 or SP2.1 and restarted the instance you may notice the following exception in the logs on startup:

ERROR [Background Update com.day.cq.wcm.cq-wcm-mobile-core (219)] com.day.cq.wcm.cq-wcm-mobile-core [com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter]
The bindStats method has thrown an exception (java.lang.NullPointerException) java.lang.NullPointerException
at com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.bindStats(RedirectFilter.java:173)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:227)
at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:38)
at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:591)
at org.apache.felix.scr.impl.helper.BaseMethod$NotResolved.invoke(BaseMethod.java:548)
at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:472)

Reason

This error is caused by an issue in the mobile redirect servlet in SP1 and SP2.1.  It will only affect this servlet, which gathers usage statistics on various categories of mobile devices.

Solution

If you do not require a fix for this servlet you can ignore this error.  The issue is currently scheduled to be fixed in the next service pack for CQ5.5.  If you require an urgent solution to this issue you can contact support through Daycare.

reference: (CQ5-18788/NPR-2071)

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

CQ5.5: Invalid links to DAM assets containing spaces in the file-name

Issue

If you are using the CQ5.5 authoring environment to add links to DAM assets through the rich-text editor dialog by drag-and-drop, then you may notice that some of these links will be marked invalid after clicking OK on the dialog.

A invalid link appears like the “banking” text below, whereas a valid link appears like the “investors” text.

You may also see errors similar to the following in the error.log:

*ERROR* [0:0:0:0:0:0:0:1 [1344244721052] GET /libs/wcm/core/content/pageinfo.json HTTP/1.1] com.day.cq.wcm.core.impl.servlets.PageInfoServlet Request path does not resolve to a resource: /content/dam/geometrixx/documents/GeoSphere_D%20a%20tasheet.pdf

Reason

The links are marked invalid when the assets in DAM contain spaces, or other characters such as !%$üäö, in the file-name (e.g. GeoSphere_D a tasheet.pdf).  Such file-names are being parsed by a URL encoder and the characters get converted by a URL encoder at the wrong place.

Workaround

You can workaround this issue by creating the link with the in-place editor, and also creating the link manually using the link button in the rte dialog, and selecting the document through the browse function. Only drag&drop directly onto the text in the rte dialog is not working.

Solution

This is a product issue with the rich-text widget and has been fixed in later product versions.

If you wish to resolve this issue in CQ5.5 you should contact support through Daycare and request hotfix “cq-5.5.0-hotfix-2390-1.zip”.  This hotfix has dependencies on other components, so the support team can advise you on installation order and requirements.

reference: (37103/NPR-2390)

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

CQ5.5: MCM emails contain URLs to author instead of publish

Issue

If you are using the Newsletter feature in MCM to send emails to lists of contacts you may notice that the URLs for assets in the email are pointing to the author instance, rather than the publish instance.  The links to the author instance will not work for external users, so the assets in the email will not show up.

Reason

This is a documentation issue as there is some further configuration required to substitute the links in the newsletter email so they point to the publish instance, rather than the author instance.  This will be addressed in a later version of CQ.

Solution

To resolve this issue in the meantime you should do the following steps:

  1. login to the system console on author (e.g. http://localhost:4502/system/console/configMgr)
  2. in the configuration tab search for the “Day CQ MCM Newsletter” bundle and open it
  3. take note of the fake host name in “Lookup for Sender Host” field (by default it is –publish–), i.e. the field should have http://–publish– in it
  4. open CRXDE Lite and goto /etc/map/http
  5. create a Node named –publish– of type sling:Mapping
  6. add a String property sling:match with value –publish–.80
  7. add a String property sling:redirect with value of your publish instance host name or IP including port(e.g. http://publishhost:4503)
  8. click Save All

Now when you send the newsletter it should substitute the author URL with the publish URL.

reference: (37433/CQ5-15440)

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

CQ5.5 SP1: MalformedPathException: ‘:redirect’ is not a valid path. Prefix must not be empty

Issue

If you have updated to CQ5.5 Update 1 and you attempt to access a user profile page, for example the admin profile, as follows:

http://<server>:<port>/home/users/a/admin/profile.form.html/content/geometrixx/en/toolbar/profiles/edit
or
http://<server>:<port>/home/users/a/admin/profile.form.html/content/geometrixx/en/toolbar/profiles/view

you will see the following exception in the error.log:

*ERROR* GET /home/users/a/admin/profile.form.html/content/geometrixx/en/toolbar/profiles/edit HTTP/1.1] com.day.cq.wcm.core.impl.WCMDebugFilter Exception:  org.apache.sling.api.scripting.ScriptEvaluationException:
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:385)

Caused by: java.lang.IllegalArgumentException: javax.jcr.RepositoryException: Failed to resolve path :redirect relative to node /home/users/a/admin/profile

Caused by: org.apache.jackrabbit.spi.commons.conversion.MalformedPathException: ‘:redirect’ is not a valid path. Prefix must not be empty

Reason

This issue is caused by a regression in the 2.1 version of Sling which has been integrated with CQ5.5 SP1: https://issues.apache.org/jira/browse/SLING-2518

The issue does not occur with the 2.0.10 version of Sling included with CQ5.5.

Solution

This issue will be resolved in the next release of CQ5.5 SP2.

reference: (37322/CQ5-18799)

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

CQ5.4: how to force a delay between workflow steps

Information

If you are using workflows in Adobe CQ5.4 you may wish to have a customized delay between certain workflow steps.  It is possible to cause a delay using the timeout functionality which has pre-defined values (immediate, 1h, 2h, 6h etc…), and then select the Auto Advance timeout handler to move the workflow to the next step.

In some cases you may also want to define your own delay intervals rather than use the pre-defined values.  This is possible in CQ5.4 by creating an overlay of:

/libs/cq/workflow/components/model/step/tab_common/items/timeout/items/timeout/options

to:

/apps/cq/workflow/components/model/step/tab_common/items/timeout/items/timeout/options

and then you can make a copy of one of the existing nodes (1h, 2h etc…), and change the values to suit your needs.  The value should be in seconds and not milliseconds.

This new value will then appear in the workflow step configuration dialog, under the list of timeout values, and the step will timeout after the specified interval.

reference: (37175)

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

CQ5: Loading an image from a resource in a custom image renderer

Issue

If you are using a custom image renderer to handle image renders, you may notice that you cannot create a valid Image object from a referenced Asset in the DAM.  You are probably using code similar to the following:

//Note c is an ImageContext object
Resource r = c.request.getResourceResolver().getResource("/content/dam/geometrixx/travel/train_station_woman.jpg");
Image i = new Image(r);
if (!i.hasContent()) {
    resp.sendError(HttpServletResponse.SC_NOT_FOUND);
    return;
}

In the example code snippet above, hasContent() will always return false.

Reason

You cannot simply create an image or a layer directly from an image/file resource as obtained from the resolver.  You must first use the Asset class to get a rendition of the image.  Then you can work with that.

Solution

Use code similar to the following

//Note c is an ImageContext object
Resource  r = c.request.getResourceResolver().getResource("/content/dam/geometrixx/travel/train_station_woman.jpg");
Asset a = r.adaptTo(Asset.class);
Layer layer = ImageHelper.createLayer(
      c.node.getSession(),
      a.getCurrentOriginal().getPath()
)

reference: (36895)

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

CQ5.4: How to display a confirmation dialog when activating pages

Issue

If you are using CQ5.x you will notice that there is a confirmation dialog for deleting/deactivating pages in the WCM console.  No such confirmation dialog is presented when you activate a page.  In some projects it may be a requirement to present such a confirmation dialog for activation also.

Solution

You will have to overlay:
/libs/cq/ui/widgets/source/widgets/wcm/SiteAdmin.Actions.js
to
/apps/cq/ui/widgets/source/widgets/wcm/SiteAdmin.Actions.js
Create the same folder structure in apps and then copy the SiteAdmin.Actions.js node from libs to the same folder in apps. This will ensure the jcr:content node under the JS file is also copied.

Then edit the SiteAdmin.Actions.js from apps.  You should replace the CQ.wcm.SiteAdmin.activatePage function with the lines (435-520) from this SiteAdmin.Actions.js file.

Note

Ideally you should not not completely overlay the siteadmin.Actions.js as you might run into problems when a SP brings a new SiteAdmin.Actions.js with it. Instead just overlay the function you want to change.  Use the clientlib approach and create a new JS file, attach it to the same clientlib as the SiteAdmin.Actions.js and redefine the function you want to change in that new JS file.

reference: (35823)

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

CQ5.4: Files uploaded to DAM saved with incorrect mime-type

Issue

If you are uploading specific types of files (Word, PPT, SWF….) to CQ5 DAM, you may notice the the files are saved to the repository with a different mime-type, for example as images.

You may also notice warnings and errors in the error.log similar to the following:

*WARN* [JobHandler: /etc/workflow/instances/2012-06-20/model_171459455015372:/content/dam/geometrixx/documents/slides.ppt/jcr:content/renditions/original] com.day.cq.dam.commons.handler.StandardImageHandler extractImageInfo: error while reading metadata from image [/content/dam/geometrixx/documents/slides.ppt]:  org.apache.sanselan.ImageReadException: Can’t parse this format.
    at org.apache.sanselan.Sanselan.getImageParser(Sanselan.java:621)
    at org.apache.sanselan.Sanselan.getImageInfo(Sanselan.java:587)
    at org.apache.sanselan.Sanselan.getImageInfo(Sanselan.java:479)
    at com.day.cq.dam.commons.handler.StandardImageHandler.extractImageInfo(StandardImageHandler.java:207)
    at com.day.cq.dam.commons.handler.StandardImageHandler.extractMetadata(StandardImageHandler.java:244)
    at com.day.cq.dam.commons.handler.StandardImageHandler.extractMetadata(StandardImageHandler.java:145)
    at com.day.cq.dam.core.process.ExtractMetadataProcess.execute(ExtractMetadataProcess.java:65)

*ERROR* [JobHandler: /etc/workflow/instances/2012-06-20/model_171459455015372:/content/dam/geometrixx/documents/slides.ppt/jcr:content/renditions/original] com.day.cq.dam.core.impl.cache.CQBufferedImageCache Error while loading image /content/dam/geometrixx/documents/slides.ppt/jcr:content/renditions/original: javax.imageio.IIOException: No decoder available to load the image
*ERROR* [JobHandler: /etc/workflow/instances/2012-06-20/model_171459455015372:/content/dam/geometrixx/documents/slides.ppt/jcr:content/renditions/original] com.day.cq.workflow.impl.job.JobHandler Process execution resulted in an error: java.io.IOException: No decoder available to load the image com.day.cq.workflow.WorkflowException: java.io.IOException: No decoder available to load the image
    at com.day.cq.dam.core.process.CreateThumbnailProcess.execute(CreateThumbnailProcess.java:145)
    at com.day.cq.workflow.impl.job.HandlerBase.executeProcess(HandlerBase.java:172)
    at com.day.cq.workflow.impl.job.JobHandler.process(JobHandler.java:122)
    at org.apache.sling.event.jobs.JobUtil$1.run(JobUtil.java:272)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: No decoder available to load the image
    at com.day.cq.dam.core.process.CreateThumbnailProcess.execute(CreateThumbnailProcess.java:126)
    … 6 more

Reason

This is a product bug in CQ5.4 and earlier versions, as it does not correctly handle the dc:format metadata property in particular files.  When these documents contain images with dc:format=image/jpeg, CQ assumes that this property applies to the whole document. Therefore the file gets uploaded into /content/dam with a node ‘metadata’ which has property dc:format=image/jpeg.

Solution

The issue has been fixed in CQ5.5 as we have re-engineered the component responsible for handling the mime-type detection for files uploaded to DAM.  When you update to CQ5.5 you will have the final solution to this issue.

As a workaround for earlier versions you should follow these steps:
1. create a file reset-mimetype.ecma under etc/workflow/scripts
2. use the script in the attached file: reset-mimetype.ecma
3. save it
4. edit the workflow model (“DAM Update Asset” workflow)
5. add a “Process step” after the “Metadata extraction” step
6. edit the “Process step”
7. select the etc/workflow/scripts/reset-mimetype.ecma script
8. select the “Handler Advance” checkbox
9. save the workflow
Now the file formats should be correctly identified when uploading to DAM.

reference: (35508/CQ5-13504)

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

CQ 5.5 Update 1: Service unavailable – AuthenticationSupport service missing. Cannot authenticate request.

Issue

CQ 5.5 Update 1 is now available on PackageShare.  If you have installed CQ 5.5 Update 1 you may encounter the following error in the error.log after restarting the CQ instance:

*ERROR* [0:0:0:0:0:0:0:1%0 [1340016598398] GET / HTTP/1.1] org.apache.sling.engine.impl.SlingHttpContext handleSecurity: AuthenticationSupport service missing. Cannot authenticate request.

Reason

After installing the Update 1 package, an info dialog appears which advises to “restart the instance”.  If you restart the instance immediately after the dialog appears, you will run into this problem.  Even after the dialog appears, the package keeps on installing behind the scenes.  This process is interrupted if the instance is restarted at this point.

You should wait until the installation has completed before restarting CQ5, checking the activity in error.log.  Once the error.log becomes quiet (after approx. 5 mins) it is safe to restart the instance.

Solution

After installing Update 1 check that all OSGi bundles have the status “ACTIVE” in the OSGi console.  Start any bundles that do not have the “ACTIVE” status and this should resolve the issue.

If the issue persists, you may have to reinstall CQ5 from a fresh copy, install the update 1 package, restart (wait until error.log shows no more activity) and finally reinstall your installed packages manually.

reference: (CQ5-18534)

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

CQ5.5: Upgrade recommendations and information

This information will be useful if you are planning to upgrade your CQ environment to CQ5.5. This information is intended as a supplement to the official upgrade documentation:  http://dev.day.com/docs/en/cq/current/deploying/upgrading.html

You should read these recommendations, and then follow the steps in the upgrading documentation, applying the added suggestions here as required.

Trial migration

It’s better to first run a dry-run migration on a clone of UAT (author & publish instances) to ensure that there are no major issues in the upgrade process. Check if there are any changes needed for your code to work on the upgraded version. In this case, change the code and ensure you have a consistent process for applying those changes. Identify any high risk areas in the code and plan for extended testing time on these areas following the upgrade.  Repeat the steps from scratch on the UAT clone so that you’ll be sure to have a consistent end-to-end process for the upgrade. Then proceed to upgrade all the environments: DEV, UAT & PROD.

Preparation

  • Create a clone of the instance to upgrade.  You’ll perform the upgrade on the clone. It will be easier to rollback in case of problems.
  • Perform a full consistency check on the repository early.  Fix any problems before attempting the upgrade/migration.
  • Read the extensive list of “Tips and Troubleshooting” in the upgrade documentation and apply the recommended changes to avoid these common problems.
  • The code-base has to be frozen before the upgrade process and all the existing bugs closed. In case it’s not possible to close all bugs, keep a detailed list of them and double check them on the upgraded version.
  • Only do 1:1 migrations. Only introduce new product features for editors/business later. This will let you focus on the migration itself and any regressions.
  • Try to get dedicated hardware for all environments (PROD + staging), this gives you much more flexibility.
  • Involve Adobe consulting if required.  This will ensure a smooth migration process adhering to best practices.
  • Compile a list of all connected systems and involve those teams in the migration planning.  Ensure they have a short turn-around time in case of issues.
  • Purge workflow history (this speeds up the update process).
  • Make sure all workflow tasks are finished (none are running).
  • Make sure you have at least 1024MB Heap configured during update.
  • Clean all the logs to make it easier to isolate upgrade issues.
    • crx-quickstart/logs/*
    • crx-quickstart/server/logs/*

Post-upgrade

Tests should cover complete authoring workflows and not just the correct rendering of templates.

Check ACLs and permissions (especially when updating from 5.2.1).

Check Workflow models – check if any customizations were overwritten.

Check all forms and form actions (especially when updating from 5.3 or older).

Production upgrade

After performing the upgrade process on a UAT instance, once you are ready to upgrade the production instances, there shouldn’t be any major/unexpected issues. The code-base should already be frozen and in a good state, and you should freeze out content changes also. Only urgent changes should be applied to the content and the author team will need to keep track of all updated pages. These can then be moved later with a package.

1. Follow all the steps documented in the upgrade docs.

2. Sign-off the environments.

3. Migrate the latest content changes (if needed).

4. Switch the instances.

5. Delete all the dispatcher(s) cache.

It’s better to keep the old instances available for a while in case of problems not encountered during all the documented steps.  You should plan enough time for bug fixing following the production upgrade.

reference: (35335)

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

CQ5.5: Members of administrators group not able to unlock pages from other users

Information

Only the user who locked the page, or the “admin” user, can unlock it.  Members of the administrators group, apart from the “admin” user, cannot unlock pages which were locked by other users.

The documentation (http://dev.day.com/docs/en/cq/current/wcm/page_publish.html#Locking%20Pages) states:

You can only unlock locked pages if you locked the page or if you have administrator privileges.

This may be misleading, as it is not sufficient to have administrator privileges (i.e. general members of the administrators group).  Only the “admin” account has the correct privileges.

How to unlock a page

It is possible to unlock a page using the sidekick in WCM, or using Content Explorer.

1. Using the sidekick

Log into CQ as the user who locked the page or the “admin” user.

Open the page that is currently locked in the WCM Websites panel.

In the sidekick, select the Page tab and then “Unlock Page”.

2. Using Content Explorer (http://<server>:<port>/crx/explorer)

Browse the tree to the locked page.

Right-click on the jcr:content node below the locked page.

Select “Unlock” from the context menu.

reference: (35128/CQ5-18339)

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

CQ5.5: ‘uu’ is undefined javascript error in widgets.js

Issue

If you add a datetime or datefield Widget to a component dialog (e.g. /apps/geometrixx/components/title/dialog/items) in CQ5.5, you may encounter a javascript error on the page when you open the dialog, enter a date and submit it.  Your other changes in the dialog will not be displayed (e.g. the updated title will not displayed).

The javascript error says “uu is not defined” .

Reason
This is caused by an error in the JS code in
/libs/cq/ui/widgets/source/undo/UndoHistory.js (line 921).
There is an undefined variable “uu” used here.

Solution

This is a bug in CQ5.5 and will be fixed in a future release.

Workaround

A workaround would be to add a definition for “var uu = CQ.undo.util.UndoUtils;” before that variable is called.

1. create an overlay of /libs/cq/ui/widgets/source/undo/UndoHistory.js to /apps/cq/ui/widgets/source/undo/UndoHistory.js
2. open /apps/cq/ui/widgets/source/undo/UndoHistory.js
3. goto line 921
4. paste the following code into line 921:

var uu =CQ.undo.util.UndoUtils;
5. line 922 should now have:

var dateValue =uu.parseDate(originalValue);
6. save the file

reference: (33913/CQ5-17726)

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