Quantcast
Viewing all 12476 articles
Browse latest View live

form and post as a method to send request parameter?

Hi all,

 

I have question about best practice in the CQ to send between 2 pages a parameter using a post method in the form.

 

I have simple form on page.html like:

 

<form action="page_2.html" method="POST">

     <input type="hidden" name="flag" value="false" />

</form>

 

and using this form the flag parameter must be send to page_2.html.

 

I'm quite new with this stuff in the CQ, so in advance thanks a lot for any advice.

 

Regards,

kasq


How to custom the ok button in the edit dialog

Hi Team:

I want to log down the user's action when user after edit the attribute in the edit dialog,how to do that?

any suggestions/pointers to solve this problem would be appreciable.

facing org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException

Hi,

I am facing below issue in Performance testing does anyone guide why this error is coming. Individually these pages are running fine. Attached logs for your reference.

 

 

Thank ,

Yogesh

 

 

17.01.2013 05:10:57.232 *ERROR* [135.215.244.155 [1358421056013] GET /content/Intranet/microsite/innovation/right.html HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException org.apache.sling.api.SlingException:

        at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspExceptionInterna l(JspServletWrapper.java:560)

        at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspException(JspSer vletWrapper.java:496)

        at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:448)

        at org.apache.sling.scripting.jsp.JspServletWrapperAdapter.service(JspServletWrapperAdapter. java:59)

        at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java :173)

        at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.j ava:84)

        at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngin eFactory.java:388)

        at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:358)

        at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:170)

        at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:4 56)

        at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:491)

        at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilter Chain.java:45)

        at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:64)

        at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:146)

        at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

        at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:308 )

        at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:141)

        at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

        at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProce ssorImpl.java:280)

        at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChai n.java:49)

        at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:64)

        at com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.doFilter(RedirectFilter.java:185)

        at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

        at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgre ssTrackerLogFilter.java:59)

        at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

        at com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet.doFilter(FormsHandlingServlet.j ava:220)

        at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

        at com.day.cq.theme.impl.ThemeResolverFilter.doFilter(ThemeResolverFilter.java:67)

        at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

        at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:96)

       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

        at org.apache.sling.portal.container.internal.request.PortalFilter.doFilter(PortalFilter.jav a:76)

        at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

        at org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter.doFilter(BackgroundServle tStarterFilter.java:135)

        at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

        at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processRequest(SlingRequestProcess orImpl.java:171)

        at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:199)

        at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:9 6)

        at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)

        at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java: 42)

        at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFil terChain.java:49)

        at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.jav a:33)

        at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:249)

        at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)

        at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)

        at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFil terChain.java:47)

        at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.jav a:33)

        at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java: 48)

        at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)

        at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

        at org.apache.felix.http.proxy.ProxyServlet.service(ProxyServlet.java:60)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

        at org.apache.sling.launchpad.base.webapp.SlingServletDelegate.service(SlingServletDelegate. java:277)

        at org.apache.sling.launchpad.webapp.SlingServlet.service(SlingServlet.java:148)

        at com.day.j2ee.servletengine.ServletRuntimeEnvironment.service(ServletRuntimeEnvironment.ja va:228)

        at com.day.j2ee.servletengine.RequestDispatcherImpl.doFilter(RequestDispatcherImpl.java:315)

        at com.day.j2ee.servletengine.FilterChainImpl.doFilter(FilterChainImpl.java:74)

        at com.day.crx.launchpad.filters.CRXLaunchpadLicenseFilter.doFilter(CRXLaunchpadLicenseFilte r.java:96)

        at com.day.j2ee.servletengine.FilterChainImpl.doFilter(FilterChainImpl.java:72)

        at com.day.j2ee.servletengine.RequestDispatcherImpl.service(RequestDispatcherImpl.java:334)

        at com.day.j2ee.servletengine.RequestDispatcherImpl.service(RequestDispatcherImpl.java:378)

        at com.day.j2ee.servletengine.ServletHandlerImpl.execute(ServletHandlerImpl.java:315)

        at com.day.j2ee.servletengine.DefaultThreadPool$DequeueThread.run(DefaultThreadPool.java:134 )

Caused by: org.apache.sling.api.SlingException:

        at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspExceptionInterna l(JspServletWrapper.java:560)

        at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspException(JspSer vletWrapper.java:496)

        at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:448)

        at org.apache.sling.scripting.jsp.JspServletWrapperAdapter.service(JspServletWrapperAdapter. java:59)

        at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java :173)

        at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.j ava:84)

        at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngin eFactory.java:388)

        at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:358)

        at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:170)

        at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:4 56)

        at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:491)

        at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilter Chain.java:45)

        at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:64)

        at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilterWithErrorHandling(WCMDebugFilter.java:182 )

        at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:149)

        at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

        at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:219)

        at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

        at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProce ssorImpl.java:280)

        at org.apache.sling.engine.impl.SlingRequestProcessorImpl.dispatchRequest(SlingRequestProces sorImpl.java:320)

        at org.apache.sling.engine.impl.request.SlingRequestDispatcher.dispatch(SlingRequestDispatch er.java:208)

        at org.apache.sling.engine.impl.request.SlingRequestDispatcher.include(SlingRequestDispatche r.java:102)

        at com.day.cq.wcm.core.impl.WCMComponentFilter$ForwardRequestDispatcher.include(WCMComponent Filter.java:381)

        at org.apache.jsp.libs.foundation.components.primary.cq.Page.Page_jsp._jspService(Page_jsp.j ava:106)

        at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

        at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:419)

        ... 66 more

Caused by: java.lang.NullPointerException

        at com.day.cq.wcm.foundation.ELEvaluator.evaluate(ELEvaluator.java:53)

        at org.apache.jsp.libs.foundation.components.page.page_jsp._jspService(page_jsp.java:126)

        at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

        at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:419)

        ... 90 more

QueryBuilder builder getting null

Hi

 

I was tried

 

......................................................

 

/**

* This class is an example ,Create selected users under a group

***/

@Component

@Service

@Properties({

        @Property(name = Constants.SERVICE_DESCRIPTION, value = "A sample workflow to sync image b/w servers."),

        @Property(name = Constants.SERVICE_VENDOR, value = "Adobe"),

        @Property(name = "process.label", value = "DAM Image SYNC with Image Server")})

 

public class ImageSync implements WorkflowProcess {

 

     @Reference

           private QueryBuilder builder;

 

           private static final Logger log = LoggerFactory.getLogger(ImageSync.class);

 

          public void execute(WorkItem item, WorkflowSession wsession, MetaDataMap metaData)

                              throws WorkflowException {

                    try{

                    // TODO Auto-generated method stub

 

                              //QueryBuilder builder = resource.getResourceResolver().adaptTo(QueryBuilder.class);

                              Session session = wsession.getSession();

                              Map<String, String> map = new HashMap<String,String>();

 

            map.put("path", "/content/dam/geometrixx");

                  map.put("type", "dam:Asset");

 

                  Query query = builder.createQuery(PredicateGroup.create(map), session);

 

                  //query.setStart(0);

                  //query.setHitsPerPage(20);

 

 

                  SearchResult result = query.getResult();

 

                  Iterator<Node> itr = result.getNodes();

 

                  while(itr.hasNext()){

                            Node node = itr.next();

                            log.info("Node Name : "+node.getName() +"- Path :"+node.getPath());

                  }

                  wsession.complete(item, wsession.getRoutes(item).get(0));

 

                    }catch (Exception e) {

                              // TODO: handle exception

                              log.error("Exceptions @@@ "+e.getMessage());

                    }

          }

 

 

}

 

 

Issue 1 :

 

If i use 

 

    @Reference

     private QueryBuilder builder;

Exceptions :

 

com.day.cq.workflow.impl.job.JobHandler Process implementation not found: com.test.ImageSync

 

Issue 2 :

 

If i use

 

     /**@scr.reference*/

     private QueryBuilder builder;

 

Exception :

[JobHandler: /etc/workflow/instances/2012-11-16/model_12901374305856:/content/fr] com.test.ImageSync Exceptions @@@ null

 

 

Can any one help , How can i use annotations for the Query Builder

Jackrabbit search jcr repository on multiple paths using single query

Hi,

 

I have been trying to work this out: using either xpath or SQL or SQL2, to perform a full text search on multiple paths.

 

i.e.

 

Search for 'promotion' under '/content/mysite/products/%' and '/content/dam/articles/pdfs/products' etc.

 

Tried using the following but none worked so far:

 

SQL2:

 

SELECT * FROM [nt:base] AS s

WHERE  ISDESCENDANTNODE([/content/mysite/products]) or                ISDESCENDANTNODE([/content/dam/articles/pdf/products]) 

and CONTAINS(s.*, 'promotion')

 

SQL:

select * from nt:base where (jcr:path like '/content/mysite/products/%' or jcr:path like '/content/dam/articles/pdf/products/%') and contains (., 'promotion')

 

xpath:

 

/jcr:root/content/[fn:name()='/mysite/products' or fn:name()='/dam/articles/pdf/products]//*[jcr:like(text, '%promotion%')]

 

The reason for making a query like this is because we can than sort the result by jcr:score. If separate queries were used on each path then we need to work out how to consolidate and sort everything according to the score.

 

Already tried predicateGroup but:

1. Very slow

2. 'lower' function isn't working on fulltext search

 

Appreciate any advice or suggestions.

Redirecting page

I am using the redirect option in page properties to redirect pages but the page just displays

"This page redirects to <Page Name>" in publisher mode.

 

Why is it not working?

CRXDE vs Eclipse

Hey everyone,

     Just wondering how most of you do development for CQ5. I did have the developer training and we used CRXDE. Recently however we have consultants that do not recommend it. They recommend Eclipse. It is my understanding that CRXDE is Eclipse but cq-ified. Is CRXDE still distributed with CQ?

 

     We are just about to begin a huge project and I am trying to decide if I want to use Eclipse or CRXDE. My impression was that there were spcific features with CRXDE that relate to CQ that Eclipse would not have. And the consultants argue that CRXDE is obsolete? I'd rather use CRXDE since it is what CQ came with and all the documentation I have from training is in CRXDE.

    

     Can anyone help?

Metadata not getting extracted for images copied to var/dam

Hi

 

 

      Requirement : Resize the image uploaded from desktop

 

            I am moving my image uploaded from desktop (which is present as a file node in my page as below)

Image may be NSFW.
Clik here to view.
req4.png

 

I am copying the jcr:content of this file to a file node(eg: test2.jpg) created in my var/dam

 

 

Image may be NSFW.
Clik here to view.
req5.png

 

 

When i do this step , a launcher will be initiated for DAM Asset Synchroniztion workflow process; which copies the asset from var/dam to content/ dam which will again initaite a launcher for DAM update Asset workflow process will be initaited . As per the workflow it has to create metadata for the image. But metadata is not getting created for my copied image. Can anyone help me ;why it is not getting created, because without metadata renditions is nt getting created

 

 

Thanks

 

Veena


DAM not generating thumbnails

Hi,

 

When I try to upload images to digital assests interface in CQ5.5, it is uploading the file, but doesn't generate thumbnail image. I tried to check crx-quickstart/logs, but there is nothing logged in there. Could someone please help me what are other configurations/logs I need to check to find the cause of this thumbnail generation problem?

Configuring Anonymous access for Sling Servlet

Hello Team,


My use case scenario is Apache webserver directs all the requests to the Sling servlet and Sling servlet would forward the calls to CQ or our internal webapp depending upon the url. I need the anonymous access for accessing my Sling Servlet.

 

When I call my Sling Servlet from the Apache webserver, it is redirected to libs/cq/core/content/login.html. When I hit in the CQ server direcly for that servlet thats not redirecting to the login page and directly the servlet is served. Only when apache webserver dispatches the request, its being redirected to /libs/cq/core/content/login.html.

 

[rid#18017320/initial] (4) RewriteCond: input='/mcdonalds' pattern='^/(.*)$' => matched

[rid#18017320/initial] (2) rewrite '/mcdonalds' -> '/apps/myvanity/forwardvanity?category=mcdonalds'

[rid#18017320/initial] (3) split uri=/apps/myvanity/forwardvanity?category=mcdonalds -> uri=/apps/myvanity/forwardvanity, args=category=mcdonalds

[rid#18017320/initial] (2) local path result: /apps/myvanity/forwardvanity

[rid#18017320/initial] (2) prefixed with document_root to /u/apache/htdocs/apps/myvanity/forwardvanity

[rid#18017320/initial] (1) go-ahead with /u/apache/htdocs/apps/myvanity/forwardvanity [OK]

[rid#180092b0/initial] (2) init rewrite engine with requested uri /libs/cq/core/content/login.html

 

When I look into the configuration in the Apache Sling Authentication Service, I could see the AllowAnonymouAccess option is being checked. Also I tried to configure the AuthenticationRequirements property to

-/apps/myvanity/forwardvanity to allow this url anonymous access explicitly. After the configuration I could even see that my entry got added in the Authenticator tab.

 

Authentication Requirement Configuration
PathAuthentication RequiredDefining Service (Description or ID)
/system/sling/logoutNoApache Sling Request Authenticator
/system/sling/loginNoApache Sling Request Authenticator
/system/sling/cqform/defaultloginNoDefault Login Form for CQ Login Selector Authentication Handler
/loginNoDay Communique LoginServlet
/libs/cq/core/content/loginNoDay CQ Login Selector Authentication Handler
/bin/loginNoDay Communique LoginServlet
/apps/myvanity/forwardvanityNoApache Sling Request Authenticator
/apps/myvanity/forwardvanityNoApache Sling Request Authenticator
/NoApache Sling Request Authenticator

 

Could some one please suggest how to allow the anonymous access for that servlet such that my apache webserver would not redirect to login page. Any suggestions/pointers would be appreciated.

 

Best Regards,

Durga

How to implement Ajax

Hi All,

 

I need to implement Ajax functionality in my component.

 

The requirement is,

1. On clicking on a button Java servlet needs to be invoked.

2. In the servelt, need to access CRX nodes and store a particular value.

3. Back in the component, i need to retrieve this value(this can be doneby accessing the node value).

4. Page should not be refreshed.

 

How can i implement this? any sample code will be helpful to understand the ajax with sevlet implementation.

 

 

if there are any other possiblities, kindly let me know.

 

It is very urgent and needs to implement is as soon as possible.

 

i am in very needy situation.

 

Any help will be really helpful.

 

Thanks a ton in advance.

 

Regards,

Raja R

Title attribute for links in the Rich Text Editor

Our editors would like to make our site WCAG compatible, but are having problems setting title attributes for hyperlinks.

 

Is there any way to allow an editor to set the title attribute when creating a link in the Rich Text Editor?

Connect to JMX tools from java

Hello everyone, hope you’re all having a wonderful day,

 

I’m currently trying to connect to the JMX console’s LDAP functionality through a custom login module. I’m currently trying to use the code located on this web page:

 

http://dev.day.com/content/kb/home/Crx/CrxFAQ/how-to-synchronize-user-with-ldap.html

 

The problem I am running into is this:

 

I run the code, and I am greeted with a null pointer error originating from the line: MBeanServerConnection server = (MBeanServerConnection) JMXConnectorFactory.connect(new JMXServiceURL(serverUrl), attributes).getMBeanServerConnection();

 

What I would like to know is this:

What are the possible causes? I believe that the problem stems from the fact that I cannot connect to the JMX console for some unknown reason, but I could be wrong. I’ve had LDAP working for a while now, so I know that I am able to successfully connect to the server.

 

Additionally: How do I close my connection to the LDAP server after I have finished? I’ve pasted the code below so you guys can try and figure what the problem is. Thanks!

 

            public static void syncUserToCrx(String userName){

                        String userid = "admin";

                        String password = "admin";

                        String serverUrl = "service:jmx:rmi:///jndi/rmi://localhost:9000/jmxrmi";

                        String OBJECT_NAME = "com.adobe.granite.ldap:host=(host),port=389,type=Tools";

                        String[] buffer = new String[] { userid, password };

                        Hashtable<String, String[]> attributes = new Hashtable<String, String[]>();

                        attributes.put("jmx.remote.credentials", (String[]) buffer);       

                        MBeanServerConnection server;

                        ObjectName name;

                        try {

                                    server = (MBeanServerConnection) JMXConnectorFactory.connect(new JMXServiceURL(serverUrl), attributes).getMBeanServerConnection();

                                    name = new ObjectName(OBJECT_NAME);

                                    LDAPUserMBean ldap = (LDAPUserMBean) MBeanServerInvocationHandler.newProxyInstance(server, name, LDAPUserMBean.class,false);

                                    ldap.syncUser(userName);

                                   //This is my trying to close the connection

                                    server.unregisterMBean(name);

                        } catch (MalformedObjectNameException e) {

 

                                    LOG.error("Line 79: "+e.getMessage());

                                    e.printStackTrace();

                        } catch (NullPointerException e) {

 

                                    LOG.error("Line 83: "+e.getMessage());

                                    e.printStackTrace();

                        }

                        catch (MalformedURLException e) {

                                    LOG.error("Line 88: "+e.getMessage());

                                    e.printStackTrace();

                        } catch (IOException e) {

                                    LOG.error("Line 90: "+e.getMessage());

                                    e.printStackTrace();

                        } catch (InstanceNotFoundException e) {

                                    LOG.error("Line 94: "+e.getMessage());

                                    e.printStackTrace();

                        } catch (MBeanRegistrationException e) {

                                    LOG.error("Line 97: "+e.getMessage());

                                    e.printStackTrace();

                        }

 

 

            }

Inserting fragments in CQ AEM 5.6

Hello all,

 

Is there a way to retrieve a fragment from apache docroot and place it in CQ,

probably header as a fragment to be inserted to my site developed in CQ5.6

 

Regards,

NZ

Page impressions from multiple publish servers

Hi,

 

I'm wondering if anybody has any strategies / experience using CQ's inbuilt analytics (ie impressions) from multiple publish servers.

 

In CQ deployments I've been involved in, we've used 'external' analytics and the client's custom templates have not included '/libs/foundation/components/page/stats.jsp'. However, I'd like to understand if I'm missing something here...

 

If the stats were collected on each of the publish servers, there doesn't seem to be any mechanism for automatically aggregating them back on the author server (which would appear to be required for the display in the authoring UI to be useful).

 

I can see that the servlet endpoint for 'recording' the impression (/libs/wcm/stats/tracker.js) can be configured to point elsewhere... however is the recommendation really to point this back to the author environment? Is that really the suggested architecture though?

 

Even aside from the fact that you might not want your author 'externally' accessible (which I guess could be avoided by adding a servlet to publish which 'proxies' the request back to author, or using mod_proxy), surely, letting load from the publish servers anywhere near author doesn't sound like a great idea, plus there's all sorts of authentication issues here. This can be easily demonstrated by firing up a local author and publish, and browsing the Geometrixx online site on Publish as an unauthenticated user (watch for 403s for /tracker.js).

 

I would imagine the concerns above might also apply to the MVT capabilities (although I notice they use a separate tracking endpoint).

 

Am I missing something fundamental here about how this should be leveraged?

 

Thanks in advance,

 

tom


How to write an ajax call to a JSP page

Hi

 

 

    In CQ publish side, I want to call a jsp page on click of a button . I know we cant directly call it from script. For that we have to use ajax either directly or using jquery.ajax. Can any one help me how can i acheive dis. A sample working example code will be very much helpful .

 

 

Thanks

 

veena

How to get SlingScriptHelper in servlet?

I need to get a SlingScriptHelper instance from within my servlet. Either a ComponentContext or BundleContext will do as well, as my only goal is to get sling services using it.

 

  • Using SCR @Reference injection is not a solution for me, because I will determine at runtime what service class I need to get.
  • I've seen posts online that use an activate() method to get ComponentContext, and also decompiled some class that do it, but don't know how to cause sling to call this method and set my ComponentContext
  • I've tried pulling it from the Request scope as an attribute, but sling apparently only puts it there for scripts, not servlets.
  • I've tried injecting all of these objects themselves - none can be injected.

 

Any help? I'm hoping there's some static factory I can just hit and get one of these objects so that I can get services...

Dispatcher permission error

Hi,

 

I've just installed Dispatcher on a Linux install with Apache.

 

It's attempting to connect to the renderer (a local Publish instance) and getting permission denied.  There's nothing obvious to suggest that it can't hit that IP address / port locally.

 

Is there anything else that would prevent it from connecting to the Publish instance??

 

 

[Thu Jul 05 15:30:39 2012] [I] [20332(47748372177664)] "GET /content/vollycoreproduct/en/login.html" 502 - 4008ms

[Thu Jul 05 15:30:39 2012] [D] [20333(47748372177664)] Found farm website for 192.168.99.174

[Thu Jul 05 15:30:39 2012] [D] [20333(47748372177664)] checking [/favicon.ico]

[Thu Jul 05 15:30:39 2012] [D] [20333(47748372177664)] no cache due to authorization header.

[Thu Jul 05 15:30:39 2012] [D] [20333(47748372177664)] cache-action for [/favicon.ico]: NONE

[Thu Jul 05 15:30:39 2012] [E] [20333(47748372177664)] Unable to connect to render rend01 (127.0.0.1:4503): Permission denied

[Thu Jul 05 15:30:39 2012] [E] [20333(47748372177664)] no valid render found

 

Usually if the renderer is unavailable then Apache won't even start, so I'm not sure why it only fails on request.

 

The error message in the browser is a 503 - Bad Gateway

 

The proxy server received an invalid response from an upstream server.


Apache/2.2.3 (CentOS) Server at 192.168.99.174 Port 80

Using AngularJS with Adobe CQ

Has anyone else tried creating single-page applications with AngularJS and Adobe CQ? I'm finding the combination difficult to work with when trying to keep the advantages of the CQ authoring tool. I'm hoping that someone here can relate some of their best practices.

 

In a nutshell, here is the conundrum I'm running into.

 

I'm using AngularJS routes to pull "partial" pages into a view. This is working properly in CQ at the moment, using a set of components, one per partial, linked to a super resource type and template which are emtpy. I have pages declared for each partial in the site tool, and their resourceType is declared properly. The end result is each partial is being pulled without any unnecessary header/footer information being added. That's all good. The problem comes when viewing the site in the authoring tool.

 

The way it's set up is that I have a main template component which draws the site header and footer, including all the script and style tags, then includes a parsys in the middle of the page. Into that parsys I've dropped an instance of a component I created that i'm calling "angularview". It contains nothing but:

 

<div data-ng-view></div>

 

Those familiar with angular will recognize this as a simple view declaration. This is the container tag for angular to drop the currently selected view into based on the route configuration.

 

The way this renders on screen is a header, a blank section, and a footer. All the sub-component partials used by AnguarJS are hidden from the author, and I see no way to obvious way to present them.

 

The only thing I've been able to think of is to add dialogs for each of the partials so that they appear in the sidekick, then create a dummy page in which I drop all the partials. Maybe I could just code them in using <cq:component>, then declare each partial as a container component? This is where I'm hoping someone can offer some advice. What's the best way to go here?

Disabling the "Target" context menu item in AEM v5.6

Is it possible to disable the "Target" context menu item on components in AEM v5.6?  We don't want (at the moment) authors to have this ability and it seems to be interfering with some of our custom rendering code.  We're in the process of upgrading to 5.6 and we'd like to disable this feature for now until we can identify and resolve the issues we're having with it.

 

Thanks!

Viewing all 12476 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>