Ask Me ?

Hi Readers,

Here you may comment all the questions/ doubts which you encountered during your journey for AEM. I will try my best to help you out and might connect with you to solve them too.

Also you may post interesting questions which you went through during your respective interviews , and I will try to answer them and thereby increase the Question Bank for masses.

So go ahead and post the questions !!

Thanks a lot .


435 thoughts on “Ask Me ?

  1. Hi Hashim,

    We have a requirement where the links on blueprint needs to be updated for proper locale link in live copy.

    We created the DAM assets structure similar to site structure and placed similar PDF for “en” and “es” locale. Currently only two locales (English and Spanish).

    {/content/dam/testdemo/en and /content/dam/testdemo/es}

    I created a page with text “Click here” and added hyperlink for PDF from en folder. When live copy is created, the link still points to PDF from en folder.

    Page hierarchy (Blueprint): /content/testdemo/en/toolbar/testlink

    Live copy: /content/testdemo/es/testlink

    Requirement is that in live copy (in es folder) link should automatically update to point to similar PDF from es folder.

    Is this OOTB? then please help the configuration required. I used “Standard rollout config” while creating the live copy.

    If customization is needed, please guide with approach. Any links for examples with be appreciated.



  2. Hi All,

    I have one query please help me out..

    Project–>components–>content–>components(demo)–>dialog–>item–>(properties–name–./header) for the xtype -> textfield we can fetch the value in jsp through below code.

    but when we use same processes for xtype–> multicompositefield then the same code is not working

    so pls let me know the code or tips for fetch the multicompositefield value in jsp page.


    • Hi, I couldn’t see what code you are using. But you can debug this easily – do check how the property is getting saved in multi-field . It should be different from textfield. You have to write code which can read from that multi-field property.


  3. Hi Hashim,
    I’m working in a version upgrade project from CQ5.5 to AEM 6.2. The issue is with the services, after installing the same code package in couple of author instances. One of them is working fine and in another instances some of the services were missed, this has been observed when I expand the bundle->used services block. Unable to figure out why the services were missed, this is our custom service not OOTB.


    • Hi, Is there any error message while installing the web services ? Are you able to reproduce the issue in your local instance ? From 5.5 to 6.2 there were lots of methods which were deprecated and there could be some dependency mismatch. Closely observe the logs for Errors and Warnings.


  4. Hi Hashim,

    I have written a service, i have configured that as a component and service in osgi using annotations.
    every thing fine but when i deploy that service into osgi and triggering that service using scheduler. but when i see that configuration in components tab.The configuration status shows enabled/unsatisfied mode for scheduler and our class configuration. can you please help out. i am using aem 6.0 (sp3) version. Bundle is in active mode.


  5. Hi Hashim,

    I am using AEM 5.6.1 service pack 2. Please suggest which Java version should I use? Is there some Performance slowness on Java 7 for AEM 5.6.1 SP2 or should I upgrade my java?


    • Hi, For AEM 561 , Java 1.7 is recommended. Performance slowness could be due to lots of reasons. Upgrading your java might not solve the issue. Its more related to Maintenance and Health of the environment.


  6. What causes the querybuilder to not return results on a publish instance?
    Currently I have a query built to pull assets out of the dam by a specific location and by a set of tags. The query works on my authoring instance but does not work on my publish. I’ve validated that the assets and the tags are published. As well as well anonymous access is allowed. What else is missing?


    • Hi Carolyn,
      Can you try to fire the query in Publish instance using /libs/cq/search/content/querydebug.html ?
      Check the logs, what is missing on publish instance. Check if all the data is same in author and publish instance. If you are using dispatcher check if proper filters are present there.


      • Thank you Hashim.
        Yes I have been using the query debugger to make sure that my query is correct and there isn’t anything wrong with the parameters I am using. I am able to get results on author for the parameters I am using in the debugger.

        After looking into the logs it was giving an error about not being able to delete an old tar file from “C:\aem\author\crx-quickstart\repository\segmentstore\”.
        Error from log:
        “org.apache.jackrabbit.oak.plugins.segment.file.FileStore TarMK GC: Failed to remove old file C:\aem\author\crx-quickstart\repository\segmentstore\data00057v.tar. Will retry later.”

        I’ve renamed the file to tarOLD but now the error has moved to “C:\aem\author\crx-quickstart\repository\segmentstore\data00057w.tar” . However, if I rename “data00057w.tar” to tarOLD I get a 500 error on the authoring instance. Both “data00057w.tar” and “data00057v.tar” are very old, dated 3/10/2017, since then I have the latest of 4/11/2017 “data00087a.tar”.

        Why is it trying to use such old tar files and how can I make author and the publish instance point to the latest of 4/11/2017 “data00087a.tar”?

        Liked by 1 person

  7. Hi Hashim ,
    Thanks for supporting . Actually we need a multiple choice questions such as Exam pattern for to test and as well as to prepare the Question paper for exam .
    and am waiting for your reply…




  8. Hi,

    If I configure from OSGi bundle configuration console , configuration files is stored under “/apps/system/config”.
    1) Does the configuration under config folder is applied for both author and publish instance

    2) If yes then how will they we connected?
    If no? Do I need to package and install in publish.
    3)If I have configuration under config.publish of author instance, Does this configuration available on publish?


    • Hi Raghave,
      Its always advisable to create configurations based on environment runmodes. So you should create configurations like and config.publish which are respectively applied on author and publishers.

      If a particular configuration isn’t present in both the above folders, it checks the config folder. The most matched runmode is selected. eg. if the same config is present in config, and and your environment has runmodes like author,dev , the Configurations under is picked.

      I hope it clears your understanding.


    • Hi,
      Yes you can use Query Builder Search in the payload node under /etc/workflow/instances/server0/2017-04-19/test_workflow/data/payload . There should be the path of your page.

      No such information is stored at the Page level, but the payload information is stored in the Workflow Instances.


    • Hi,
      Yes sure. There could be 2 ways to do this –
      1. Your component (JS or Controller) makes an ajax call to Servlet from the page, Servlet calls the Services which in-turn makes third party API call , process the data (Query / Ordering) as per need and return a JSON back to page to display.
      2. Your component (JS or Controller) makes an ajax call directly to the third party API , and display on the page. Assuming the third party API is responsible for data processing as per need.


  9. CQ5 wokflow Approval / Rejection Notification :
    @hashimkhan : Can you help me on below requirement.

    Requirement : I want to display some popup message for CQ workflow approval or rejection message in the form of pop up message or some dialog box message in place of normal email notifications. Can anyone guide me how to approach this ?
    Normal email notifications are not required, needs to display a popup message on workflow approval / rejection.


  10. Hi Hashim,
    we have a requirement that we have to use AEM login with j_username and j_password, but those values we have to send to a restful web-service and get the response, some said we have write our customExternalLogin extending ExternalLoginModule. can u suggest me the best way to implement this.
    Thanks in advance.


    • You have to write your Custom Authentication Handler and gave its priority above the AEM authentication handler. So whenever you will login , that Custom Authentication Handler will be called , from there you can make a call to your rest WS.


  11. Hi,

    I want to create one admin component, that allow user the capability of updating grouped contents which are similar in nature. That way user can action on one content and update all others at the same time.

    What AEM functionality should I implement here?


  12. In AEM, images of size 4 MB in DAM and these images can be 1000s , also need to be shown on mobile, what would be an efficient approach for this?
    Scenario is that I have to use 1000s images in DAM for different devices say desktop, mobile. With 4 Mb size it could cause an inefficiency while downloading an image on mobile. Can you suggest an approach for this?


  13. Hello Hasim,
    We have migrated our application from 5.5 to 6.2 recently. Could you please help us in finding solutions for the following:
    1. Our application is mainly based on content(each page have atleast 6 sublevel content and whole content size would be aroung 20-30 gb)
    2. Search functionality is used in our app using EXTJS (post extjs.form to bin/querybuilder.json) and using lens for displaying results.
    3. Search was slow in 5.5 but it became worse in 6.2
    4. Is there a way include SQL2 queries with less code changes(as our application is very huge and difficult to rewrite whole app)

    Could you please suggest to improve search either with existing EXTJS or changing to SQL2

    Thanks in Advance


  14. Hi Hashim, Is it possible to add multiple patterns of etc/map configurations with different sling matching patterns for the same domain? There is a requirement to add multiple url matching patterns to construct a redirection url, based on url matching patterns.



    • Hi Sudhakar,
      Yes you can do so. In fact all the redirects could be replaced by etc mappings using Regex redirection rules. eg :
      “jcr:primaryType”: “sling:Mapping”,

      “_SalesLeadCapture_any”: {
      “jcr:primaryType”: “sling:Mapping”,
      “sling:match”: “(?i)SalesLeadCapture/Pages/(.+).aspx$”,
      “sling:internalRedirect”: “/content/xyz/site/us/en/want-to-serve”

      “_xyzfreestyle_any”: {
      “jcr:primaryType”: “sling:Mapping”,
      “sling:match”: “(?i)xyzfree/Pages/(.+).aspx$”,
      “sling:internalRedirect”: “/content/xyz/site/us/en/xyz-free”


  15. Having issues while creating Metadata Profile in AEM 6.0. Getting the below error on the console when I hit the submit button in the “Add Metadata Profile” modal window.

    metadata:4 Uncaught SyntaxError: Unexpected token < in JSON at position 7
    at JSON.parse ()
    at exists (profilelist.js:201)
    at HTMLButtonElement. (profilelist.js:96)
    at HTMLDocument.dispatch (jquery.js:4624)
    at HTMLDocument.elemData.handle (jquery.js:4292)

    Steps to Reproduce :
    1. Navigate to /libs/dam/gui/content/processingprofilepage/metadataprofiles.html/dam/ingestion/profiles/metadata
    2. Click on “+” to create the Metadata Profile.
    3. Provide the “Title” in the modal window and click on Submit button.

    Result : Nothing happens.

    Note : I have not customized anything, using the AEM 6.0 OOTB feature.

    Please let me know if you come across the same issue. Thanks in advance.

    Referred the below link for creating the profile


    • Hi Prabodh,

      For any OOTB issue you can raise a daycare ticket. What is the error which you are getting in Console/ Logs ? Its difficult to debug without any logs or errors.

      Most probably if this is an OOTB issue you should use Vanilla instance and then upgrade to the latest Service pack for that instance with all the Hotfixes and then even if it doesn’t work raise a ticket to daycare.


  16. Hi @hashim,

    Recently we are trying to use vanity URLs in our CQ 5.6.1 with Service Pack 2.

    Vaniity URLS are working fine in publisher how ever when we are trying in dispatcher and live getting 404 Errors.

    We have followed below blog and configured every thing but still it is not working and getting 404 error.

    If I add allow rule for vanity url like { /type “allow” /glob “GET /vanitycheck.html” } then Dispatcher is looking for vanitycheck.html file inside document root path. For example if document root is content/en_us/ it is checking the url inside this path and in publisher it will be 404(ip:4503/content/en_us/vanitycheck.html).

    If I remove the allow rule then in dispatcher log it is saying filter rejected the URL.

    Are we missing any thing more from the above blog. Please help.



  17. This is regarding connectivity of Marketing Cloud with the Mobile Application.
    We have AEM as backend and the Front end is handled by another team. We introduced Marketing Cloud to hold the assets. Cloud and AEM DAM Assets have been synchronized.
    Now, We need to connect the third party(IOS Mobile App) with the Marketing Cloud to access the assets there.
    Whenever attempted from front end, it preempts for a login since the asset URL requires Authentication. We do not have any connectivity between the Marketing Cloud and the App yet for the authentication.
    We need to make sure that whenever the Mobile Application hits a Cloud asset URL, it should not pre-empt for login.


  18. Hi Hashim,
    in our project we have number of clients.(50+) so we decided to create a MASTER COPY of the site so that we can create live copies of that. could you please provide proper approach to achieve this thing?


  19. @hashim : Please help me in below scenario :
    How to fetch node properties in ECMA script ? While using below script, am getting error like :
    “TypeError: Cannot find function hasProperty in object”
    “TypeError: Cannot find function getProperty in object”
    Am using this script to test the custom properties validation :
    Sample code: function check() {
    if (workflowData.getPayloadType() == “JCR_PATH”) {
    var pagePath = workflowData.getPayload().toString();
    var finalNode = jcrSession.getItem(pagePath);
    if(finalNode.hasProperty(“crcNumber”) && finalNode.hasProperty(“notes”)){
    var crc = finalNode.getProperty(“crcNumber”).toString() ;
    var notes = finalNode.getProperty(“notes”).toString();
    if (!crc || !notes ) {
    return false;
    return true;
    return false;
    }catch (e) {
    return false;


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s