Custom CQ5 workflow step that integrates Twitter and Jabber

-Michael Marth

As part of the IKS project each CMS vendor completes a couple of benchmarks in order to establish a baseline against which future semantic improvements can be measured. For benchmark 3 "Workflow Service" Bertrand and I chose to implement the task "Create a multi-channel (email, SMS, instant messaging, Twitter,...) notification service for workflow transitions". We have created an automated workflow step that can be inserted into a custom workflow and either send an e-mail, send a direct message on Twitter or send a chat message on GTalk/Jabber. The corresponding message's payload is the path to the content node in the workflow plus an optional custom text.

...

........

Read the full blog post at Adobe Digital Marketing Blog

Adobe CQ/AEM support tools available

-David McMahon

We have recently published a package with support tools that can be useful to help diagnose issues encountered with Adobe Experience Manager.  As the tools project continues to mature, additional tools will be provided to ease the overall diagnosis and maintenance of CQ.

...

......

Read the full blog post at Adobe Digital Marketing Blog

Ways to access your content with JCR (part 1)

- Jörg Hoh

If you are a developer and need to work with databases, you often relay on the features your framework offers you to get your work done easily. Working directly with JDBC and SQL is not really comfortable, writing “SELECT something FROM table” with lots of constraints can be tedious …

The SQL language offers only the “select” statement to retrieve data from the database. JCR offers multiple ways to actually get access to a node:

Each of these methods serve for different purposes.

  • session.getNode(path) is used, when you know exactly the path of a node. That’s comparable to a “select * from table where path = “/content/geometrixx/en” in SQL, which is a direct lookup of a well-known node/row.
  • node.getNodes() returns all child nodes below the node. This method has no equivalent in the SQL world, because in JCR there are not only distinct and independent nodes, but nodes might have a hierarchical relation.
  • The JCR search is the equivalent of the SQL query, it can return a set of nodes. Yes, ANSI SQL 92 is much more powerful, but let’s ignore that for this article, okay?

...

----------

Read the complete post on the Things on a content management system blog.

CQ coding patterns: Sling vs JCR (part 2)

- Jörg Hoh

In the last posting I showed the benefits of Sling regarding resource access over plain JCR. But not only in resource access both frameworks offer similar functionality, but also in the important area of listening to changes in the repository. So today I want to compare JCR observation to Sling eventing.

JCR observation is a part of the JCR specification and is a very easy way to listen for changes in the repository.

@component (immediate=true, metatype=false)
@service
class Listener implements ObservationListener {

  @Reference
  SlingRepository repo;

  Session session;
  Logger log = LoggerFactory.getLogger (Listener.class);

  @activate
  protected void activate () {
    try {
      Session adminSession = repo.loginAdministrative(null);
      session = adminSession.impersonate (new SimpleCredentials("author",new char[0]));
      adminSession.logout();
      adminSession = null;
      session.getObservationManager.addEventListener( this, // listener
        NODE_CREATED|NODE_DELETED|NODE_MOVED, // eventTypes
        "/", // absPath
        true, // isDeep
        null, // uuid
        null, //nodeTypeNames
        true // noLocal
      );
    } catch (RepositoryException e) {
      log.error ("Error while registering observation", e);
    }
  }

  @deactivate
  protected void deactivate() {
    session.getObservationManager.removeListener(this);
    session.logout();
    session = null:
  }

  private handleEvents (Events events) {
    while (events.hasNext()) {
      Event e = events.next();
      … // do here your event handling
     }
  }
}

In JCR the creation of an observation listener is straight forward, also the event listening. The observation process is tied to the lifetime of the session, which is started and stopped at activation/deactivation of this sling service. This kind of implementation is a common pattern.

...

------

Read the complete blog post at  http://cqdump.wordpress.com/2012/11/13/cq-coding-patterns-sling-vs-jcr-part-2/

   

CQ5 coding patterns: Sling vs JCR (part 1)

- Jörg Hoh

CQ5 as a complex framework is built on top of various other frameworks, on the server-side the most notably ones are JCR (with its implementation Apache Jackrabbit) and Apache Sling. Both are very powerful frameworks, but both of them have some overlap in functionality:

In these 2 areas you can work with both frameworks, and achieve good results with both. So, the question is, in what situation should you prefer Sling and in what situation pure JCR.

First, and I hope you agree here, in 99% of all cases use the an abstracted framework is recommended over the use of concrete technology (everybody uses JDBC and noone a direct database interface for e.g. MySQL) . It usually offers more flexibility and an easier learning cure. Same here. While on pure JCR you only work with raw repository structures (nodes and properties), the Sling resource abstraction offers you easier handling (no need to deal with the repository exceptions any more) and much more options to interact with you business objects and services.

...

-----------

Read the complete blog post at http://cqdump.wordpress.com/2012/11/06/cq5-coding-patterns-sling-vs-jcr-part-1/

How to manage Hot backup Or Manage Disaster Recovery in CQ

- Yogesh Upadhyay

There are various approach, I am listing them with pros and cons

Approach 1: Use clustering, but direct the requests only to one node. In case of problems with this node just switch over to the other node. Essentially this is an active-passive scenario.

+ proven technology, documented and fully supported feature

+ automatic fail over easily possible

- additional license cost

- Latency issue might effect performance

- Managing cluster is sometime difficult

...
------

Read the complete post at the Adobe CQ/Adobe WEM blog.

Configuring the Adobe CQ Dispatcher

Over the past couple of weeks, we’ve created content that addresses several top questions related to the Adobe CQ Dispatcher. This is in response to questions we’ve heard from you, our community. I encourage you to give a read and also check out the more in-depth documentation I link to further below.

——-

Read the complete post at The Experience Delivers blog

Some CQ tips and tricks

Check out some useful tips and tricks published as part of the CQ Best Practice content series:

  • Useful variations in the authoring environment URL
  • Troubleshoot CRXDE performance issues
  • Advanced CRX search
  • Validate user input in multifield components
  • Define how users can interact with a component
  • Include resources in JSP files

Read the article here: http://helpx.adobe.com/content/help/en/adobe-cq/using/tips-tricks.html

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

- David McMahon

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)

-------

Read the original post at the Adobe Enterprise Product Blog.

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

- David McMahon

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 in the file-name (e.g. GeoSphere_D a tasheet.pdf).  Such file-names are being parsed by a URL encoder and the spaces get converted to the %20 code at the wrong place.

...

----------

Read the workaround at The Adobe Enterprise Product Blog.