Saturday, 3 December 2016

Merge child branch with master

Merge master into the development first so that if there are any conflicts, I can resolve in the development branch itself and my master remains clean.

(on branch child)$ git merge master
(resolve any merge conflicts if there are any)
$ git checkout master
$ git merge child(there won't be any conflicts now)


Dispatcher serving, but not caching - request contains authorization

Problem:
Dispatcher is configured but pages are not getting cached due to request containing authorization.

Error:
[Thu Dec 03 7:58:58 2012] [D] [820(139934505617152)] no cache due to authorization header.
[Thu Dec 03 7:58:58 2012] [D] [820(139934505617152)] cache action for [http://localhost/content/geometrixx/en/toolbar.html] NONE

Solution:
By default, if the HTTP request includes an authorization header, the cache is not used. There is a property in the dispatcher.any file:

/allowAuthorized "1" - allow cache if request include authorization header.

Example:
/cache {
   /docroot "C:/Apache2/dispatcher/cache"
   /allowAuthorized "1"
   /rules {
    /0000 {
     /glob "*"
     /type "allow"
    }
   }
  }

Note: See how to configure dispatcher

Friday, 2 December 2016

Uploading assets using FTP job scheduling

You can upload assets from an FTP site to Adobe Experience Manager (AEM) Assets using the FTP job scheduling feature. You can either upload an asset immediately or schedule a periodic upload job at a particular time.
The FTP site is already configured in AEM Assets. You should have the required FTP credentials to connect to the site.

See the FTP Upload video from Adobe TV.

Configure dispatcher for AEM

Create simple Author -> Publish -> Dispatcher configuration on developer's box (not production). Assuming Author aem is running on port 4502 and Publish aem on port 4503, this post is on adding & configuring dispatcher module on Windows Apache 2.2 Http Server running on port 80. For product documentation on configuring dispatcher check this page and this page

Author - Create Page

1) Start by creating a template on author or download this sample package (contains template Basic Template); installing it creates the following structure (/apps/samples) in CRX (http://localhost:4502/crx/de)

Thursday, 1 December 2016

Create a Nested Multi-Field CQ Dialog Widget

Nested multi-field cq dialog widget  or custom Adobe Experience Manager (AEM) component is one that uses a nested multi-field control located in a dialog. A nested multi-field control is an inner multi-field control within an outer multi-field control and lets an author dynamically enter data. 

For example, assume the AEM control lists developers and each developer has an unknown number of skills to display. That is, within the inner multi-field, the author enter details such as professional skill set. The outer multi-field determines how may developers to display. 

Lets create Nested multi-field cq dialog widget as shown below:

Implement 301 and 302 Redirect in AEM

Adobe Experience Manager(AEM) SEO best practices suggest use of 301 or 302 redirect in AEM.

Difference Between 301 and 302 Redirect 


Status code 301 means that this webpage no longer exists, the engine search for location header in response pick the new URL and replace the indexed URL with the new one and also transfer page rank.

Note:- In case of 301 redirect browser cache the mapping of new url with old url. 

Status code 302 tells the crawlers or browser to redirect this webpage temporarily to the new location and crawl both of the pages. The old webpage URL still exists in the search engine database and when we make hit to new URL , it always attempts to request both the old location and new location and crawl it.

Note:- In case of 302 redirect browser does not maintain any mapping or cache. So, server receives hit for both the url’s.