Quantcast
Viewing all 12476 articles
Browse latest View live

Permission Inheritance Problem

My client is having an issue with permission inheritance down their page tree.  Here's a small sample of the page hierachy we are dealing with:

 

  • F0 (sling:OrderedFolder)
    • F1 (sling:OrderedFolder)
      • jcr:content (nt:unstructured)
      • P1 (cq:Page)
      • P2 (cq:Page)
      • P3 (cq:Page)

 

We need to be able to ALLOW the "modify" and "create" actions for F0 and have it inherit all the way down through the pages.  However, when we do this, the inheritance for "modify" stops after F1.  F0 will allow "modify" (this is where we set ALLOW).  F1 will allow it.  F1's jcr:content node will allow it.  None of the children of F1 that are pages will allow "modify".  However, the "create" action will inherit all the way down through just fine.

 

It gets weirder.  If we add ALLOW "delete" to F0 it fixes the problem.  All three of the actions inherit all the way down through.  So we tried setting them one at a time.  Setting just "delete" inherits all the way down through.  Setting just "create" does too.  Setting just "modify" does not work.  It has the same unexpected behavior where the cq:Page nodes do not inherit the permission.

 

I'm not completely convinced this is a product bug because it only happens in the client's application.  I tried to replicate the same scenario on a standalone instance on my dev machine using the Geometrixx site and everything worked as expected.  So I'm looking for some feedback...

 

Is there something about the permission model that I'm not thinking about correctly that would explain this behavior?  Are there any node-types, properties, etc. that I should be looking out for (maybe something that has given you trouble in the past)?  Really I would appreciate any feedback on the issue, because this is a pretty strange one.  I plan to cross post this to the Google Group as well.  Thanks a lot!


Maven plugin for managing CQ5 packages

Hi,

 

Here's some new documentation that explains how to use the Content Package Maven plugin. You can package and install content from your maven build...for example, in your POM, add goals for package creation and installation to automatically deploy the OSGi bundle that was built. You can perform other package management tasks on remote servers, like rebuild packages,  and list, uninstall, and remove them.

 

http://dev.day.com/docs/en/cq/current/core/how_to/how_to_use_the_vlttool/vlt-mavenplugin.h tml

 

scott

How to Schedule a workflow Item?

Hi,

 

I need to schedule a workflow item to trigger at a particular date specified by the content author.

 

My Existing Workflow :

 

Approval1 ----> Approval2 ------>Approval3-----> MyCustomWorkFlowProcessStep----> Archive&ActivateItem(com.day.cq.wcm.workflow.process.CreateVersionProcess) ------> Activate Page/Asset(com.day.cq.wcm.workflow.process.ActivatePageProcess)

 

 

In MyCustomWorkFlowProcessStep, I want to schedule the next 2 steps to execute on the particular date specified by the author. How can this be done?

 

 

My Approach :

 

I created a class which implements WorkflowProcess. In that class I am scheduling a job using sling schedulig jobs to fire the job at the particular day. Now I need to call the other 2 pending workflow Items in the workflow, How can I achieve this? Can I directly call the CreateVersionProcess and ActivatePageProcess since they are osgi services? Also, is this the right way to do this?

 

Thanks a lot in advance

--Rajesh

CQ5.5 ecommerce integration

Dispatcher serving, but not caching, CQ5 pages

Just restored a backup of a CQ5.5 staging server to a new Amazon EC2 instance in order to allow some people outside of the company shared access to what we are working on.  CQ5 appears to be running correctly for the author and publish instances; I can see our site.

 

But the dispatcher in Apache is having trouble caching files, it seems.  Apache can serve the URLs requested of it, but it fails to cache any of them, so that every requested is actually being serviced by the publish instance through the dispatcher.  This is the dispatcher log showing the problem:

 

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Found farm pmlpublic for ec2-174-129-90-184.compute-1.amazonaws.com

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] checking [/content/public/individuals-families/financial-life/planning-strategies.html]

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] no cache due to authorization header.

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] cache-action for [/content/public/individuals-families/financial-life/planning-strategies.html]: NONE

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] connected to render rend01 (localhost:4503)

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: Host

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: Cache-Control

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: User-Agent

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: Accept

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: Referer

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: Accept-Encoding

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: Accept-Language

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: Accept-Charset

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: Cookie

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: Via

[Thu Oct 11 17:58:59 2012] [D] [820(139934505617152)] Detected: chunked transfer encoding

[Thu Oct 11 17:58:59 2012] [D] [820(139934505617152)] response.status = 200

[Thu Oct 11 17:58:59 2012] [D] [820(139934505617152)] response.headers[Server] = "Day-Servlet-Engine/4.1.24 "

[Thu Oct 11 17:58:59 2012] [D] [820(139934505617152)] response.headers[Content-Type] = "text/html;charset=UTF-8"

[Thu Oct 11 17:58:59 2012] [D] [820(139934505617152)] response.headers[Date] = "Thu, 11 Oct 2012 17:58:59 GMT"

[Thu Oct 11 17:58:59 2012] [D] [820(139934505617152)] response.headers[Set-Cookie] = "JSESSIONID=e4bb6232-7726-4258-a724-f111ccf0eed9; Path=/; HttpOnly"

[Thu Oct 11 17:58:59 2012] [D] [820(139934505617152)] send http headers

[Thu Oct 11 17:58:59 2012] [D] [820(139934505617152)] Content length: -1, written: 54000

[Thu Oct 11 17:58:59 2012] [I] [820(139934505617152)] "GET /content/public/individuals-families/financial-life/planning-strategies.html" 200 53979 330ms


That "cache-action: NONE" is the issue.

 

I've checked permissions in the cache directory, and they match those of our staging servers - best I can tell.  But nothing ever gets written to disk for caching.

 

I'm guessing that I am missing something obvious, and my gut tells me I've dealth with this before, but I just can't get it going.  Any ideas?

How to connect to CRX from Javascript?

Hi

 

      I want to connect to the crx from my script function and retrieve a node in my script so dat i cant retrieve the properties of that node using script... Is dat possible? If yes how is it acheivable ?

 

 

Thanks in Advance

 

Veena

CQ5.5 Certification 9A0-327:

I have worked in Fatwire technology. I am totaly new to cq.

My company is asking me to take CQ5.5 Certification in two months.

How hard the exam is?

Can somebody suggest some good materials or questions.

CQ_Analytics.record

As for tracking in CQ5 I am using CQ_Analytics javascript call. I have CQ_Analytics.record in template body.jsp that applies for all pages and have another CQ_Analytics.record at a component level that writes only event and evar.

1.

In Body.jsp - writing all traffic variables         

CQ_Analytics.record({event: 'pageView', values: { section_channel: '<%=makUtil.getProperty(currentPage, "section_channel")%>', subsection1: '<%=makUtil.getProperty(currentPage, "subsection1")%>', subsection2: '<%=makUtil.getProperty(currentPage, "subsection2")%>', subsection3: '<%=makUtil.getProperty(currentPage, "subsection3")%>', subsection4: '<%=makUtil.getProperty(currentPage, "subsection4")%>', locale: '<%=makUtil.getProperty(currentPage, "locale")%>' }, componentPath: '<%=resource.getResourceType()%>'})

which gets applied on all pages.

 

  1. Another CQ_Analytics.record call at a given component level that is applied only when that particular component is included.

CQ_Analytics.record({event: 'LeadCompletePref', values: { LeadType: 'Lead Complete' }, componentPath: '<%=resource.getResourceType()%>'})

  

When I open a page that does not contain this component, the second record call does not kick in and I see all s.prop values set in step 1 in the Adobe Digitalplus debugger

 

When I open a page that does contain this component, the second record call kicks in and I see the event7 and evar10 but all s.prop values set in step 1 record are not visible in the Adobe Digitalplus debugger  any more. Is my approach correct? Does the second binding in record unbinds the one in step1 so those s.props are not sent to Omniture? In that scenario, how to handle it?


i18n - how to add support for more languages (CQ 5.4)

I have a number of questions around adding support for more languages. We are already using multiple languages and would like to add more.

 

1. Standard languages provided

in /libs/wcm/core/i18n I can see the standard ootb languages for CQ 5.4: de es fr it ja zh-cn

How can I add more? Are there additional language packages provided by Adobe for CQ 5.4?

 

 

2. Translator tool

We have our own additional keys/strings in

  /apps/site/i18n/publish

 

When I open these with the translator tool

  /libs/cq/i18n/translator.html

as admin, I can see them all just fine.

However when I open them as another user, I only see the columns of the languages defined in /libs/wcm/core/i18n

There is a description how to extend this for 5.5 here:

http://dev.day.com/docs/en/cq/5-5/developing/cq5-translator.html#Changing%20Languages%20Li sted%20in%20the%20Grid

and I have added the languages to /etc/languages in the "languages" property, but this does not work with 5.4 apparently (at least as far as I have tried).

I still only get the default languages from /libs/wcm/core/i18n despite the other languages being there in

  /apps/site/i18n/publish

and as admin I can see and edit them.

How do I make them visible and editable for other users?

 

 

3. Tags

When editing the translations of tags, I want all the possible languages to appear in the dialog box for editors.

I have extended the "languages" property in /etc/tags and this works basically fine (as expected) as described in:

http://dev.day.com/docs/en/cq/5-5/developing/cq5-translator.html#Changing%20Language%20Nam es%20and%20Default%20Countries

 

The desired language must be supported and listed in:

  /libs/wcm/core/resources/languages

 

I want to use a 2-letter iso code (e.g. "no" for Norway") and this desired 2-letter iso code must exist as a node. If that is not the case and only nodes with locales exist (e.g. "no_no" and "no_no_ny") then a 2-letter node must be created with a default setting pointing to the default locale.

I have tried this and it works fine as expected when the default language node is created in

  /libs/wcm/core/resources/languages

But /libs is a system folder that should not be modified, it could be potentially overwritten by Adobe packages.

The 5.5 docs say to create the node in

  /apps/wcm/core/resources/languages

instead, but this did not work for me in CQ 5.4 and I could find no other docs describing a process for 5.4

How to do this properly in 5.4?

How to Publish Design Dialog content ?

Hi,

 

Senario:                    Whenever we update or enter content in design dialog , it won't get publish while activating the page.

Understanding:          Becaue design dialog content get stored under /etc/design/myapp/ with particular templates, So while activating the page this content won't publish.

 

Now Question is :      How to Publish Design Dialog content ?(Apart from activation tree because it has own limitations, like you can't activate single page or node using

                                   activation tree)

 

 

Regards

Brijesh Yadav

Fail to access CRX with JcrUtils.getRepository

I just started with CQ5/CRX/JCR, so I beg your pardon if asking silly questions.

I'm running a CQ5 Standalone Server (CQ_5_5_Quickstart.jar) on my Windows 7 and am fine with accessing it with my browser and the URL "http://localhost:4502".

Now I try to access it via a Java-client using the JcrUtils.getRepository-method, as described in http://dev.day.com/docs/en/crx/current/developing/accessing_the_crx.html.

But this fails with message:

javax.jcr.RepositoryException: Unable to access a repository with the following settings:

    org.apache.jackrabbit.repository.uri: http://localhost:4502/crx/server

The following RepositoryFactory classes were consulted:

    org.apache.jackrabbit.commons.JndiRepositoryFactory: declined

Perhaps the repository you are trying to access is not available at the moment.

at org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:199)

at org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:239)

at AccessJCR.connectJcrUtils2(AccessJCR.java:32)

at AccessJCR.main(AccessJCR.java:16)

 

I'm not sure about the used URL; I just took it from cited webpage. There is said: "The default server's endpoint URL is http://host:port/crx/server. Make sure you adapt the client-side connection URL in case of customized server installation.".

I didn't customize anything so this should be ok. I will attach the complete Code, hopefully you can give some hints.

 

Regards,

Ulrich

 

[code]

import java.util.*;

import javax.jcr.*;

public class AccessJCR {

      public AccessJCR() {}

 

      public static void main(String[] args) {

           AccessJCR ajcr = new AccessJCR();

           try {

                ajcr.connect();

           }

           catch (Exception ce) {

                ce.printStackTrace();

            }

        }

 

      private void connect() throws Exception {

           //Create a connection to the Day CQ repository running on local host

           Repository repository = org.apache.jackrabbit.commons.JcrUtils.getRepository("http://localhost:4502/crx/server");

        }

}

[/code]

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

How to auto crop an image?

How do you auto crop an uploaded image?  I see that there are workflow steps and it seems there might be a couple that can create new assets, but where is the documentation for that? 

 

Also, how do you set the auto crop aspect ratio for the html4image widget?

How to automate CQ5 using selenium??

how to automate Cq5 using selenium.

 

Extjs is genrateing random values dynamically.

 

How can i get the unique ids from my application.

CQ, CQ.i18n is not Defined | Publish Instance | CQ 5.4

Hi,

 

We are using OOTB CQ.i18n.getMessage for localized JQuery Messages. everything is working as expected on Auhor instances but on Publish , it is throwing CQ is not Defined, CQ.i18n is not defined JAVA SCRIPT Errors.

 

Code e.g.

email: CQ.I18n.getMessage("APP201")

 

Do we need to enable any extra JS call or include any JS file into the clientlibs? Any pointers to this would be apreciated.

 

 

Thanks

Vinay


Mobile Device Detecting UserAgent Matching order

I am working on CQ5 mobile template device detection, here are some of the constrains/requirements:

  • We dont have latest version of WURFL DB and neither we can update to latest.
  • Only have two device groups Mobile (smart phones, Tablets) and Desktop

 

I basically want to verify the order in which device detection happens, as per my understanding it is following order:

 

  1. Look into WURFL database for device
  2. If not found in WURFL database then look for RegEx (/libs/wcm/mobile/wurfl/regex) to match to WURFL device mapping
  3. If not found (in #2) then goto nomatch case
  4. If found (in #2) then match UserAgent (which can be a regex) with defined deviced for the page heirarchy

Please enlight if this order seems incorrect or incomplete.

 

Given that this order is correct than if there a way to have it do the UserAgent check in #4 first and dont bother checking the whole WURFL database?

 

Thanks in advance!

How to use batch mode in cq dam - new questions added

Hi I am doing DAM migration. I am using custom code to pick the image and create asset by calling Assetmanager.createAsset which creates dam assets.

This code I am calling through the scheduler which will run for every 0.5 hr. Around 1000 images we are trying to push in each cycle. I came acrosss batchMode for saving all the images per batch so that it will reduce the migration time But I am not sure how to use it.

.setBatchMode(true); isBatchMode are the methods available in Asset api.

Please share your thoughts on this.

 

Some more Point I want to ask.

1.What is the best appraoch when we are pushing images to DAM

     Stopping the workflows push all the images and run the work flows. (Is it possible to do this?)

     Do the both simultaniously

     Do it in the bath (i.e push bunch of images and then run the workflows)

 

2.When i am migrating images (from file system which is residing in the same box where cq is running )it is almost taking 0.5 hr for 1000 images (avg size of image is 100kb). Is there any possibility to      improve this process.

 

3. When I am adding images I am adding subassets to some of the images so when ever I add subasset cq is creating new version of the asset which is not required for me. What is the best approach to avoid      creating too many versions for images in DAM. By doing this is there any performance improve in the system.

 

 

Thanks,

Maruthi

How do I add a static image to a CQ5 component?

Hi all,

 

I'm pretty new to CQ5 and still getting my head around how everything hooks up.  I'm trying to make a component.  It is a panel containing two panels side by side and I would like to show a static image inside one of the panels.  The image can be hardcoded and I don't need/want the functionality of the smartimage widget. How can I do this?

 

Thanks!

version purging is not working

Hi,

 

1. When I try to configure wersion purging as below.

     a. Created osgi config node with this com.day.cq.wcm.core.impl.VersionManagerImpl pid

     b. Added properties

     versionmanager.ivPaths  string[] /content/dam/abc,/content/dam/def

     versionmanager.purgingEnabled Boolean true

     versionmanager.maxNumberVersions Long 1

 

     This seems to be working on one machine which is running on java 1.6_37 but the sae configuration is not running on another machine which is running on      java 1.7. We are using 5.5 sp2. Please provide what are the ways to troubleshoot this issue. Currently based on the Versions tab in the dam asset editor      window we ar saying versions are creating or not.

 

2. Is there any Adobe recommended package available for purging existing versions in DAM?

 

3. What is the use of DAm health checker? This is not at all working.

Can not access bundle context from JSP in CQ5.5

I created an OGI bundle , named :

 

 

com.sdl.ws.integration.profserv.webservice.connector.server.external.beans

I can see the bundle under :

 

 

http://localhost:4502/system/console/bundles

Following is my JSP code , using which I am trying to access a bundlecontext

 

 

<%@ page import="org.osgi.framework.BundleContext"%>

<%@ page import="org.osgi.framework.FrameworkUtil"%>

<%@ page import="com.sample.osgi.components.FormattingServiceImpl.*"%>

<%@ page import="org.osgi.service.cm.ConfigurationAdmin"%>

<%@ page import="org.osgi.service.cm.Configuration"%>

<%@ page import="org.osgi.service.packageadmin.PackageAdmin"%>

<% BundleContext bundleContext =      FrameworkUtil.getBundle(FormattingServiceImpl).getBundleContext();  %>

 

I am getting the following error : FormattingServiceImpl cannot be resolved , Class name "FormattingServiceImpl" is missing

 

I tried to use multiple ways to import the jar but nothing is working ,

Here is a structure how my bundle is configured :

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

 

 

I am stuck on the point how to access the bundle context from JSP , does any one has any suggestions / corrections ?

Viewing all 12476 articles
Browse latest View live


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