FAQ Database Discussion Community


Adobe AEM 6.0 component default control

adobe,cq5,aem
When building components in AEM, by default new components are created with an associated JSP file for rendering. For builds using Sightly, each time a component is created the developer must delete the JSP file and create the required HTML file. This leads to wasted time and effort, not to...

In CQ/AEM, can I prevent Sidekick from showing?

javascript,cq5,aem
Under certain circumstances, I want to prevent the Sidekick from being displayed on a page. I tried some things: Removing the init.jsp include. This works, but it also prevents certain CQ javascript libraries from being loaded, and I need these libraries. Adding a jquery onload event to hide the sidekick....

how to override the placeholder icons în AEM 6?

css,cq5,aem
I would like to override the icons of the cq component placeholders.I have found the Icons here: http://localhost:4502/libs/cq/ui/widgets/themes/default.css example: The placeholder icon for the Image Component is difined here .cq-image-placeholder { background: url("default/placeholders/img.png") no-repeat scroll 50% 50% rgba(0, 0, 0, 0); } Now I would like to override the img.png...

Page activation(using siteadmin) is too long

curl,cq5,aem,jcr-sql2
I have page with a lot amoun of content. After activation button is pressed ,loading bar is shown for a 2-3 mins, activation response is pending for a 2-3 mins. If i use curl command : curl -u admin:admin -F cmd=activate -F ignoredeactivated=false -F onlymodified=false -F path=/path/topage http://server:port//etc/replication/treeactivation.html Or http://server:port/etc/replication/treeactivation.html...

OSGi bundles won't start - Unable to resolve sun.reflect.generics.reflectiveObjects

java,osgi,cq5,aem,apache-felix
After seemingly irrelevant changes in the code of my AEM project, my bundle fails to resolve. Upon inspecting the logs, I can see the following errors appearing. 22.04.2015 11:00:18.650 *ERROR* [qtp1266495948-35] org.apache.felix.http.jetty %bundles.pluginTitle: Cannot start (org.osgi.framework.BundleException: Unresolved constraint in bundle my-bundle ... [caused by: Unable to resolve 401.121: missing requirement...

Is it possible to switch to Sling Selector Script based on page property

java,iframe,aem,sling,sightly
In an AEM Sightly component, which has two modes; gallery and directory. The directory view is implemented with a selector (/apps/mi-proj/people_list/directory.html). By default the component renders in a gallery mode (using people_list/people_list.html). Users would like the ability to choose which view is shown by default. In either cases, users can...

How to get url of all child,grand child pages using root path?

cq5,aem
I have a path of a root page and I want to retrieve all the child pages of root page and grandchild and grand grand child of root page. My structure is like this rootPage | | |---------childPage | | |---------grandChildPage | | | |----------------------grandGrandChildPages So I want the path...

AEM 6:: Dispatcher entry for /bin/

apache,aem
Currently I am getting a 404 on the Sling Servlet that is mapped to the path /bin/uhc/myuhcauthenticationhandler. My best guess is it is being blocked on the dispatcher.Also this servlet takes care of POST requests only. What entry can I do in the dispatcher to make this work? Thanks in...

AEM 6.0 SolR Enabled full text with DAM Assets

solr,aem
I'm trying to activate the indexing for document contents in the DAM using AEM 6.0. I've already activated SolR according to the documentation, but PDFs and DOC files in the dams don't get fully indexed as they were in AEM(CQ) 5.6.1 somehow. I'm sure I'm probably missing something very obvious...

getAnonymousResolver: Anonymous access not allowed by configuration - requesting credentials

servlets,cq5,aem,sling
I am using CQ5.6 and making a servlet call from a service. In my error log I get "java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:4502/content/sports/jcr:content/parSports/sportsscores.scores" from a log statement. How do I resolve this issue? (I am not doing anything with credentials) Here is my service: mport...

Display different markup in Sightly based on a Sling selector

aem,sling,sightly,sling-models
The context I'm working on an AEM 6 project that uses Sightly as the templating language. I'm facing a use case, in which I want to show or hide certain parts of the markup depending on the presence of a Sling selector. For example, a request to /content/my-project/my-page.html should yield...

how to send email on contact form submit button click..?

adobe,osgi,cq5,aem
I create component with default component using FormComponent now on submit button click I want to send an email to recently submitted user, I configure SMTP for mail server on : http://localhost:4502/system/console/configMgr Now I'm stuck how to send email, can someone help me to figure out what I'm missing here....

Inject JCR Properties with colon in Sling Model

java,cq5,aem,jcr,sling
I'm working with sling models for a project in AEM. I have my sling model setup to inject values to variables. I can setup getters to retrieve properties from the adapted resource as long as the properties have names that don't break java syntax. (For example: title) My problem is...

How to instantiate a Sling Model with multiple adaptables

cq5,aem,sling,sling-models
The @Model annotation in Sling Models allows for multiple adaptables, for example @Model(adaptables = { SlingHttpServletRequest.class, Resource.class }) However, I am not sure how to instantiate a Model with multiple adaptables from a JSP. The options shown in the Sling documentation always specify a single adaptable only: https://sling.apache.org/documentation/bundles/models.html#adaptto

Loading a PKCS-12 keystore in AEM 6.0

cq5,keystore,saml,aem
I am trying to move my SAML integration code from a CQ 5.6.1 environment to AEM 6.0. While my login works correctly, I'm stuck at the logout implementation. The same snippet of code runs on 5.6.1, but throws an I.O Exception in AEM 6.0 Here's the code in question Node...

CQ5 aka AEM - Finding the source of a copied page programmatically

cq5,aem
I'm currently exploring AEM and was wondering if it's possible to identify the "source" of a page. To clarify what I mean exactly: If you copy a page by using the "Copy" and "Paste" options in CQ5 WCM (not a live copy, just a normal copy of a page) is...

AEM design_dialog and template location

cq5,aem
Currently my design_dialog is saving the settings under etc/designs/default/jcr, how do I modify the template in order for it to save under etc/designs/(mydesign)/jcr. I was looking at the documentation but couldn't find anything specific on how to ensure the design_dialog creates the properties under its own design template....

How to get SlingRequest from saxon TransformerFactory

java,cq5,aem,sling
I want to get a current SlingRequest.getRequestURI() and pass it to new LinkTransformer(links, repository, <<requestedUrl>>). So I tried to add an annotation @Reference SlingRequest slingRequest and it throws me exception. Here is my code: package com.my.transformer; import com.my.transformer.impl.LinkTransformer; import org.apache.felix.scr.annotations.*; import org.apache.sling.jcr.api.SlingRepository; import org.apache.sling.rewriter.Transformer; import org.apache.sling.rewriter.TransformerFactory; import...

How to include AEM parsys in page component

cq5,aem,sightly
I have the following line, in the page component file /apps/my-app/components/pages/homepage/body.html <div data-sly-resource="${ @path='right-parsys',resourceType='wcm/foundation/components/parsys'}"></div> And we are getting log messaages [.... GET /content/our-system/home/en.html HTTP/1.1] com.day.cq.wcm.msm.impl.LiveRelationshipManager Impl StarResource given at /content/our-system/home/en/jcr:content/right-parsys/*: no parent: no LiveCopy I have the following questions: Is the paragraph system properly added to the sightly...

can port of a cq instance be set in terminal

cq5,aem
their is an option for setting run mode of a CQ Instance directly in terminal viz -Dsling.run.modes=${CQ_RUNMODE} is their a similar option for changing the port as well. I'm basically looking for a solution to keep changing name of CQ jar for a new instance. Thanks

CQ5/AEM6/Sightly - Return custom type from Java Use-Api

cq5,aem,sightly
Using JavaScript Use-Api I am able to create a custom object and return it to a html file. This feature allows me to create a list of custom objects, which can be used to create a menu or other complex list-like component. Let's assume that I have following content structure:...

AEM 6: sling:osgiconfig based on different environments

aem
I want to create sling:osgiconfig for different environment. I am aware that the folders will have to go by the naming convention config.<runmode/environment>.<author/publish>. We have different environments like https://test1-myapp.app.com or https://dev-myapp.app.com and so on. I logged into one of the environments in the publish mode to find out the runmode...

Impose component restriction to a series of parsys-CQ

xml,components,cq5,aem
I have a series of parsys present in my page's footer. At the same time, I want to impose component restriction to all these via etc/designs/projectname/content.xml. This goes like this: JSP: <c:forEach var="i" begin="0" end="${properties.numberOfFooterLinks-1}"> <div class="small-6 medium-4 large-2 columns"> <cq:include path="./footerPar${i}" resourceType="foundation/components/parsys" /> </div> </c:forEach> XML: <footer jcr:primaryType="nt:unstructured"> <footerPar0...

AEM/CQ - Sling script resolution - what script to use?

cq5,aem,sling
We have requirement wherein we are required to create some URLs that will be using selectors. The URL that we use currently is <company>/<domain>/home.html In addition to the above URL we will be having three more URLs of type: URL 1 - <company>/<domain>/home.<brand>.html There can be three possible values of...

how to delete node children?

cq5,aem,jcr
before I write may sitemap.xml in some jcr folder /var/myProject/sitemap, I would like to delete the old sitemap.xml Resource resource = resourceResolver.getResource("/var/myProject/sitemap"); sitemapNode = resource.adaptTo(Node.class); sitemapNode.getNodes().remove(); sitemapNode.getNodes().remove(); deliver the following exception: *ERROR* [CM Event Dispatcher (Fire ConfigurationEvent: pid=MyClass] The start method has thrown an exception (java.lang.UnsupportedOperationException) How to remove all...

CQ5 SlingServlet and resourceTypes not working for specific resource paths

servlets,cq5,aem,sling
If I define a Sling Servlet as follows: @SlingServlet( label="TestResourceTypeServlet", name = "com.company.project.servlets.TestResourceType", extensions = {"bob"}, resourceTypes= {"cq:Page"}, methods= {"GET"}, metatype=true) @Properties({ @Property(name = "service.description", value = "A test servlet"), @Property(name = "service.vendor", value = "Company") }) The servlet picks up any get request to every page with an extension...

How to create a directory on the basis of path in cq5?

cq5,aem,jcr
I have a String which is the path of the page for example /content/xperia/public/events/eventeditor. I am gererating the XML of this page and saving it to DAM, but I want to save it in the similar tree structure under /content. I tried the following code String page = "/content/xperia/public/events/eventeditor"; page...

How do I configure page properties in AEM 6?

aem
I need to add some page metadata (SEO, Open Graph, etc) and have it be editable per page. In CQ5 I modified the page component dialog.xml to allow for custom fields and it was accessible through the sidekick. In the AEM 6 Touch UI, the sidekick is gone and the...

CQ-Getting date and time as raw strings using xtype=“datetime”

java,cq5,aem
I am pretty new to CQ and I am adding a new field to an existing form. I want to accept a date and time from the component dialog as strings. If I use xtype="datefield" and xtype="timefield" separately, I can get the date and time as strings just the way...

CQ5 debug bundles using eclipse won't halt

eclipse,debugging,bundle,cq5,aem
I created a bundle that I already uploaded, but I would like to debug it. I started the server with debug mode: java -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n -XX:MaxPermSize=256m -Xmx1024M -jar AEM_6.0_Quickstart.jar, and then I set to the project that packaged into the bundle its remote debugging configuration, but when I set the breakpoints...

AEM:: Unable to change languages in Language Grid

cq5,aem
I have a set of languages that I would like to be visible in the Language Grid under http://localhost:4502/libs/cq/i18n/translator.html. I am following the directions given here at the URL http://docs.adobe.com/docs/en/aem/6-0/develop/components/i18n/translator.html under "Managing Supported Languages". The issue is when I am trying to add the property "languages" to the node /etc/languages,...

Radio buttons layout to make horizontal

cq5,aem
I am designing a dialog in which i want the radio buttons displayed horizontally and not vertically, so that appear in a single line. Any ideas how to achieve this. Below is my dialog.xml. <items jcr:primaryType="cq:Widget" xtype="tabpanel"> <items jcr:primaryType="cq:WidgetCollection"> <tab1 jcr:primaryType="cq:Panel" title="Slider"> <items jcr:primaryType="cq:WidgetCollection"> <typeconfigs jcr:primaryType="cq:Widget" fieldLabel="Select Videos" name="./options" xtype="customconfigmultifield">...

Get JSP output within Servlet in AEM

java,jsp,servlets,cq5,aem
In CQ, we need to process jsp within servlet then combine the result with other results we get from server before writing back to browser. The following code is almost what we need, except that it writes the result back to browser after processing jsp. RequestDispatcher dispatcher = request.getRequestDispatcher(resource); dispatcher.forward(request,...

On/Off time(datetime field) doesn't cleared after cancel button is pressed

extjs,widget,cq5,aem
I open page properties and fill some fields After I pressed cancel button, and reopened properties dialog, all field cleared, but datetime fields didn't. What is the rigth way to clear datetime fields?...

AEM Get child node content

javascript,aem
How do you get child node content with JavaScript specifically? I am able to get the parent node information by using the following: granite.resource.properties However I need to have access to a child node -parent -- child (named image) There are ways to get access to the child node with...

SSL Configuration issue in AEM6

ssl,cq5,aem
I am having issues in configuring my AEM instance SSL configured. I am using below command to generate the keystore. [email protected]/media/vivek/Misc/SelfWork/Author/ssl$ keytool -genkeypair -keyalg RSA -validity 3650 -alias cqse -keystore /Misc/SelfWork/Author/ssl/cqkeystore.keystore -keypass password -storepass password -dname "CN=sbroders-w7, OU=CQ, O=Adobe, L=Ottawa,S=Ontario, C=CA" /media/user/Misc/SelfWork/Author/ssl$ keytool -export -alias cqse -file client.cer -keystore cqkeystore.keystore...

Which performs better for search in in Adobe AEM, SQL2 or the QueryBuilder?

aem,jcr
I have to make some queries in AEM and I'm not sure if I should go for the QueryBuilder or SQL2. The queries are not particularly complex. I need to find pages using a date range,tags and resourceType. Which is the preferred method to make queries in AEM? which one...

AEM TouchUI Components dialog

aem,sightly
I have multiple components that use another component as a child, not to generate all the content but it is a child component we recognized needed to be used multiple times so we created a child component that is being included: The problem that I have run into is that...

Color Picker for AEM Component

extjs,cq5,aem
I'm trying to add a color picker to my AEM component, so users can set the color in the component dialog. previously it was just a select list with text options... <selectList jcr:primaryType="cq:Widget" fieldLabel="Color" name="./color1" type="select" xtype="selection" options="/etc/designs/my-project/colors.json" /> I would like to use ColorMenu or ColorPalette After some trial...

cq:editConfig not applying outside of parsys

cq5,aem
Cross-post from Adobe Community Forums: http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__qugo-we_have_an_imagecom.html We have an image component, its _cq_editConfig.xml is: <?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" cq:disableTargeting="{Boolean}true"...

AEM: URL Shortening

aem,sling
We have a multi lingual website with the structure like /content/<app>/<language>/login-page , I am looking to get rid of /content/<app>/<language>and the .html from the URLs, so that instead of accessing pages like http://www.application.com/content/<app>/en/login-page.html or http://www.application.es/content/<app>/en/login-page.html I can access the page like http://www.application.com/login-page and http://www.application.es/login-page. As far as I know this...

How to create DAM Taxonomy in CQ5

cq5,aem,dam
I am working on CQ 5.6.1 for a while but i didn't have much knowledge on DAM. So was studying DAM. I came across a term DAM Taxonomy. I couldn't see any direct link to it in documentation. I want to know what is DAM Taxonomy and how can we...

It is Impossible to Deactivate Page [closed]

cq5,aem
I'm trying to deactivate page in siteadmin. But deactivate buttons are not unavaliavle. A'm logged as Administrator. What is wrong? Screenshots: popup menu top menu status column ...

Publish/Unpublish Adobe AEM page from Java

java,aem
We have background process that automatically creates AEM pages as well as deletes old AEM pages. For pages to appear/disappear on the published site, they need to be activated (Published) / deactivated (Unpublished). However, after searching from Google, I am not able to find AEM Java API that can publish/unpublish...

AEM CQ5 - Multifield custom xtype inside a mutlifield custom xtype

extjs,cq5,aem
I am trying to create a component in AEM CQ5 which will generate a quiz module. My requirement is to create a dialog which will allow me to create multiple questions each with multiple answers. My dialog xml is as follows - <?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="cq:Dialog"...

CQ5/AEM Dispatcher not retaining charset information

character-encoding,cq5,dispatcher,aem
When we pull content from our publish instances, we get a content type header that states that the content is "charset=utf-8". When this files is served from the dispatcher that charset information is missing. This isn't a problem for web pages which look at the encoding declared in the html,...

CQ QueryBuilder orderby component order within a page

cq5,query-builder,aem,sling
I'm trying, in Adobe CQ 5.6.1, to build a menu listing components added to a page. These components will have an id and I will anchor-link to these so the page will scroll down to them respectively. The problem is i get them in scrambled order. If I laborate in...

AEM 6.0: Customize the page creation wizard?

xml,aem
I successfully overrode the page properties dialog for my custom page component and foolishly assumed it would apply to the create page wizard as well, but that form is still default. It has a load of fields we don't plan to use and is missing the new ones I've added....

AEM 6.0 Image crop tools (using Free Crop / Ratio Crop) not functioning properly but working in CQ 5

java,javascript,jsp,cq5,aem
I'm having a concern on the Image Crop Tool in AEM 6.0. I had an existing code working in CQ5 (with regards to Image Crop Tool), but when I tried to use AEM6.0, this certain tool won't work properly anymore. When I try to crop the image, it doesn't really...

Rewrite Adobe CQ Image src attribute

cq5,aem,sling
In AEM, content such as pages and images contains the '/content/' prefix in them. We are able to rewrite these url via Link Checker Transformer configuration and resourceResolver.map() method. URLs are being rewritten for HTML elements <a> and <form>. But I want it to work for <img> elements as well....

AEM pathfield appending values without changing

adobe,cq5,aem
I have a path field widget in AEM for error page handling. I have added it at the base page implementation and when I try and select the path, I see that there is a "," appended to the path. If I clear the field and save, I see that...

How to use and configure logback in Adobe CQ5 projects?

java,cq5,logback,aem
I newbie in CQ5. I started my first project in CQ and I want to write any exceptions and debug info of project's components, services and servlets (in bundles) to log files in crx-repo (...\crx-quickstart\logs). I want to use slf4j with logback implementation in my project. I tried below steps:...

datefield xtype selection from yy to yyyy

cq5,aem
I am using widget textfield, when i select the date, it populate in format mm/dd/yy but i want mm/dd/yyyy. Does anyone has any idea about any configuration at dialog level that can make it possible. Here is my dialog.xml <?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="cq:Dialog" title="dialog" xtype="dialog"> <items jcr:primaryType="cq:Widget"...

The absolute uri cannot be resolved : Custom Tag Issue

cq5,aem
I am facing one problem when my code goes to publish. I have page in which i used a component with custom tag. It work fine in author, but when i replicate my code from author to publish it gives error like : The absolute uri: http:||www.mysite.com/taglibs cannot be resolved...

Output of jStack

aem,thread-dump,jstack
We are using Adobe AEM on a windows machine. Our Author instances get very slow and to investigate the same we try to take thread dumps by using the command jstack.exe pid > output file The problem is that the output of this command is not same always. Below are...

Output as context html

aem,sightly
The Idea is simple, i have an unordered list, because there is no mod i do the following <ul data-sly-list=${foo}> <li></li> <li></li> <li></li> ${itemList.index== 3 ? '</ul> <ul>' : '' @ context='html'} </ul> the output is some kind of strange the ul's are reverted. <ul data-sly-list=${foo}> <li></li> <li></li> <li></li> <ul>...

unable to write on sitemap.xml (permission denied)

cq5,aem
I am trying to update the sitemap.xml file under "/" . I am getting an error of permission denied, below is the snippet of code. XMLOutputFactory outputFactory = XMLOutputFactory.newFactory(); try { Session session = repository.loginAdministrative(null); XMLStreamWriter stream = outputFactory.createXMLStreamWriter(new FileWriter("/sitemap.xml")); stream.writeStartDocument("1.0"); stream.writeStartElement("", "urlset", NS); stream.writeNamespace("", NS); write(page, stream, resourceResolver); for...

AEM/CQ5 Request Parameter not UTF-8

cq5,aem
Have a slight issue with AEM 6.0 SP1 and the search component. If searching for a french word like "Français" the "ç" gets messed up the query string is like ?q=Français on the JSP side, request.getCharacterEncoding() returns ISO-8859-1 instead of UTF-8 like we need. I know that when under tomcat...

How to create node “var/foo/bar” instead of node.addNode(“foo”).addNode(“baar”)?

cq5,aem,jcr
Is it possible to creeate Node var/foo/baar/ in one step instead of node.addNode("foo").addNode("baar");? Resource resource = resourceResolver.getResource("/var"); Node node = resource.adaptTo(Node.class); Node nodeOfTheFile = node.addNode("foo").addNode("baar"); JcrUtils.putFile(nodeOfTheFile ,filename, "text/csv", inputStream); How to handle, if the nodes already exists by the creation of the nodes?...

AEM Predicate - how to check if property starts with / contains string?

cq5,aem,query-builder
I'm using query builder to search for images in DAM. I use predicates to do that. I'm trying to check metadata dam:MIMEtype property, to return all nodes which starts from image/. How can I do that?...