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 .

Hashim

703 thoughts on “Ask Me ?

  1. Hi Hashim,

    Thank you for all your help!

    I have one doubt in which i need your advice. One of the application i am working on is using CQ 5.5. Whenever by mistake an author submits a workflow to admin inbox instead of approver inbox, after terminating the workflow manually. On the same document/page , we are not able to trigger any workflow.

    Can you suggest something on this?

    Thanks,
    Rahul

    Like

  2. Hi Hashim,

    I am trying to send mail using Aem 6.1. The functionality works correct in when inbuilt jetty server is used. But when the same is deployed on weblogic 12c, it fails with java.lang.linkage error.

    There is a article on helpx.Adobe.com knowledge base which also acknowledges the issue but doesn’t help.

    Can you please help us if you have resolved such an issue.

    Regards,
    Anil

    Like

    • Hi,
      Have you tried the steps which were shared at the link you shared ? I am not much aware of such errors. If the alternate solution mentioned there doesnt work, you may ask the question in Adobe forums.
      Regards
      Hashim

      Like

      • Hi Hashim,

        Thanks for your reply. I have tried the first solution. The outcome of that was the stacktrace changed but the exception remained the same. What I understood from the the helpx page was that AEM needs the weblogic jar imported as exposed from a system bundle. But the end result is that the issue didnt resolve.

        The alternative solution seemed incomplete to me as it talked only about activation and not about mail but I will try this also.

        Since the helpx article mentions multiple times to use the right version, I wanted to be double sure of it. Do you have any thoughts on how the correct version could be determined?

        Regards,
        Anil

        Like

  3. Hi Hashim,

    We have a business requirement in which we have around 1100 pages and the hierarchy as been changed . So for e.g. if the hierarchy earlier was ‘/content/a/b’ , now it is ‘/content/b’ . So because o fthat all of our internal links are now broken . We have multiple RTE in the pages which have internal links . We tried moving pages ( which should automatically update the links ) , but it’s 1100 pages and CQ shows an error while moving due to the large content . Do you have any suggestions on how this can be done using grroovy / any other suggestion ?

    Like

  4. Hi Hashim,

    I need your help in below, facility some difficulty.

    User has reported an issue that when an author submits an workflow for a page activation and if we reject that workflow. The page will still get activated at the on time set( if it has on/off time set).

    I have tested the scenario and seems to be true. I think the on/off time workflow luanches regardless of activation workflow.

    Steps to reproduce :

    1) Create a test page.
    2) set ontime to the page.
    2) Trigger workflow for that page activation to approver.
    4) Reject that workflow before the ontime set.
    5)See after ontime , page will be activated.

    Thank you,
    Rahul

    Like

    • Hi Rahul,
      That must be an OOTB functionality. You can try to rectify that as per your requirement if you implement a Custom Publish/Activation workflow which keeps a check on the On/Off time as well as the page property for deactivation.

      Regards
      Hashim

      Like

  5. I have a custom multifield with a rich text in it. When i click on the green up/down arrows next the text in RTE is getting encoded. I want it to be similar as before.
    Can you help me on that?

    TouSectionsComp = {};

    TouSectionsComp.Selection = CQ.Ext.extend(CQ.form.CompositeField, {

    text: “default text”,
    constructor : function(config){

    if (config.text != null) this.text = config.text;
    var defaults = {
    height: “auto”,
    border: true,
    layoutConfig: {
    labelSeparator: CQ.themes.Dialog.LABEL_SEPARATOR
    },
    defaults: {
    msgTarget: CQ.themes.Dialog.MSG_TARGET
    }
    };

    CQ.Util.applyDefaults(config, defaults);
    TouSectionsComp.Selection.superclass.constructor.call(this, config);

    this.textField1= new CQ.Ext.form.TextField({
    name: this.name,
    fieldWidth:200,
    fieldLabel: ‘Section Title’,
    contentEncoding: config.contentEncoding

    });
    this.add(this.textField1);

    this.description = new CQ.form.RichText({
    name : this.name,
    width : 500,
    height : 250,
    labelStyle : “padding:3px”,
    //maxLength : 50,
    //maxLengthText : “Header limit cannot exceed 50 characters”,
    //emptyText : ‘Item Title’,
    readOnly : false,

    rtePlugins: {
    misctools: {
    features: ‘*’
    },
    undo: {
    features: ‘*’
    },
    styles: {
    features: ‘*’,
    styles: [
    {“text”:”global-list”, “cssName”:”global-list”},
    {“text”:”Help Text”, “cssName”:”help-text”},
    {“text”:”listDisplayStyle”, “cssName”:”listDisplayStyle”}
    ]
    }
    },
    fieldLabel : ‘Section Description’,
    fieldDescription :’Help: 1) For custom styling please Style Dropdown. 2) To add multiple line in one paragraph please use shift+enter.’
    });
    this.add(this.description);

    },

    processRecord: function(record, path) {
    if (record.get(this.name) != null && CQ.Ext.isArray(record.get(this.name)))
    {
    this.description.setValue(record.get(this.name)[1]);
    this.textField1.setValue(record.get(this.name)[0]);

    }
    },

    setValue : function(v){
    if(v)
    {
    var args = v.split(“^”);
    this.description.setValue(decodeURIComponent(args[1]));
    this.textField1.setValue(args[0]);

    }
    return this;
    }
    });
    CQ.Ext.reg(“tousections”, TouSectionsComp.Selection);

    This is the multifiled I am using.

    Regards
    Jayant

    Like

  6. Hi Hashim,

    I have a requirement where I need to create a multi field xtype which has a title,image & a check box.On checking the box I again have the same multi field (title,image & checkbox.).Can you please provide guidance on this.

    Thanks

    Like

    • Hi,

      For such requirement you might consider modifying the Custom Multi-field Widget. You can try doing something like first display everything in a multifield (all 6 of them) i.e if you are having 6 fields display all of them in one multifield Add. That should be the first step.

      Secondly your code logic should listen to the Checkbox field onChange() event. and Whenever there is a Change for that checkbox you may display the rest of the items. By default those last three items should be hidden.

      Write some extjs code for that listener event.

      I hope this would give you an idea how to approach this.

      Alternatively try to modify the requirement into a simpler dialog implementation.

      Regards
      Hashim

      Like

  7. Good evening Hashim,
    can you please give me your opinion about these two questions below?

    1 – Which three statements about configuring a development environment for a new AEM project called “customer bank”, that contains both custom OSGi services and AEM components is true? (Choose three).

    A. http://:/system/console/depfinderls used to find the dependencies
    B. The repository for AEM dependency jar files can be either http://repo.adobe.com/nexus/content/groups/
    public/ or the local Apache Archiva with all required dependencies
    C. Create a Maven project with archtypemultimodule-content-package-archetype from the repository http://repo.adobe.com/nexus/content/groups/public/
    D. Create a Maven project with archtype simple-content-package-archetype from repository http://repo.adobe.com/nexu5/content/gmups/public/
    The answer is B,C,D?

    2 – Using the default Dispatcher configuration, which type of URL will have a response cached by the Dispatcher?
    A. URL denied by the /cache sections in dispatcher. any file.
    B. URL without a file extension.
    C. URL with query parameters.
    D. URL with an extension in its suffix.
    The answer is D?

    thank you in advance

    Like

    • Hi Elizabeth,

      1. Answer: A, B, C

      A. http://localhost:4502/system/console/depfinder is used to find the dependencies
      B. Check this URL, add it into your settings.xml file for the dependencies gathering: http://repo.adobe.com/nexus/content/groups/public
      C. Using the archtype multimodule-content-package-archetype is correct because the question mentioned about custom OSGi services and AEM components. This ArcheType will generate the content and bundle projects in a single maven command.
      D. Incorrect because archtype simple-content-package-archetype generates a single content project, does not include a bundle or customise project.

      2. Answer D.
      A. In dispatcher. any, under /cache property, there is no denied section.
      B. No extension URL will not be cached.
      C. URL with params will not be cached.
      D. URL with suffix and the suffix has extension will be cached.

      Like

  8. Thank you for the help. Can you help me one more time?

    Assume there are multiple publish instances (publ,pub2 and pub3) serving requests for an online shopping site.
    The end user is allowed to provide reviews and comments for each product and about their shopping
    experience. The Dispatcher module is in place to load balance the requests to publish instances and there is
    only one author instance, named author, where content editors create the pages. When a user, named User A,
    provides comments and the request being served by publish Instance publ, in which three ways are these
    comments replicated to pub2 and pub3? (Choose three.)

    A. Configure the dispatcher flush for the author pointing to a webserver uri on which the Dispatcher is deployed and configured.
    B. Configure replication agents for the author pointing to publ, pub2 and pub3.
    C. Configure reverse replication agents for the author pointing to publ, pub2 and pub3.
    D. Configure a static agent for the author.

    I could use reverse replication to resolve this, but what about the two other ways?
    Dispatcher flush is just to flush the cache right? So, the answer could be B,C,D?

    Thank you.

    Like

  9. Hi, I would like to know when Author and Publisher shared multiple assets in a shared system, what replication has to be configured? ClusterDataStore with No replication agents or replication with no Versioning?

    Like

  10. Hi Hashim,

    I want to do something on UI development and don’t know where to start, what is needed to start, Could you if possible, mention few things which could get me started.

    The next thing I wanted to know was, if AEM has any other ecommerce FW integration other than Hybris. Any open source stuff like Magento etc.

    Thanks in advance

    Like

  11. hi Hashim,

    please tell me how to convert a typical web application using jsp, java classes and sql database, into cq enabled site.

    what are the steps involved in the whole process and how the data would be modelled.

    what step should be performed first.

    Like

  12. Hi Hashim,

    My question is something technical..

    I have a page with so many components, when i am trying to delete a component in author mode it is struck after two get calls i.e., “/bin/wcm/references.json, body.infinity.json”. where as in success case with less components in other page has two GET calls and two POST calls respectively to finish the delete operation .

    I am not finding any exception and clue to work on this issue, would you be able to guide or suggest me how to proceed on this issue?

    Thanks
    Anil K.

    Like

    • Hi,
      Are there any updates in the logs ? Is it because of a particular component. Try to delete component from crxde or use curl for that command which is taking time or failing.

      There should be some errors in Logs or console of browser. Check that.

      You can also try to use Classic mode or Touch Mode to find the problem.

      Regards
      Hashim

      Like

  13. Hi Hashim,
    I am working on AEM 6.1 and on using java code in my html file I am getting an exception on using getCurrentPage().
    I am extending WcmUse class.
    Following is the exception I am getting:

    Error during include of SlingRequestPathInfo: path=’/content/test-check/jcr:content/par/footerkp’, selectorString=’null’, extension=’html’, suffix=’null’
    org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: java.lang.reflect.InvocationTargetException
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:481)
    at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:511)
    at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45)

    Can you help me on that?

    Like

  14. Hi Hassim,

    I am planning to upgrade AEM 5.6.1 to AEM 6.0/6.1.
    Been looking for information on upgrade and also migration of DB from jackrabbit Oak to MongoDB.

    any Prerequisites before the upgradation.

    Thanks and Regards
    SKYIOS

    Like

  15. Hi Hassim,

    are there any curl commands to index nodes on AEM? I have seen your post on curl, its amazing but was just wondering any curl commands on indexing?

    Thanks in advance

    Like

  16. Hi Hashim,

    We are facing issue for past couple of days with the below. Need your help on the below JCR-SQL2 query.

    Issue is as below :

    1] Most of the properties queried are present at jcr:content level of page and some of them are present at component level [for example : if a page has component c1, headingText property is present at the component level and not at the jcr:content level of the page ].

    2] “ABC” is the search keyword provided on the page

    3] Suppose we have a page, with few components in it which satisfies the criteria, the result would be returned in the form of

    /content/abc/def/jcr:content/component1

    /content/abc/def/jcr:content/component2

    /content/abc/def/jcr:content/component3

    4] I would want this query to return just /content/abc/def instead of results given as in #3[i.e, even if several components in a page matches the criteria, at the end I just want that particular page to be returned, instead of seperate values ].

    As a result, we have the current query below :

    SELECT * FROM [cq:Page] AS parent INNER JOIN [nt:base] As s ON ISDESCENDANTNODE(s,parent) WHERE ISDESCENDANTNODE(parent,[/content/x/y]) AND (CONTAINS(s.[cq:tags],’ABC^600′) OR CONTAINS(s.blocktitle,’ABC^400′) OR (s.blocktitle LIKE ‘ABC%’) OR CONTAINS(s.bodycopy,’ABC^100′) OR (s.bodycopy LIKE ‘ABC%’) OR CONTAINS(s.headingText,’ABC^10′) OR (s.headingText LIKE ‘ABC%’) OR CONTAINS(s.Author,’ABC^400′) OR (s.Author LIKE ‘ABC%’) OR CONTAINS(s.headline,’ABC^2′) OR (s.headline LIKE ‘ABC%’) OR CONTAINS(s.[jcr:title],’ABC’) OR (s.[jcr:title] LIKE ‘ABC%’)) AND ( NOT s.[hideInSearch] IS NOT NULL) ORDER BY parent.[jcr:lastModified]

    5] However, the problem is , suppose a page “/content/s1/s2/s3/s4” matches the above criteria it is retured aling with its parent “/content/s1/s2/s3” [and probably a parent of this too], which I do not want.

    Any thoughts/pointers on this will be really helpful.

    Like

    • Hi,
      Although the problem wasnt much clear, I would suggest you to go through https://hashimkhan.in/aem-adobecq5-code-templates/query-builder/ once for better understanding.

      If you want to retrieve a page (type=cq:Page) search for page , if you want to retrieve a component node search for that (type=cq:Page or nodename= ). Ideally as per your problem you should search for Page only and then in the Query give the properties like @jcr:content// . You can thereby go to any depth while getting the result as Page.
      In addition you can remove repeated results from the Query results after some processing.
      Also use Query Builder API instead of SQL2 , it would give you more ease of handling complex queries.

      Regards
      Hashim

      Like

      • Hi Hashim,

        Thank you for your reply.

        As mentioned by you, we are trying to come up with a Query builder approach instead of SQL2. However, we are facing a roadblock there.

        1] We are able to retrieve properties present at the page level[directly under jcr:content of page] via Query Builder API.

        However, we have a requirement wherein we need to search for specific properties [along with properties under jcr:content] present under various components[those components may be present on any page, any number of times]via Query builder api and we are unable to do the same.

        2] Any thoughts/code snippet on this will be helpful.

        Like

  17. Hi Hashim,

    Regarding Workflow: I have to create two steps. when i click on deactivate page step it should send an email to group and deactivate the page. could you please suggest me to create the same workflow. I hope you will give solution.

    Thanks in advance
    Mujahid

    Like

      • Hi Hashim,
        i have followed the above steps to create a workflow. It’s working fine but my problem is when i want to select the group to send E-Mail notification in that step its displaying all users of that group. I need do display only group name itself not user of that group too. How to achieve this. Could you please suggest me.

        Thanks in advance…

        Mujafar Shaik

        Like

  18. Hi Hashim,

    I am working on a touch optimized dialog (AEM 6.1) which should have a separate tab for a richtext field along with another tab that contains a few other widgets.

    Any help about how to make a field/widget of a touch optimized dialog as a richtext field would be really appreciated.

    Thanks in advance.
    Karttik

    Like

  19. Hi Hashimkhan,

    Can you please give me a clarification on CDN(content delivery network). how to integrate and why we are using. can you please share a any document.
    Thanks,
    Naresh

    Like

  20. I am trying to create a Editor component that will take inline javascript. I understand that i can use clientlibs folder for loading JS, but some of the video CDN folks require you to put embed tags with JavaScript in the editor, and i think some of that is also used for rapid development. Currently with the state of RTE, i cannot put a script tag even after extending it, as it strips it out and only takes the html tags. Could you please provide any insight if this could be doable in AEM 6.1

    Here’s what I have tried:

    I looked at several post didn’t got a clue
    extended RTE using Adobe’s documentation, but see a script button , that only takes html tags.
    looked for hack’s that could tell me what part of the code is tripping out tags or could not execute js.
    looked for some components out there that does that, found nothing so far.

    Thanks

    Like

    • Hi,
      Are you using the OOTB RTE widget using touch UI ? How are you reading the text into your page. If you are using Sightly have you tried using context=unsafe ?
      This is a common use case and should work.

      Regards
      Hashim

      Like

  21. I have an ugly problem. Nodes were deleted from our author and on our 6 publishers some of the nodes remain. We have been calling these orphaned nodes. At first we thought there were just a few and were manually handling them but it appears that it might be more widespread.

    Is there any way to use cURL or a tool that can compare the contents of the publisher against the author and deleted nodes on the publisher that don’t exist on the author?

    Like

  22. Hi Hashim,

    We are trying to integrate comments in AEM 6.1. The documentation is pretty high level.. Is there a reference site which explains the usage in detail.

    TIA,
    AK

    Like

      • Thanks for earlier reply,

        Actually, we have a requirement where we need to allow user to post comments without being logged in.

        We have seen that this was possible in 5.6.1 where user could enter his comment, name, email , website (optional).

        However 6.1 requires that the user be logged in to post comments.

        I have seen this link – https://docs.adobe.com/docs/en/aem/6-1/release-notes/deprecated-removed-features.html – which gives the list of deprecated and removed features but I am not able to see this mentioned.

        Any pointers on what is out of the box in 6.1.

        Regards,

        Anil

        Like

        • Hi ,

          In 6.1 , If you need to use any community feature like blog,forum , community groups etc ,

          you need to login first . After creating community site corresponding user groups would be
          created for the respective site , Roles of a member would be always depend on which user group is he part of for the respective community site .

          Can you please post the link where user could comment as anonymous in AEM .

          Are you using Community Component after creating community site ?

          Thanks,
          Dinesh

          Liked by 1 person

          • HI Dinesh,

            Thanks for your reply. The answer to your questions are:

            I don’t have a direct link but I can either share you a AEM 5.6.1 localhost based link or can email you the printscreen. You could also see it in the Adobe Communities forum as I asked the same question in the forum also.

            Regarding usage, we are using Comment component of the webpages (AEM SItes). We don thave forums, blogs etc as of now.

            Regards,
            Anil

            Like

  23. Hi,
    I’m working on AEM 6.1 .I am using OOB Captcha Component in my website present at location /libs/foundation/components/form/captcha.

    When I drag and drop Captcha component on normal site page it works fine but when I tried to do same thing in Adaptive Forms it doesn’t work. In adaptive forms when I enter the string in the input box nothing happens.

    Could you please tell me how can I use the OOB Captcha component in the Adaptive forms.

    Thanks & Regards,
    Sanjay

    Like

    • Hi,
      I am not able to access the link which you shared. As per your question, it depends from where are you picking the images. You can definitely write some logic to randomize the images.
      Regards
      Hashim

      Like

  24. Hi Hashim,

    I am able to view only last 5 versions of a Page in sidekick of Pre-Production. While for same page I can see more than 10 versions in sidekick of my Development environment. I have requirement to show more versions in that instance also. Is there any way I can configure it, i.e. Maximum number of Versions to be shown in Sidekick.

    Thanks.

    Like

  25. Hi Hashim,

    I have registered into www2.pearsonvue.com and logged into the site and searched for developer
    certification i.e, “9A0-384” but could not find any result.

    Can you please clarify me whether 9A0-384 and 9A0-383 codes are same or not?

    Like

    • Hi

      The exam 9A0-384 Adobe Experience manager Developer 6 is in Revision state. It may be available in mid of June. See below msg reply from Adobe

      I hope this answers your question. Please find below the reply given by the AEM Exam’s team:

      Q1. When would this Exam be back? Tentative Date?
      At this point, we are not able to provide a date (I know that can be frustrating from a planning standpoint). We are waiting to secure resources to complete the technical review. Once they are in place we will be better prepared to provide tentative dates.

      Q2. What would be changes in this revision as compared to old one?
      As far as the exam target audience and objectives covered on the exam, we will not see a major difference (but see the answer to Q3)

      Q3. Would it be on AEM 6.1 or AEM 6.2?
      The exam will cover core features of AEM (features that are part of AEM regardless of version), with specific updates for 6.1

      Thanks and Regards
      Kautuk Sahni

      Like

  26. Hi Hashim,

    please clarify my issue,

    I have created RTE generic component. I’m facing issue with image plugin. I’m able to drag and drop the image even image plugin is not created. I should disable the functionality of image plugin. Could you please suggest me on this..

    I have tried below things but no luck,

    1. some disable properties(followed Widget API 6.1 for classic UI)
    2. cq:dropTargets

    Like

  27. Hi Hashim,
    Can i have quick update on below query.

    Want to retrieve/display cropped images from /content/dam/sites/mysite/de/sample.png/jcr:content/renditions into dam admin side panel along with normal images.

    Can you please do the needful ASAP.

    Regards
    Raju

    Like

  28. Hi Hashim,
    Please help me out with this task.
    How do we provide a checkbox(More like a radio button functionality) across a list of multiple instances of a single component?

    For eg., to select the default open item in an accordion list?

    Like

  29. Hi Hashim,

    I want to integrate the third party Queue as the replication Queue. So is there any way that once we activate any content, the queue should not be maintained at AEM ?

    Like

    • Hi Jatin,
      You can stop the OOTB replication agents and implement this in your external third party. But what is the usecase? why do you want to do that?
      Regards
      Hashim

      Like

  30. Hi Hassim,

    I am looking to configure log rotation on aem6/6.1/6.2 — best practice [ any info is appreciated ]
    also log archiving scenarios and place the archived logs in diff location

    The next thing I want to ask is Back and recovery [ hot n cold ] — best practices.

    Thanks in advance

    Like

  31. Hi Hashim,

    Under my component, i have a json file (country.json) which contains a list of countries. Now i want to prepopulate those json data in my country drop down of my form. what i did is i uploaded that json in content dam and used like $.CQ.map(CQ.HTTP.get(“/content/dam/country.json”) and it is working fine if i put that json under component and if i use path as /apps/projectname/components/json file it is not accessing in QA environment. So how can i acheive the same. Could you please help me regarding this.

    and one more question can we create a vanity url for content dam assest, if yes how to do?

    Thanks in advance,

    Mujafar Shaik

    Like

    • Hi,
      Is that JSON dynamic or static ? If its dynamic uploading into DAM would be a bad idea.

      Can you check the console for errors in QA. The same DAM file should be present in QA too.

      Why do you want to create vanity URLs for the dam assets ? Assets URL are generally not exposed in browser. Vanity URLs is for the pages as end user can access shortened URLs.

      Thanks
      Hashim

      Like

  32. Hi Hashim,

    I have one requirement.

    I have to create a Help button which will display in Author mode. When i click the button it should open a pdf like help document to help authors how to configure the component. now my question is if the author drags more than one component, according to component name the document should open. i saved documents in dam with component name. can you tell me approach for this?

    other wise suggest best than this. actually they don’t know how to configure components so when i click on help button corresponding document should open.

    Thanks
    Mujafar

    Like

    • Try to use helpPath property in Touch UI. /libs/foundation/components/text/cq:dialog
      Give the link for you DAM asset in this path where your document is stored.

      For Classic UI , you can use label xtype. to add the link in the Dialog. of a component. eg:
      libs/dam/components/youtube/config/dialog.html
      /libs/dam/components/youtube/config/dialog/items/tabs/items/basic/items/disclaimer_upload

      I hope it helps you.

      Regards
      Hashim

      Like

Leave a reply to Hashim Khan Cancel reply