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

Advertisements

645 thoughts on “Ask Me ?

  1. Hi Hasim,

    I got one requirement to do customization in file uplaod with some naming convension, I did it in lib folder inside but one problem i getting every new feature pack installation in production my change will be overridden. So i just want to know can i try the same structure in app folder. when i am trying so i am geeing javascript error(ught DOMException: Failed to execute ‘registerElement’ on ‘Document’: Registration failed for type ‘coral-chunkfileupload’. A type with that name is already registered.) and file is not uploaded. Could you please suggest some solution for this.

    thanks in advance .

    Like

  2. Hi Hashim,

    I have a multifield dialog with two textfield widgets.I want to compare the values entered in these textfields.
    I am able to do in normal dialog using Listeners, but unable to do for Multifield dialog.(Please help me where to add listener node, and how to access the textfield
    widgets using javascipt)

    Like

    • Hi Rohit,
      They keep on changing the passing score. So it’s not clear. As per the document its approx 550 (75%), but it really depends on the difficulty level of exam.
      Keep in mind, Adobe wants you to clear the exam. So if you work hard it should be easy.

      Liked by 1 person

  3. Hi Hashim,
    I have created workflow models and configured launcher for page creation and content update. It works fine by workflow trigger –>approval—>moved to publish.
    But when I activate or deactivate a page, automatically it is reflected in publish without workflow process. What launcher condition has to be given for Page Activation/ Deactivation?

    Like

  4. Hi Hashim,
    I have a user group “Content admin”. where the user can only have the following permissions:
    1.Can Activate & Deactivate pages (so I have enabled Replicate privileges)
    2.Cannot Create,Modify,Delete content (so I disabled create,modify,delete privi for content folder)
    3.Can complete the workItem from the workflow.

    On disabling the permissions for Create, modify and delete, the user cannot complete the workflow step.It throws error as “Could not complete workflow step” and console error as:

    Unable to add OrMemory
    Status 500
    Message Unable to add OrMemory

    Thanks

    Like

    • It could be possible as the Workflow might be adding/modifying some jcr properties/ metadata for that page. As you have blocked Modify permissions this function is restricted.

      Like

  5. Hi,
    I want to do validtaion for title against javascript tags present in it, before author saves the value to WCM/JCR. How to do this.

    Like

  6. Hi Hashim,

    I want to reuse one of my component for example: Header component in other non AEM application.

    We need the same functionality and UI design of the component in other non AEM application.

    Can you please provide any approach to achieve this.

    Thanks,
    Sumedh

    Like

    • Hi,
      I am not sure in which application you want to port your AEM component.
      If you want to pick and place your generated static HTML component – its just HTML + CSS + JS

      if you want to Author in AEM and use its content/ properties at other places you can export the data from AEM server using Sling Exporter or using .json for that path.

      Like

  7. I have followed the SCHEDULER API.i was got this error. Please help for me.

    ERROR* [qtp1525791750-5520] com.adobe.cq.Firstschedule-bundle [com.adobe.cq.HelloWorldScheduledService(2889)] Could not load implementation object class com.adobe.cq.HelloWorldScheduledService (java.lang.ClassNotFoundException: com.adobe.cq.HelloWorldScheduledService not found by com.adobe.cq.schedule-bundle [489])
    java.lang.ClassNotFoundException: com.adobe.cq.HelloWorldScheduledService not found by com.adobe.cq.schedule-bundle [489]
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)
    at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.apache.felix.framework.BundleWiringImpl.getClassByDelegation(BundleWiringImpl.java:1415)
    at org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1595)
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1525)
    at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1925)
    at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:978)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.initDependencyManagers(AbstractComponentManager.java:952)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(AbstractComponentManager.java:980)
    at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:812)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:724)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:399)
    at org.apache.felix.scr.impl.config.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:676)
    at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:339)
    at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:360)
    at org.apache.felix.scr.impl.Activator.access$000(Activator.java:53)
    at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:260)
    at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
    at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
    at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)
    at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415)
    at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
    at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
    at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:916)
    at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:835)
    at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:517)
    at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4541)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2172)
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984)
    at org.apache.felix.webconsole.internal.core.BundlesServlet.doPost(BundlesServlet.java:365)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:567)
    at org.apache.felix.webconsole.internal.servlet.OsgiManager$3.run(OsgiManager.java:465)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:461)
    at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:85)
    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:79)
    at com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:308)
    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
    at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:89)
    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
    at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:290)
    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
    at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:129)
    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
    at org.apache.sling.featureflags.impl.FeatureManager.doFilter(FeatureManager.java:116)
    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
    at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75)
    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
    at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:124)
    at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:61)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.Server.handle(Server.java:499)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
    at java.lang.Thread.run(Unknown Source)
    25.04.2018 17:47:28.794 *ERROR* [qtp1525791750-5520] com.adobe.cq.Firstschedule-bundle BundleComponentActivator : Bundle [495] Unexpected failure enabling component holder com.adobe.cq.HelloWorldScheduledService (java.lang.IllegalStateException: Could not load implementation object class com.adobe.cq.HelloWorldScheduledService)
    java.lang.IllegalStateException: Could not load implementation object class com.adobe.cq.HelloWorldScheduledService
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.initDependencyManagers(AbstractComponentManager.java:959)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(AbstractComponentManager.java:980)
    at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:812)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:724)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:399)
    at org.apache.felix.scr.impl.config.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:676)
    at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:339)
    at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:360)
    at org.apache.felix.scr.impl.Activator.access$000(Activator.java:53)
    at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:260)
    at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
    at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
    at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)
    at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415)
    at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
    at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
    at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:916)
    at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:835)
    at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:517)
    at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4541)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2172)
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984)
    at org.apache.felix.webconsole.internal.core.BundlesServlet.doPost(BundlesServlet.java:365)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:567)
    at org.apache.felix.webconsole.internal.servlet.OsgiManager$3.run(OsgiManager.java:465)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:461)
    at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:85)
    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:79)
    at com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:308)
    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
    at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:89)
    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
    at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:290)
    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
    at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:129)
    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
    at org.apache.sling.featureflags.impl.FeatureManager.doFilter(FeatureManager.java:116)
    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
    at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75)
    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
    at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:124)
    at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:61)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.Server.handle(Server.java:499)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
    at java.lang.Thread.run(Unknown Source)

    Like

  8. Hi Hashim Khan,

    I want read the values from properties file and check the condition in serviceImpl class and schedule the job.

    for example : look like we have 3 environment (Dev,QA,Prod), for each instance have different cron expression for schedule the job.

    Like

  9. Hi Hashim – Can we write a groovy script to generate page content into a json (this is jus like ootb .json), but I need the script to run thru the child pages as well and give a consolidated content of pages under a path in json format (including all content within every page).

    Like

  10. Product pages need to be created under category page only. Which of these is true?
    1. Use allowedTemplates on product page template
    2. Use allowedParents on product page template
    3. Use allowedChildren on category page
    Answer: use allowedChildren on category page
    also this one as according to me if product page has to be restricted them allowed parent should be category page
    Thanks in advance

    Like

  11. Hi Hashim,
    We have a requirement where we need to move expired article from Original folder to Archival Folder based on published date. We are able to move articles to new folder through our Java codes, but some properties are getting missed and page is getting de-activated while movement . Using AEM 6.0 we are still able to open the page using Vanity from the new location. But in 6.3 we are not able to open it.

    Is there any solution to move the page from one location to another with all the properties(using java code/programmically).

    Like

    • Hi Mahesh,
      The PageManager Move resource is the way to go for this request. https://goo.gl/ru8Bav If your properties are not completely getting moved, there must be some error in the encoding of property values. From AEM 6.0 to AEM 6.3 there are a lot of API level changes that could be the reason for it. Page De-activation might also be a step in the resource move function. You may activate the page later or via code, after verification.

      Another solution is to use groovy, but that would also use PageManager move function, as its the best way out. It will also change the references of your moved page.

      Like

Leave a Reply

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

WordPress.com Logo

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

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s