Showing posts with label Tips. Show all posts
Showing posts with label Tips. Show all posts

Saturday, 2 July 2016

Access local AEM on https

Enabling HTTP Over SSL

Generate Key Store
  • Create a directory named ssl in the directory where the quickstart JAR file is located.
  • In the command prompt, type the following command to create the credential and keystore:
    • keytool -genkeypair -keyalg RSA -validity 3650 -alias cqse -keystore [quickstart_dir]/ssl/keystorename.keystore  -keypass key_password -storepass  storepassword -dname "CN=Host Name, OU=Group Name, O=Company Name,L=City Name, S=State, C=Country_ Code"
  • The following example generates a private/public key pair with the following properties:
    • alias: cqse
    • keystore file: cqkeystore.keystore
    • key password: password
    • keystore password: password
Read More

Sunday, 28 February 2016

Useful AEM articles

These are some of the useful kb articles of AEM
AEM 6.x
  1. AEM_6_TarMK_Online_Compaction : If you are seeing rapid repository growth on an AEM 6.x instance
  2. aem6-available-hotfixes : Adobe Experience Manager 6.0 hot fixes
  3. aem61-available-hotfixes : Adobe Experience Manager 6.1 hot fixes
  4. DisableLineChecker : Disable the CQ5 Link Checker
AEM 5.x
  1. AnalyzeMemoryProblems :  AEM over a period of time may become slower and finally runsout of memory or you see an error in the logs or in the console output OutOfMemoryError
  2. AnalyzePersistenceProblems : If CRX doesn’t start, or if there are exceptions and stack traces in the log file that are related to persistence (such as TarPersistenceManager or FileDataStore)
  3. AnalyzeSlowAndBlockedProcesses : CRX/CQ process uses 100% of the CPU, the system doesn’t respond, or the system is slow
  4. AnalyzeUnclossedSession : In AEM application, developer has to ensure the proper closure of the JCR sessions. If not, such sessions will not be subject of garbage collection and thus will stay in memory, causing out of memory issue or system slowness. Each CRX Session creates and maintains its own set of caches which adds to the overall resource consumption.
  5. AnalyzeUsingBuiltInProfiler : Sometimes the application will be running fine but only few of the process will be really slow
6. cacheentrycollector-cache-size-is-too-small : If permissions / ACLs in AEM or CRX is used extensively, then it can affect the search         performance in the repository because when search results are being retrieved they must be filtered against the permissions in the CRX repository.
7. CloneInstance : Cloning an existing instance
8. crx-disk-and-memory-monitoring-shutdown-too-aggressively : CRX automatically shuts downthe repository due to a monitoring feature
9. DataStoreGarbageCollection :  to remove any unused files in the Data Store, use Garbage collection.
10. datastore-inconsistency-record-not-found : If you are facing Datastore inconsistency and seeing ‘FileNotFoundException’

Sunday, 10 January 2016

Chrome Console Magic

Chrome Console Magic
Chrome has many timesaving and neat tools built into it, many of these tools are not necessarily obvious on the surface. This post is a deeper dive into what is available. If you are not familiar with Chrome Dev Tools at all, this post is probably not for you.

$ selectors

Chrome has built-in selectors much like jquery.
On this page you will see 3 divs, two with a selector-test class and one with selector-test id.
There are 4 useful types of $ selectors in Chrome.


$() selects the first matching element. (If jquery is active on the page, it will select all matching elements). It will match classes prefaced with ‘.’, IDs prefaced with ‘#’, or regular elements such as ‘p’, 'div', etc.
Example 1 (in the console type):
Chrome returns:
  <div class="selector-test">Test selector content (.selector-test)</div>
Example 2:
Chrome returns:
  <div class="selector-test">Test selector content (.selector-test)</div>
The same div is selected in both examples as both the first item with class "selector-test" and the first div on the page.

Sunday, 6 December 2015

Simple way to restrict Image type in Pathfield xtype

Let’s say a small scenario where you want author should not be able to select any image type apart from .png. You can restrict the type of image author should select in pathfield xtype. Taking a close look at Pathfield xtype, you will notice we have an property name regex.
Regex ( regular expression ) can be used and a text message can be displayed in case regex doesn’t match. For text message we have property regexText. Here’s how you can achieve it:-
1. Add 2 highlighted properties in pathfield xtype widget
Restrict image in pathfield
regex: /\.(png)/ -> Shows that only URL with extension .png are allowed
regexText: Please choose an correct file -> This message will be displayed if regex is violated
2. Select an image with .png extension, you will notice it doesn’t shows any error
Select right image
3. Select an image with .jpg extension, you will notice it will be shown as error and on hover Regex text will be displayed. Author will not be able to submit dialog box in this situation.
Select Image 

Friday, 13 November 2015

How to Disable CRXDE and CRXDE Lite Support

To disable  CRXDE and CRXDE Lite, you need to disable the necessary bundles in  OSGI console

For the CRXDE Lite

CRXDE Lite Disable 

For the CRXDE

CRXDE Disable

How To Change Default Admin Password

1  . Open the welcome screen.(http://localhost:4502/projects.html).

2.  Click on the Tools. You will get below screen.

3. Click on the Users link.

4. Click on the Administrator link and find the account settings.

5.  Click on the change password.

 Fill the form and click OK button,

How to Start AEM/CQ5 Instance Without Sample Content

When you install a new instance of Adobe Experience Manager a bunch of content is provided as Sample content. 

You can remove sample content by 2 ways

1.     Run the CQ instance from the command line with the run mode nosamplecontent.

      For Author Instance

            java -server -XX:MaxPermSize=256m -Xmx1024M -jar aem-author-p7402.jar 
                  -r author, nosamplecontent

      For Publish Instance

            java -server -XX:MaxPermSize=256m -Xmx1024M -jar aem-publish-p7402.jar 

                  -r publish, nosamplecontent    

2.  You can  uninstall the package, as described in

     Uninstalling Packages.

It is also a recommendation to Uninstall example content and users as part of the Adobe Experience Manager 5.6.1 Security Checklist specially in your Production environment

How to Know Maven Dependency of packages/classes in AEM /CQ 5.6.1

Click on the below URL and change port to your port


Enter javax.servlet in the packages/classes field then click on the find. 

Command to Run AEM/CQ 5.6.1 Instance In Debug Mode

Command to run the CQ 5.6.1 in debug mode

                        java -Xmx1024M -XX:MaxPermSize=256M -debug -Xnoagent -Djava.compiler=NONE
            -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=30303 -jar cq-author-4502.jar 

Keyboard Shortcuts In AEM/CQ

Keyboard Shortcuts for Authoring

LocationShortcut *Description
Websites ConsoleShift-Double-Click
(on required page)
Open page in new window.
Note: this is operational if the User Properties are set to Single Window; if Multiple Windows then this is the default behavior.
Content Window (Edit Mode) - ParagraphsShift-ClickSelect multiple paragraphs.
 Ctrl-ClickSelect multiple paragraphs.
 Ctrl-CCopy selected paragraph(s).
 Ctrl-XCut selected paragraph(s).Note: The cut paragraph will not disappear until it has been pasted to the new location.
 Ctrl-VPaste paragraphs from clipboard.
 Alt-Ctrl-VPaste as reference.
 DelDelete selected paragraph(s).
 BackspaceDelete selected paragraph(s).
 Alt-right-clickForce default (browser) context menu.
Rich Text EditorCtrl-BBold
Page with a teaser component.Ctrl-Alt-cShows the client context.
Content Finder - Search boxdown-arrowTrigger a suggestions list. Needed when too few characters have been entered to trigger the list automatically (this happens when 2 or more characters have been entered).
(on a suggested path)
Select item and trigger suggestions for the selected path.
(on a suggested path)
Select item and trigger suggestions for its ancestors (as in siblings of parent).
(on a suggested path)
Select item and trigger search.
 EscClose suggestions layer.
Drag assets, drop on destinationAlt+dragThe drop action produces a new paragraph; instead of replacing the asset in the destination.

Keyboard Shortcuts for Development

LocationShortcut *Description
set in the URL.
To see timing statistics for page loading.

Handy Urls in AEM/CQ 5.6.1

AEM 5.6 - Quick Reference : 

CRX explorer   :   http://localhost:8080/crx/explorer/index.jsp

CRXDE Lite     :   http://localhost:8080/crx/de/index.jsp

Query debug tool : http://localhost:8080/libs/cq/search/content/querydebug.html

Content sync console :  http://localhost:8080/libs/cq/contentsync/content/console.html

User manager standalone ui : http://localhost:8080/libs/granite/security/content/useradmin.html

Upgrade nodetypes : http://localhost:8080/libs/cq/compat/components/ntupgrade.html

 Built in profiler  : http://localhost:8080/crx/explorer/diagnostic/prof.jsp

Tag window :  http://localhost:8080/tagging

OSGI Console

Felix  console  :  http://localhost:8080/system/console/bundles

Workflow maintenance :

Repository maintenance :  http://localhost:8080/system/console/jmx/com.adobe.granite:type=Repository

Maven Dependency for the packages/classes : http://localhost:8080/system/console/depfinder

List of adaptable  classes using the adaptTo() : http://localhost:8080/system/console/adapters

Built in profiler  :  http://localhost:8080/system/console/profiler

Sling properties : http://localhost:8080/system/console/status-slingsettings

Client Libs

Compile client libs : http://localhost:8080/libs/granite/ui/content/dumplibs.rebuild.html?rebuild=true

To know dependencies : http://localhost:8080/libs/granite/ui/content/dumplibs.html

How to debug single file Clientlibs in single file   :   ?debugClinetLibs=true


Wednesday, 11 November 2015

AEM Tips and Tricks

/crx/explorer/index.jsp  – CRX explorer
/crx/de/index.jsp – CRXDE Lite url
/libs/cq/search/content/querydebug.html – Query debug tool
/libs/granite/security/content/admin.html – New user manager standalone ui  [5.6 only?]
/libs/cq/contentsync/content/console.html – Content sync console
/system/console/bundles – Felix web admin console
/system/console/jmx/com.adobe.granite.workflow%3Atype%3DMaintenance – Felix web admin console JMX / Workflow maintenance tasks
/system/console/jmx/com.adobe.granite%3Atype%3DRepository – Felix web admin console JMX / Repository maintenance tasks
/system/console/depfinder – This new 5.6 tool will help you figure out what package exports a class and also prints a Maven Dependency for the class.
/libs/granite/ui/content/dumplibs.rebuild.html?rebuild=true – Helpful link for debugging caching problems. Wipes the clientlibs and designs and forces it to rebuild it. Thanks to Mark Ellis for this link.
/system/console/adapters – This link shows you the Adapters are registered in the system. This helps you figure out what you can adaptTo() from resource to resource.
/libs/cq/compat/components/ntupgrade.html – This link allows you to update Node Types in the system. Thanks Tamer. – Link to the external interface for the CQ Package Share.
http://localhost:4502/crx/explorer/diagnostic/prof.jsp – Shows you the built in profiler
http://localhost:4502/system/console/profiler – Shows you the built in profiler


wcmmode=DISABLED – This handy publisher parameter turns off CQ authoring features so you can preview a page cleanly
debugClientLibs=true – This will help to debug clientLibs includes
If you have more handy URL’s and or parameters that you think others should know about please comment on this blog entry and I will add them to the list.