since ‎21-10-2011
15 hours ago
BrianKasingli
MVP
Re: JCR results order by random or every query must give... BrianKasingli - Adobe Experience Manager
@viki1101, Please try with the code provided: PredicateGroup group = new PredicateGroup(); group.add(new Predicate("mypath", "path").set("path", "/content")); group.add(new Predicate("mytype", "type").set("type", "nt:file")); Query query = queryBuilder.createQuery(group, session); if (query != null) { List list = result.getHits(); Collections.shuffle(list); }
27
Views
2
Likes
0
Answers
Re: AEM(6.5.5) authored experiences & Tealium DTM with As... BrianKasingli - Adobe Experience Manager
What happens when you remove the async from the request?
17
Views
0
Likes
0
Comments
Re: AEM 6.4.8.1 (CFP 1) and POST Requests BrianKasingli - Adobe Experience Manager
Try following this article, https://sourcedcode.com/blog/aem/how-to-make-simple-http-post-methods-in-aem-with-a-http-rest-client
47
Views
0
Likes
0
Comments
Re: AEM 6.4.8.1 (CFP 1) and POST Requests BrianKasingli - Adobe Experience Manager
@cecheta,Try @vanegi's trick, "Allow anonymous", if that does not work, you can try to send a request header:Authorization Basic YWRtaW46YWRtaW4=
46
Views
1
Like
0
Answers
Re: AEM(6.5.5) authored experiences & Tealium DTM with As... BrianKasingli - Adobe Experience Manager
@nicolec5631060 there's a way to implement customisation to ensure client libraries could enable async, https://github.com/nateyolles/aem-clientlib-async.Currently how are you including Tealium as a DTM to your webpage?From my knowledge, a DTM script is nothing but a CDN absolute path, you can easily insert this block of code, within the ,
30
Views
1
Like
0
Answers
Re: MockitoJUnitRunner for junit in AemContext User adapa... BrianKasingli - Adobe Experience Manager
@srinivas_chann1,It looks like you are attempting to write tests for constructor injection, please refer to this code snippet and example for how it can be achieved, https://sourcedcode.com/blog/aem/junit-4-aem-sling-models-unit-test-constructor-injection-example. Secondly, Why are you adapting the resolver to a UserClass.classTestUser user = new TestUser(request.getResourceResolver()); should be TestUser user = request.adaptTo(TestUser.class);Checkout the code snippet and example for Unit Test ...
40
Views
2
Likes
0
Answers
Re: Optimise AEM page with multiple custom components BrianKasingli - Adobe Experience Manager
@aradhyakasat, an example can be found here https://aemcorner.com/include-external-resource-in-aem/
17
Views
0
Likes
0
Comments
Re: Optimise AEM page with multiple custom components BrianKasingli - Adobe Experience Manager
@aradhyakasat, in this case, can you create a strategy to cache the HTML response within the JCR? maybe save the HTML response in /content/my-site/wordpress/*. all subsequent loading of other page will check if the cache exist, if it does, it will render the page using data stored from /content/my-site/wordpress/*
36
Views
0
Likes
0
Comments
Re: published server CSS loading issue. BrianKasingli - Adobe Experience Manager
@imadullak990702,Adobe recommends client libraries should be stored in the /apps folder for example, /apps/weretail/clientlibs/clientlib-site. While utilising the client library utils from Sightly to serve the client library, the rendered CSS file will look like /apps/weretail/clientlibs/clientlib-site.css, this is because you have not enabled the proxy configuration for the client library. In your publish environment, you are not able to access the client library file is because for security pu...
22
Views
1
Like
0
Answers
Re: Character count for a simple text field (not enforce... BrianKasingli - Adobe Experience Manager
@aem-explorer You can register a new validator to the foundation-registry (the foundation-registry is used in the Granite UI framework) via JavaScript utilising the Jquery Validation Library.To register a new validator is simple and looks like this: $(window).adaptTo('foundation-registry').register('foundation.validation.validator', { selector: '.coral3-Textfield', validate: function (el) { var $textField = $(el); // validation code } }); Check out this article on how to enable AEM RichText Max ...
36
Views
1
Like
0
Answers
Re: Optimise AEM page with multiple custom components BrianKasingli - Adobe Experience Manager
@aradhyakasat, How often does the content from the third-party API content's change? How much content is involved? Are you just serving .html rendered files?Yes, definitely there will be a performance hit when you are rendering a .html page with dependencies from an XHR request; XHR responses take time, your website will be absolutely be impacted.An approach for increasing performance is to save and store content from the third-party content API for consuming using the WCMUsePojo API or the JCR ...
89
Views
3
Likes
4
Answers
Re: condition compare in sightly BrianKasingli - Adobe Experience Manager
Adding on to @nupurjain,Can you please provide the Sling Model implementation. You might have written you Sling Model improperly.
56
Views
1
Like
1
Answers
Re: WKND tutorial maven archetype 22 issue BrianKasingli - Adobe Experience Manager
@p1hampi, what is the version of your maven using? Please assign your maven plugin to use JDK 11, this works for me as expected. mvn -v Apache Maven 3.6.0 Java version: 11.0.8, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk-11.0.8.jdk/Contents/Home ...
44
Views
2
Likes
1
Answers
Re: AEM - vault -package filter.xml query BrianKasingli - Adobe Experience Manager
That's Great! My example was a default example to replace everything inside of the JCR. Manual installation works! thats great! it shows that your jackrabbit plugin works as expected! Next, What is your project version? is there a SNAPSHOT?
49
Views
0
Likes
0
Comments
Re: Accessing /services giving 404 BrianKasingli - Adobe Experience Manager
@trc41594544., please check the Apache Sling Servlet/Script Resolver and Error Handler configuration, /system/console/configMgr/org.apache.sling.servlets.resolver.SlingServletResolver. Ensure that the /services/ path is present. Note: If a configured value ends with a slash, the whole sub tree is allowed. Without a slash an exact matching script is allowed. (servletresolver.paths)
57
Views
2
Likes
1
Replies
Re: How to get session inside slingmodel BrianKasingli - Adobe Experience Manager
@dipu2,It might be possible to get the session from the current session of the current request, but the session obtained may not have the correct permissions to the path: content/damsite/skuid. If the session have no permission to the content path, then you can get a content not found an exception. Also, Sling Models should be lightweight and should have minimal logic. Your requirement seems like there might be mid-weight logic that can be re-usable. This would be a great time to create an OSGIS...
54
Views
3
Likes
1
Answers
Re: AEM - vault -package filter.xml query BrianKasingli - Adobe Experience Manager
@priyavnair Your filtering.xml file looks correct. What is your project's version? If there is no SNAPSHOT, then you need to manually click on install from the package manager, every time the package is uploaded into AEM. During development, we are expected to work against a SNAPSHOT version.Secondly, if the SNAPSHOT version is not the problem, can you manually install the package in the package manager? I have a strong feeling that it might be the SNAPSHOT version not exist, as you may need to ...
56
Views
1
Like
2
Answers
Re: Naming convention for Experience Fragments Title and... BrianKasingli - Adobe Experience Manager
@shyams67489715,There is no such naming convention that is enforced for experience fragments.I recommend creating your own naming convention for the experience fragment's structure folder names, folder-title and folder-node-name, in a strategic way because it will definitely help the content stay organised in the long run.For example:/content/experience-fragments/my-site/structure/* - this folder contains experience fragements that defines some of the structure HTML blocks that constructs your w...
31
Views
3
Likes
0
Answers
Re: How to save form fragment data individually BrianKasingli - Adobe Experience Manager
Hello @ramandeep, Sure you can use the GuideBridge API to save the XML schema based on the user's behaviour, but It would be very difficult to save/manage sets of XML in chunks within the MySQL DB. To retrieve and stitch files the XML schema together would be troublesome (as the form's XML structure can be always changing).Since you said you have a very large fragment, you must be worried about the data being corrupted being saved. What you can try is:After a form have been submitted, save the X...
35
Views
2
Likes
1
Answers
Re: DefaultGetServlet errors during any bundle install BrianKasingli - Adobe Experience Manager
@pablom63973339,You are absolutely correct.Whenever you install the AEM archetype project or the WKND starter project using your maven skills, for example, mvn clean install -PautoInstallSinglePackage, at the most basic level, you are uploading and installing AEM components and scripts to AEM (you can find it in CRX/DE,http://localhost:4502/crx/de/index.jsp. At the same time, the backend bundle is being installed (typically the bundle is named "core" by using the AEM archetype project, and the ....
38
Views
2
Likes
0
Answers
Re: Parsys not appearing with editable template - AEM 6.4... BrianKasingli - Adobe Experience Manager
@BaluM,When you generated the /conf folder, you might have copied over some references of we.retail example, rather than using AEM's out of the box configuration manager, http://localhost:4502/libs/granite/configurations/content/view.html/conf, where this is a common mistake as most developers take templated or inspiration from the we.retail project. How to fix: My suggestion is to analyse the nodes from "/conf/projname/settings", and ensure there are no references to the we.retaill components &...
22
Views
2
Likes
0
Answers
Re: Is there a granite component for a key value? BrianKasingli - Adobe Experience Manager
@jkpanera ,Your requirement to allow authors to insert custom Key Pair Values from the Granite UI dialogue is possible. Simply use the Multifield and two, child text-field Granite UI components for your dialogue configuration.An example of a configured dialogue would look something like this:Here's how the Granite UI configuration XML example: After the component have been configured and saved, your JCR node structure should be organised as so:Now your content should be structured an...
24
Views
2
Likes
0
Answers
Re: Using querybuilder to retrieve all assets with partic... BrianKasingli - Adobe Experience Manager
@AnshuSingh2701,Where you are querying, /content/dam, will show you 0 results, it maybe because your AEM platform has reached the maximum node traversal, LimitReads of 10,000. You will need to change the limit from your environment's system/console, but please be warned as when you increase this number, it may affect the overall performance.http://localhost:4502/system/console/jmx/org.apache.jackrabbit.oak%3Aname%3Dsettings%2Ctype%3DQueryEngineSettingsGive this a try.
47
Views
3
Likes
0
Answers
Re: I want to create a flush agent using curl command BrianKasingli - Adobe Experience Manager
@keshavk9410 , you can try this curl command below:curl -H "CQ-Action: FLUSH" \ -H "CQ-Handle: /content/my-sire-2" \ -H "Content-Length: 0" \ -H "Content-Type: application/octet-stream" \ http://_dispatcher-server-hostname_[:port]/dispatcher/invalidate.cache curl -H "CQ-Action: DELETE" \ -H "CQ-Handle: /content/my-site-1" \ -H "Content-Length: 0" \ -H "Content-Type: application/octet-stream" \ http://_dispatcher-server-hostname_[:port]/dispatcher/invalidate.cacheThe documentation can be found fr...
53
Views
2
Likes
0
Answers
Re: Editable Template - Issues BrianKasingli - Adobe Experience Manager
@samr99530769,Make sure your editable template is referencing to a valid resource in the JCR, does /wcm/foundation/components/responsivegrid exist? does this resource have the correct permissions?, and is the pre-configured component setup properly?Can you please provide us with a screenshot of the structure of your editable template?Also, after creating a page, can you screenshot the successfully created page, so we can analyse the node structure?
99
Views
2
Likes
0
Answers
Re: Move and delete button are missing for certain security groups BrianKasingli - Adobe Experience Manager
hello @jc-yme,Can you please verify that the user group have permissions to "Delete" a certain resource within AEM. A common cause of the missing "Delete" and "Move" button will be because of the usergroup/user does not have ACL permissions to delete.
64
Views
2
Likes
0
Replies
Re: Find authoring modes Using Java Script in AEM BrianKasingli - Adobe Experience Manager
@Veenna_Vikram, you might be mentioning the sightly code, mentioned by @Chitra-maden, where ${wcmmode.toString} will expose the mode of the page context. EDIT, PREViEW, DISABLED, DESIGN, etc...
125
Views
0
Likes
0
Comments
Re: Angular based pages not loading on IE. BrianKasingli - Adobe Experience Manager
If you wish to support IE 11 and lower, then you must use the fetch polyfill JavaScript library https://github.com/github/fetch
48
Views
0
Likes
0
Comments
Re: clientlibrarymanager.js accessible on Author Server b... BrianKasingli - Adobe Experience Manager
@James-Collett Also, does your Dispatcher configuration, https://publish-6.5.2/etc.clientlibs/clientlibs/granite/clientlibrarymanager.js, allow /etc.clientlibs/* ?
53
Views
2
Likes
0
Answers
Re: Find authoring modes Using Java Script in AEM BrianKasingli - Adobe Experience Manager
I think this is a pretty great option. Very Simple, no Java-Use API required, and simply Sightly..
74
Views
0
Likes
0
Comments