Quantcast
Viewing all 12476 articles
Browse latest View live

Creating custom Adobe CQ commerce providers [ERROR]

I am trying to create a custom Adobe CQ commerce provider using maven, following this tutorial : Creating custom Adobe CQ commerce providers

 

I am able to create the Adobe CQ archetype project successfully. However, when i try to run the command mvn eclipse:eclipse, i encounter the following error:

 

C:\AdobeCQ\commerce-training>mvn eclipse:eclipse
[INFO] Scanning for projects...
[WARNING] The POM for com.day.jcr.vault:content-package-maven-plugin:jar:0.0.13
is missing, no dependency information available
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project com.adobe.training:commerce-training-content:1.0-SNAPSHOT
(C:\AdobeCQ\commerce-training\content\pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin com.day.jcr.vault:content-pack
age-maven-plugin:0.0.13 or one of its dependencies could not be resolved: Failur
e to find com.day.jcr.vault:content-package-maven-plugin:jar:0.0.13 in http://re
po.maven.apache.org/maven2 was cached in the local repository, resolution will n
ot be reattempted until the update interval of central has elapsed or updates ar
e forced -> [Help 2]
[ERROR]     Unknown packaging: content-package @ line 20, column 16
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
gException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException

 

The pom.xml file is the default one generated from the command executed from the tutorial:

 

<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">    <modelVersion>4.0.0</modelVersion>    <!-- ====================================================================== -->    <!-- P A R E N T P R O J E C T D E S C R I P T I O N -->    <!-- ====================================================================== -->    <parent>        <groupId>com.adobe.training</groupId>        <artifactId>commerce-training</artifactId>        <version>1.0-SNAPSHOT</version>    </parent>    <!-- ====================================================================== -->    <!-- P R O J E C T D E S C R I P T I O N -->    <!-- ====================================================================== -->    <artifactId>commerce-training-content</artifactId>    <name>Commerce Training Package Package</name>    <packaging>content-package</packaging>    <build>        <resources>            <resource>                <directory>src/main/content/jcr_root</directory>                <filtering>false</filtering>                <excludes>                    <exclude>**/.vlt</exclude>                    <exclude>**/.vltignore</exclude>                </excludes>            </resource>        </resources>        <plugins>            <plugin>                <groupId>org.apache.maven.plugins</groupId>                <artifactId>maven-resources-plugin</artifactId>                <configuration>                    <includeEmptyDirs>true</includeEmptyDirs>                </configuration>            </plugin>            <plugin>                <groupId>com.day.jcr.vault</groupId>                <artifactId>content-package-maven-plugin</artifactId>                <extensions>true</extensions>                <configuration>                    <group>adobe training</group>                    <filters>                        <filter>                            <root>/apps/commerce-training</root>                        </filter>                    </filters>                    <embeddeds>                        <embedded>                            <groupId>${project.groupId}</groupId>                            <artifactId>commerce-training-bundle</artifactId>                            <target>/apps/commerce-training/install</target>                        </embedded>                    </embeddeds>                    <targetURL>http://${crx.host}:${crx.port}/crx/packmgr/service.jsp</targetURL>                </configuration>            </plugin>        </plugins>    </build>    <dependencies>        <dependency>            <groupId>${project.groupId}</groupId>            <artifactId>commerce-training-bundle</artifactId>            <version>${project.version}</version>        </dependency>    </dependencies>    <profiles>        <profile>            <id>autoInstallPackage</id>            <build>                <plugins>                    <plugin>                        <groupId>com.day.jcr.vault</groupId>                        <artifactId>content-package-maven-plugin</artifactId>                        <executions>                            <execution>                                <id>install-content-package</id>                                <phase>install</phase>                                <goals>                                    <goal>install</goal>                                </goals>                            </execution>                        </executions>                    </plugin>                </plugins>            </build>        </profile>    </profiles></project>

 

Any ideas how to get this to work? Thanks in advance!


CQ 5.4 - How to create a column layout?

Greetings everyone;

 

 

  I'm trying to create a website with some components that I get from a imported site... So far, so good, but when I try to drop a "column" component in my website from the components little window (even when I select the 2 columns or the 3 columns), the is no one column layout and the "columns" doesn't exist

 

  In Geometrixx samples, the columns got layouts like "2 columns, 50 x 50 x" and others, but none is listed on my Column Layout dialog (editing the component). I try to find the source-code of the component, but without success. Can someone tell me how to get real "columns" structures on my site?

 

  Some images:

 

 

    Image may be NSFW.
Clik here to view.
No Columns 1.jpg

 

     Image may be NSFW.
Clik here to view.
No columns 2.jpg

Facing problem in Rich text component

Id attribute of Div tag is stripped in Rich text component. How do we handled this. Any help regarding this appreciated?

CQ is adding the nomatch selector to the url

HI,

 

When i am trying to access page mobile/en/sample.touch.html, CQ is adding mobile/en/sample.nomatch.html.

 

I was deployed my project in Author and Publish Instances.

 

Which working fine in Author instance , I am getting this issue when i  am accessing page in Publish .

 

Can any one help me how can solve this ? Image may be NSFW.
Clik here to view.
error.png

How to write a subquery using JCR SQL2 in CQ5(without ModeShape)

Hi,

 

We have a parent node with several levels of child nodes. We are trying to do a node level search i.e., if the search key is present in any of the properties in the parent node or the child nodes, the query must return the parent node alone(NOT the child nodes).

 

The below JCR SQL2 query will do the above said functionality,

SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/DB/ParentNode]) and CONTAINS(s.*, 'searchKey')

 

The constraint is that we have other filters, which when applied, will give only the nodes which has the required property. For example

SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/DB/ParentNode]) and CONTAINS(s.*, 'searchKey') and column1 = 'filter1'

 

where column1 is present only in the ParentNode and not the child nodes.

 

Hence the above query will limit the search to the ParentNode only and it will not search the child nodes. Also when you use the first query you are getting child node path but my requirement is to get all the Parent Node paths.

 

And so I decided to write a sub-query like the one shown below,

SELECT * FROM [nt:base] as a

WHERE PATH() IN (

   SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/DB/ParentNode]) and CONTAINS(s.*, 'searchKey')

)

and column1 = 'filter1'

 

But the above query is not working in CRXDE Lite. When i searched the web it is said that sub-query and join conditions are possible only using ModeShape.

 

I have no idea what ModeShape is. If any one has any idea on writing a sub query using JCR SQL2 in CQ5 without ModeShape, please help. Thanks in advance.

How to disable/enable a dialog dynamically?

I use <cq:include> to include a component, which has a dialog. I want to disable the dialog dynamcally based on some condition, i.e. not allow the author to open the dialog when he double-click on the component. How can I achieve that easily?

 

Thanks,

sling:ResourceSuperType foundation/components/page

Hi Everybody,

 

I'm new to CQ and really enjoying it.  I have a question if someone can please help?

 

Can anyone help me understand how sling resolves a page component that has a resourceSuperType of  foundation/components/page ?  I created a page structure similar to the geometrixx pages, and have the following page component.

 

components/page/contentpage

body.jsp

content.jsp

footer.jsp

header.jsp

 

Therefore I discovered that I can override the body.jsp as this is the page selected by sling (I originally had contentpage.jsp).  Also using this structure I understand that if I have another template and page component I just extend the above "contentpage" component and override "content.jsp" keeping my web site structure (Nice!).

 

But what I don't understand is how how sling resolves to the body.jsp as the preferred script in the first place? Can anyone help me understand?

 

Thanks

Darren

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


How to check CQ version installed in publisher

Dear All,

 

Could anyone please let me know how to find out which version of CQ has been installed on publish instance?

 

Regards

OSGI bundle creation using third party jar files

Hi,

 

I have a requirement to integrate our CQ5.5 based application with a third party. As part of this, I have to use some jar files. After lot of digging, I realised that the way to use external jar files is to create an OSGI bundle wrapping these jar files.

So, I tried to do the same, but when I see the service details in system/console, I see errors. Can someone please suggest what could have gone wrong?

 

I have to use 3 jar files. So, I placed them in lib folder as shown in the screenshot below.

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

 

Ibuilt the bundle using .bnd file. It generated a jar file in install folder and I am able to to see its details in system/console/bundles. When I try to view details of the OSGI bundle that is installed, I see errors as follows:

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

Provide alternative JSON renderer? Without losing default JSON renderer?

REQUIREMENT

Construct some custom JSON rendition of a page. For example: /content/site/page.my.json

 

And we want to accomplish this without losing the out-of-the-box functionality:

 

  • /content/site/page.html - WORKS OUT OF THE BOX
  • /content/site/page.json - WORKS OUT OF THE BOX

 

WHAT WE'VE TRIED

 

We've added a jsp to our global page template and named it my.json.jsp. This has given us this behavior:

 

  • /content/site/page.my.json - INVALID RECURSION SELECTOR (the request gets handled by default json renderer and "my" is not a valid recursion selector)
  • /content/site/page/_jcr_content.my.json - WORKS (we can see our custom json renderer working), but we have other reasons we cannot use this URI.

 

So we're nearly there. Next, we add "json" to the list of extensions that are treated with default resolution behavior, by going to felix config and editing the "Apache Sling Servlet/Script Resolver And Error Handler:
Image may be NSFW.
Clik here to view.
resolverconfig.png

 

By doing this, now our custom json WORKS, but we get the following results:

  • /content/site/page.my.json  - WORKS (our custom JSON renders)
  • /content/site/page.json - DOESN'T WORK (html is rendered rather than the default JSON renderer)

 

How can we provide this custom renderer at *.my.json without losing the functionality of the default  *.json renderer, necessary for dialogs in the page properties, etc.

 

Thanks!

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

Activation of page failing due replication

I am trying to activate camapign or articles but failed to do so. Earlier i used to do but facing below error:

Please help me to resolve.

ReplicationOptions{synchronous=false, revision='null', suppressStatusUpdate=false, suppressVersions=false, filter=null, aggregateHandler=null}

04.12.2012 04:04:26.989 *ERROR* [172.16.119.96 [1354611866971] POST /bin/replicate.json HTTP/1.1] com.day.cq.replication.impl.servlets.CommandServlet Error during replication: Unable to create version for /content/Intranet/News/2012/11/12112__lookbacktest (v2). com.day.cq.replication.ReplicationException: Unable to create version for /content/Intranet/News/2012/11/12112__lookbacktest (v2).

        at com.day.cq.wcm.core.impl.VersionManagerImpl.preprocess(VersionManagerImpl.java:293)

        at com.day.cq.replication.impl.ReplicatorImpl.replicate(ReplicatorImpl.java:317)

        at com.day.cq.replication.impl.servlets.CommandServlet.doPost(CommandServlet.java:109)

        at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.ja va:148)

        at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.jav a:344)

        at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.jav a:375)

        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:147)

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

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

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

        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:287)

        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.theme.impl.ThemeResolverFilter.doFilter(ThemeResolverFilter.java:67)

        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 org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:96)

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

        at com.day.cq.wcm.core.impl.WCMRequestFilter.doFilter(WCMRequestFilter.java:119)

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

        at org.apache.sling.rewriter.impl.RewriterFilter.doFilter(RewriterFilter.java:84)

        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:150)

        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 )

        at java.lang.Thread.run(Thread.java:662)

Caused by: com.day.cq.wcm.api.WCMException: Unable to create version.

        at com.day.cq.wcm.core.impl.PageManagerImpl.createRevision(PageManagerImpl.java:1145)

        at com.day.cq.wcm.core.impl.PageManagerImpl.createRevision(PageManagerImpl.java:1027)

        at com.day.cq.wcm.core.impl.VersionManagerImpl.preprocess(VersionManagerImpl.java:290)

        ... 64 more

Caused by: javax.jcr.version.VersionException: Node 0868d5ce-7c75-4db8-824d-40e392405820 has no version history

        at org.apache.jackrabbit.core.version.InternalVersionManagerBase.calculateCheckinVersionName (InternalVersionManagerBase.java:701)

        at org.apache.jackrabbit.core.version.InternalVersionManagerBase.internalCheckin(InternalVer sionManagerBase.java:637)

        at org.apache.jackrabbit.core.version.InternalVersionManagerBase.checkin(InternalVersionMana gerBase.java:610)

        at org.apache.jackrabbit.core.version.InternalVersionManagerImpl$4.run(InternalVersionManage rImpl.java:411)

        at org.apache.jackrabbit.core.version.InternalVersionManagerImpl$DynamicESCFactory.doSourced (InternalVersionManagerImpl.java:713)

        at org.apache.jackrabbit.core.version.InternalVersionManagerImpl.checkin(InternalVersionMana gerImpl.java:407)

        at org.apache.jackrabbit.core.version.InternalXAVersionManager.checkin(InternalXAVersionMana ger.java:236)

        at org.apache.jackrabbit.core.version.VersionManagerImplBase.checkoutCheckin(VersionManagerI mplBase.java:188)

        at org.apache.jackrabbit.core.VersionManagerImpl.access$100(VersionManagerImpl.java:73)

        at org.apache.jackrabbit.core.VersionManagerImpl$1.perform(VersionManagerImpl.java:122)

        at org.apache.jackrabbit.core.VersionManagerImpl$1.perform(VersionManagerImpl.java:115)

        at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)

        at org.apache.jackrabbit.core.VersionManagerImpl.perform(VersionManagerImpl.java:96)

        at org.apache.jackrabbit.core.VersionManagerImpl.checkin(VersionManagerImpl.java:115)

        at org.apache.jackrabbit.core.VersionManagerImpl.checkin(VersionManagerImpl.java:101)

        at org.apache.jackrabbit.core.NodeImpl.checkin(NodeImpl.java:2856)

        at com.day.cq.wcm.core.impl.PageManagerImpl.createRevision(PageManagerImpl.java:1093)

 

Message was edited by: Yogesh

Create a new xtype containing html5smartimage

Hi all

 

I'm trying to create an xtype that contains an html5smartimage element.

 

Apart from adding the html5smartimage to a Panel, is there anything else required?

 

The following is rendered to my dialog, but this doesn't contain the Crop / Resize / Map icons or the placeholder text.

Image may be NSFW.
Clik here to view.
image-xtype.png

When dropping images from ContentFinder to this area, I get the following error:

Image may be NSFW.
Clik here to view.
image-error.png

CODE

this.newPanel = new CQ.Ext.Panel({

 

    cls: "test",

 

    layout: "fit",

    border: true,

    autoHeight: true,

    items: {

        xtype: "panel",

        layout: "form",

        border: false,

        autoHeight: true,

        defaults: {

            labelWidth: 70,

            anchor: "100%"

        },

        items:[

            {

                 xtype: "panel",

                 border: false,

                 items: [{

                     height: 150,

                    title:"Image",

                    ddGroups: ["media"],

                    ddAccept: ["image/.*"],

                    border: true,

                    disableZoom: true,

                    allowUpload: false,

                    fileNameParameter:"./fileName",

                    fileReferenceParameter:"./fileReference",

                    cropParameter:"./imageCrop",

                    mapParameter:"./imageMap",

                    requestSuffix:".img.png",

                    rotateParameter:"./imageRotate",

                    name:"./file",

                    uploadUrl:"/tmp/upload/*",

                    xtype: "html5smartimage"

                 }]

            }

        ]

    }

});

Multiple smartimage widgets in a component dialog

Is there a way to have multiple smartimage widgets in a single dialog? Specifically I'm struggling with the requestSuffix parameter. Most of the other ones I can adapt to get the second widget to save its info to a different location from the first, but I can't see how to do that with requestSuffix. If the values are the same for both widgets, then once an image is selected, I see the same image in both tabs of the dialog. If I change it to something like /image2.img.png, it's no longer hitting the component as the resource. If I change it to .image2.img.png, the script handling this selector appears to break. I might be able to change that script, but that doesn't seem like it'll be a very flexible approach.

 

Any other options? I'm in CQ 5.4 if that matters.


load balancing CQ5.5 author cluster

Hello,

 

I've setup a cluster of CQ5.5 author instances.  All authors are behind a VIP on a BigIP load balancer.  The BigIP service check is hitting port 4502 every 5 seconds and causing the following to get logged in error.log, which is quite annoying.

 

04.09.2012 11:37:02.769 *INFO* [95.80.105.21 [1346783822769] GET / HTTP/1.1] org.apache.sling.auth.core.impl.SlingAuthenticator getAnonymousResolver: Anonymous access not allowed by configuration - requesting credentials

 

Anyone have suggestions for different URIs to hit for a load balancer service check?  I suppose I could write a custom monitor.  Anyone with experience using CQ5 + BigIP, have a custom monitor they're willing to share?

 

Thanks,
Jeffrey

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...

I'm getting a 403 forbidden error message on publish instance

I am using Adobe CQ 5.5 and I have some components using clientlibs folder (css + js).

 

On the author instance everything seems to work just fine.

 

The problem is when i go to the publish instance ... I get 403 forbidden errors when it tried to reach the js and css URLs.

 

Any ideas why?

 

Thanks!

Horacio.-

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.

How to add a document to the JCR Repository via Java API

I'm trying to get started with the JCR 2.0 " Content Repository Java Technology API Specification" It's really a great document but I miss a minimum of examples to visualize how it is all fits together.

For a start I want to add a pdf-document to my local CRX repository. Form the book I see, that I must add a Node and add the Properties.

 

File file = new File("/mypath/mydocument.pdf");
FileInputStream is = new FileInputStream(file);
ValueFactory valueFactory = session.getValueFactory();
Binary myBinary = valFact.createBinary(is);
Value valueFactory =valFact.createValue(myBinary);
Node nodeCarl=content.addNode("Carl", "nt:file");
Property pCarl=nodeCarl.setProperty("jcr:data", myBinary);

The program fails with:

javax.jcr.nodetype.ConstraintViolationException: no matching property definition found for {http://www.jcp.org/jcr/1.0}data in the lastt cited line.

I don't know, why this comes up with ..jcr/1.0; The Classpath consists of JCR-2.0.jar and jackrabbit-standalone-2.2.13.jar.

 

Any hint to get this stored is appreciated.

Ulrich

Viewing all 12476 articles
Browse latest View live


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