Quantcast
Channel: Adobe Community: Message List
Viewing all 91209 articles
Browse latest View live

AEM6.1 : Touch UI : Inheritance on newly created page

$
0
0

All,

We are facing one issue when creating a new page within a livecopy. On opening this page and modifying page properties in touchui, all default aem properties (like page title, tags, description) are disabled and there is an inheritance icon. If i open same page in classic ui, none of the page properties are disabled and do not show that they are being inherited. Since this is newly created page, it should not have properties inherited from blueprint. Has anyone faced this discripency between touch ui and classic ui in AEM6.1? Whats the solution?

Attached is screenshot of page in both touchui and classic ui.

 

Thanks in advance.

Regards,

Mayank


AEM6.2 forms

$
0
0

Hi Team,

Need a clarification on licensing part of AEM adaptive forms.

With AEM6.2, Adaptive form features is available (without feature-pack). Is this module part of AEM license or additional AEM Form license will be required?

Please get me clarity on this.

Module –

 

API :-

 

Thanks,

AryA.

Non XFA-based Document of Record

CQ5.4 bundle.location file not updated.

$
0
0

I am using CQ5.4 version. Each release I am updating the Maven pom version by 1 and same version I am also using for bundle name ex: /apps/<app>/install/common-4.0.6.5-SNAPSHOT.jar

And I have added the filter.xml file like below:

<filter root="/apps/<app>">
        <include pattern="/apps/<app>(/.*)?" />
        <include pattern="/apps/<app>/install(/.*)?" />       
</filter>

And each deploy I am uninstaling old package and installing the new package.  After deployment bundle version is updated but bundle.location file and in felix console not updated.

bundle.location file path: (\crx-quickstart\launchpad\felix\bundle127\bundle.location)

How to update this? Anyone please help me on this?

For reference attached the image please check.

Unable to add custom device groups (emulators) in Touch UI emulator mode - AEM 6.1

$
0
0

Hi,

We were trying to create a custom device group on the lines of what is used in the geometrixx-gov site. The OOTB device group provided is /etc/mobile/groups/responsive

Now the issue is that any custom device group with a name other that responsive like /etc/mobile/groups/custom is not detected by the page when in the Touch UI emulator mode. I do not know if this is a guideline as to only use the name "responsive" but it sure seems like a limitation.

Let me know if this is an issue or I am doing something wrong here.

PFA snap shot for reference.

Thanks 

LiveCycle Workbench and server setup

$
0
0

Hi,

I am trying to install the AEM forms Workbench. Some of the details  asked for are:  “Username and Password” .But I am not fully sure what to enter here. I have tried default value “admin” for both Username and Password but it is not accepting.

For LiveCycle Server :  What are the Host and HTTP Port, Are they for AEM server? I have entered the default host(localhost/IP information/fully qualified Computer name) and port(8080/4702(AEM instance Port)) details but it is giving unauthorized error.

Please suggest what details should be entered .

Thanks & Regards,

Dharmendra Shukla

java.lang.NoClassDefFoundError in OSGi even when dependencies are added in POM CQ5

$
0
0

I am trying to convert an .docx file to html using apache POI. Now the case is when I deploy my bundle to OSGi felix in CQ5 I am getting the exception as  :

java.lang.NoClassDefFoundError: org/openxmlformats/schemas/wordprocessingml/x2006/main/impl/CTSectPrImpl$1HeaderReferenceList at org.openxmlformats.schemas.wordprocessingml.x2006.main.impl.CTSectPrImpl.getHeaderReferenceList(Unknown Source) at org.apache.poi.xwpf.converter.core.MasterPageManager.visitHeadersFooters(MasterPageManager.java:200) at org.apache.poi.xwpf.converter.core.MasterPageManager.addSection(MasterPageManager.java:178) at org.apache.poi.xwpf.converter.core.MasterPageManager.compute(MasterPageManager.java:125) at org.apache.poi.xwpf.converter.core.MasterPageManager.initialize(MasterPageManager.java:95) at org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor.visitBodyElements(XWPFDocumentVisitor.java:226) at org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor.start(XWPFDocumentVisitor.java:193) at org.apache.poi.xwpf.converter.xhtml.XHTMLConverter.convert(XHTMLConverter.java:68) at org.apache.poi.xwpf.converter.xhtml.XHTMLConverter.doConvert(XHTMLConverter.java:58) at org.apache.poi.xwpf.converter.xhtml.XHTMLConverter.doConvert(XHTMLConverter.java:38) at org.apache.poi.xwpf.converter.core.AbstractXWPFConverter.convert(AbstractXWPFConverter.java:45) at com.maximintegrated.wcm.handlers.SoftwarePartDownloadHandler.wordFileFrmURLToHTML(SoftwarePartDownloadHandler.java:112) at com.maximintegrated.wcm.handlers.SoftwarePartDownloadHandler.activate(SoftwarePartDownloadHandler.java:56)
  • I tried creating the simple java project and that works like a charm when I added all the required jars in configure build path -> external jars .
  • I created a maven project also and added all the dependencies in its POM and this also worked fine. POM file dependencies are pom.xml.
  • But when I create a maven project for AEM6 with the same dependencies and deploy to OSGi felix, there is no compile time error but at runtime I get the above exception. have tried it in various CQ instances. Still no luck.
    Also I tried building the ooxml-schemas-1.1.jar as bundle and installing it separately in felix OSGi because thats the jar where that class in coming from, but that also gives the same error.

cq 5.6 problem in opening URL


Re sizing issue in grid layouting

$
0
0

In layouting mode I kept four components set side by side (desktop.jpeg).

In mobile resolutions I want all four components to lie one below the other, which I'm able to achieve(mobile.jpeg). But the problem is, I want each of them to take 100% width of the display as shown in second image. I'm not able to achieve this. Is there any solution or a clue which will point me in the right direction.

Inject Javascript during run-time in HTML5 forms

$
0
0

I found out that under HTML5 forms I can write Javascript code that can access the entire document model and any code that would normally run in a browser, it would run under HTML5 element events.

For example see snapshots below below. I add this code to the click event:

debugger; txtImageStr.rawValue = imgFld.rawValue; imgFld.rawValue = null; app.alert("button id _5 = " + document.getElementById("_5").id); document.getElementsByName("_5")[0].addEventListener("click", myFunc)

And it worked properly when used the LC Forms Manager to preview the form

Question: Does this mean I can use Javascript Code Injection method to enrich the client side functionality for example, to add image controls and similar stuff?

AEM Forms 6.2 Workbench/Designer Preview HTML5

$
0
0

Hello,

I have recently installed and configured AEM Forms 6.2 on JEE on a 2012 VM using the Turnkey solution, and have installed Workbench and Forms Designer on a separate 2008 VM. Through Workbench, I have successfully configured the connection to the Forms server and logged in. I have set up a TestForm, and when I open it in Workbench it launches the Forms Designer as expected. After adding a couple of fields to the form, I can preview in PDF and it renders properly. However, when I attempt to preview as HTML the screen is blank. When I view source  all that displays is the blank page:  <html><head></head><body></body></html>. Has anyone experienced this issue? 

On the Forms Server admin console, I have added IP of the 2008 server Workbench and Designer have been installed on to the Allowed Referrer whitelist and specified port value 0 to allow all ports. After which I restarted the server as directed

Based on an article I came across (https://helpx.adobe.com/aem-forms/6-2/preview-xdp-forms-html.html#html_preview_of_forms_in _forms_designer), I logged in to configMgr (http://[server]:[port]/lc/system/console/configMgr) to configure the Apache Sling Authentication Service where:

  • I enabled anonymous access
  • added the following to the authentication requirements field:
  •     -/content/xfaforms
  •     -/etc/clientlibs

After another server restart, I logged into the Workbench/Designer machine and relaunched Workbench > opened the TestForm which launched the designer, previewed as PDF successfully > Attempted to preview as HTML with no luck. 

Has anyone come across this issue? Any tips/insight would be greatly appreciated. 

Capturing workflow comments from previous step to be sent as email notification to next participant step user.

$
0
0

Capturing workflow  comments from previous step to be sent as email notification to next participant step user.

My Code is as below. I am always getting the workflow comments from start.

My requirement is  : Once first participant comment has been passed to the next participant step then this step shoudl be skiped to capture next steps comments to following participant step user.

My Workflow is with multiple participant steps attached  along with this question.

My Custom Workflow code is Pasted below.

Your help in this regard is really helpfull.

 

CODE:

 

package au.com.****.workflow;

   
//This is a component so it can provide or consume services
@Component
   
    
@Service
  
@Properties({
    @Property(name = Constants.SERVICE_DESCRIPTION, value = "Send Email workflow process implementation."),
    @Property(name = Constants.SERVICE_VENDOR, value = "BTES"),
    @Property(name = "process.label", value = "Send Email Workflow Process") })
public class SendEmailWorkProcess implements WorkflowProcess {


    /**
     * Default log.
     */
    protected final Logger log = LoggerFactory.getLogger(SendEmailWorkProcess.class);
    private static final String DEFAULT_CHARSET = "utf-8";

    /**
     * resource resolver factory.
     */
    @Reference
    private ResourceResolverFactory resourceResolverFactory;

 

    @Reference(policy = ReferencePolicy.STATIC)
    private ResourceResolverFactory resolverFactory;

    //Inject a MessageGatewayService
    @Reference
    private MessageGatewayService messageGatewayService;
    private String someproperty = "";
    private String currentassignee = "";

    public void execute(WorkItem item, WorkflowSession wfsession, MetaDataMap metaData) throws WorkflowException {

 

        MetaDataMap workflowMetaDataMap = item.getWorkflowData().getMetaDataMap();
        Node submitNode = null;
        ResourceResolver resolver;
        try {
            resolver = resourceResolverFactory.getResourceResolver(Collections.singletonMap("user.jcr.session", (Object) wfsession.getSession()));
        } catch (final Exception e) {
            throw new com.day.cq.workflow.WorkflowException("could not get resource resolver", e);
        }

        try {
            log.info("Here in execute method of SendEmailWorkProcess");    //ensure that the execute method is invoked


            HistoryItem previousHistoryItem;
            log.info("SendEmailWorkProcess 1");    //ensure that the execute method is invoke

            String stepType;

            log.info("SendEmailWorkProcess 2");    //ensure that the execute method is invoked

            List<HistoryItem> history = wfsession.getHistory(item.getWorkflow());
            log.info("SendEmailWorkProcess  "+history.toArray().length);    //ensure that the execute method is invoked

            Iterator<HistoryItem> historyIterator = history.iterator();


            while (historyIterator.hasNext()) {

                previousHistoryItem = historyIterator.next();

                stepType = previousHistoryItem.getWorkItem().getNode().getType();

                log.info("\n stepType : " + "\n" + stepType);

                if (stepType != null && stepType.equals(WorkflowNode.TYPE_PARTICIPANT)) {
                    someproperty = previousHistoryItem.getWorkItem().getMetaDataMap().get("comment", String.class);
                    String currentassignee = previousHistoryItem.getWorkItem().getCurrentAssignee();
                    log.info("\n comment : " + "\n" + someproperty);
                    log.info("\n Current Assignee : " + "\n" + previousHistoryItem.getWorkItem().getCurrentAssignee());

                    String template = getEmailTemplate(metaData, wfsession);
                    if (template != null) {
                        // get the string substitutes
                        Map<String, String> valuesMap = new HashMap<String, String>();
                        valuesMap.put("comments", someproperty);
                        valuesMap.put("currentassignee", currentassignee);
                        StrSubstitutor substitutor = new StrSubstitutor(valuesMap);
                        final HtmlEmail email = createEmail(template, substitutor);
                        messageGatewayService.getGateway(HtmlEmail.class).send(email);
                        log.info("Email was sent.");
                    } else {
                        log.warn("Did not send email. No email template defined");
                    }

                    log.info("\nInside send email code section 3...");
                    
                    break;
                } else {

                    log.info("\nNo Step type or someproperty Found...");

                }
                
            }


        } catch (Exception e) {
            e.printStackTrace();
        }
    }


    private String getEmailTemplate(MetaDataMap workflowMetaDataMap, WorkflowSession session) {
        String template = workflowMetaDataMap.get("template", String.class);
        if (template == null) {
            // load mail template
            String templatePath = workflowMetaDataMap.get("PROCESS_ARGS", String.class);
            log.info("templatePath***************"+templatePath);
            template = loadTemplate(session.getSession(), templatePath);
        }
        log.debug("Loaded template: {}", template);
        return template;
    }


    @SuppressWarnings("rawtypes")
    private HtmlEmail createEmail(final String template, final StrSubstitutor substitutor) {
        final HtmlEmail email = new HtmlEmail();
        try {

            final CountingInputStream in = new CountingInputStream(
                    new ByteArrayInputStream(template.getBytes(DEFAULT_CHARSET)));
            final InternetHeaders iHdrs = new InternetHeaders(in);
            final Map<String, String[]> hdrs = new HashMap<String, String[]>();
            final Enumeration e = iHdrs.getAllHeaders();
            while (e.hasMoreElements()) {
                final Header hdr = (Header) e.nextElement();
                final String name = hdr.getName();
                log.debug("Header: {} = {}", name, hdr.getValue());
                hdrs.put(name, iHdrs.getHeader(name));
            }

            // use the counting stream reader to read the mail body
            String templateBody = template.substring(in.getCount());

            // create email
            email.setCharset(DEFAULT_CHARSET);

            //Set the mail values
            String emailToRecipients = "snayakar@btes.com.au";
            String emailCcRecipients = "reyanshsn@gmail.com";

            log.info("\nInside send email code section 2...");

            email.addTo(emailToRecipients);
            email.addCc(emailCcRecipients);
            email.setSubject("AEM SendEmailWorkProcess Step");
            email.setFrom("snayakar@btes.com.au");

            // set subject
            //final String[] ret = hdrs.remove("subject");
            //final String subject = (ret == null ? "" : ret[0]);
            final String subject = "Fast Publish Workflow Process";
            log.info("Email subject: " + subject);
            if (!StringUtils.isEmpty(subject)) {
                email.setSubject(substitutor.replace(subject));
            }

            // set message body
            templateBody = substitutor.replace(templateBody);
            log.debug("Substituted mail body: {}", templateBody);
            email.setMsg(templateBody);

            IOUtils.closeQuietly(in);
        } catch (Exception e) {
            log.error("Create email: ", e.getMessage());
        }
        return email;
    }


    /**
     * Loads the mail templates from the repository.
     *
     * @param path    mail templates root path
     * @param session session
     * @param charSet The character set
     * @return a reader to the template or <code>null</code> if not valid.
     */
    public String loadTemplate(final Session session, final String path) {
        InputStream is = null;
        try {
            final Node content = session.getNode(path + "/" + JcrConstants.JCR_CONTENT);
            is = content.getProperty(JcrConstants.JCR_DATA).getBinary().getStream();
            final InputStreamReader r = new InputStreamReader(is, DEFAULT_CHARSET);
            final StringWriter w = new StringWriter();
            IOUtils.copy(r, w);
            return w.toString();
        } catch (final Exception e) {
            log.error("Error while loading mail template {}:{}", path, e.toString());
        } finally {
            IOUtils.closeQuietly(is);
        }
        return null;
    }
}

Firefox and IE issue

$
0
0

hi,

I use window.guideBridge for validations of forms. If javascript:window.guideBridge.submit is typed on address bar of the browsers(FF, IE), the submit logic gets exposed. Please let us know about this.

Use of /etc/map on Publish Instance

$
0
0

I have a question related to best practices of /etc/mapping .

Following are two nodes under /etc/mapping for my Publisher

 

If I only add mapping  [1]  and access a page on publish instance,  I see all publisher urls on the page pointing to localhost:8087 (Dispatcher)  E.g. http://localhost:8087/equipment/swimming/abidjan-water.html

When I add the mapping [2] and access a page on Publish instance all URLs on the page are pointing to  localhost:4503 E.g , http://localhost:4503/equipment/swimming/abidjan-water.html .

Is this a good practice to have etc/map  for publisher explicitly?

I am looking for a way so URLs on publisher would appear without any of the redirect rule.

Chrome auto-completion of form fields

$
0
0

Hi,

I have an adaptive form in AEM 6.1. When you fill in form fields with the suggested auto-completes from Chrome, the input data is not recognized as value. Which also means, that validation is not triggered and you can't submit if there is a mandatory field. I've added a screenshot.

Is this a know bug?

Thanks,Alex


Retrieve PDF file generated by Form

$
0
0

Hi,

I am having some difficulties on finding the way of getting some data programmatically about the PDF documents generated by my form.

What I did is set the Submitting actions like so:

After hitting submit I can effectively see that the file has been stored in CRX:

 

Now my question is, how can I access these PDF files information programmatically? For now I would only need the PDF path in order to create a href tag in my html to allow users download their documents.

So after some digging the best approach that I could find is implementing the interface SubmittedAFDataService (https://helpx.adobe.com/aem-forms/6-1/javadocs/com/adobe/fd/fp/service/SubmittedAFDataServ ice.html), but I haven't had any success on that, plus the interface is deprecated (I did not find which is the new interface that replaces it)

Unable to create archetype maven project

$
0
0

Hi All,

I am newbie to AEM and following the steps of Creating an AEM project using Eclipse IDE.

Have configured Maven. But i couldn't able to create Adobe CQ archetype project.

I am executing the command,

" mvn archetype:generate -DarchetypeRepository=http://repo.adobe.com/nexus/content/groups/public/ -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.2 -DgroupId=com.aem.community -DartifactId=echoproject -Dversion=1.0-SNAPSHOT -Dpackage=com.aem.community -DappsFolderName=myproject -DartifactName="My Project" -DcqVersion="5.6.1" -DpackageGroup="My Company" "

But, it is showing error as,

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.day.jcr.vault:multimodule-content-package-archetype:1.0.2) -> [Help 1]

Please help in fixing this issue.

Regards,

Maria Anto

Can we call any function on panel's add(plus symbol) ,delete(minus symbol) buttons?

$
0
0

Hi,

PFA

I have a repeatable panel(Applicant).I added sub-panels under this.I have another repeatable panel(Employment).In this panel i am reading First panel's name in a drop Down.My issue is when i am deleting any sub panel from the panel(Applicant) the drop down in panel(Employment) not refreshing.it's still showing same values.

Can we call any function on panel's add(plus symbol) ,delete(minus symbol) buttons?

~R

Problems calling the guideStoreContentSubmission.submissionForStoreContentUsingServiceUser(userSession,guideStartParameter,path);

$
0
0

Hi

I was following this Post:

https://helpx.adobe.com/aem-forms/6/custom-submit-action-form.html

 

and I encountered a problem in this code section (from the example)

String storeContent = "/libs/fd/af/components/guidesubmittype/store";
FormsHelper.runAction(storeContent, "post", resource,slingRequest, slingResponse);

 

The problem is during the call of this function (inside of the post.jsp script of /libs/fd/af/components/guidesubmittype/store)

guideStoreContentSubmission.submissionForStoreContentUsingServiceUser()

on top of that I didn't find any information or documentation of this function....

the error is the following

com.adobe.aemds.guide.service.GuideStoreContentSubmission Failed to create path or set permissions.

and the stack trace is attached....

AppSpider Security issue

$
0
0

Hi

This is regarding security issue what we are getting while running AppSpider(security app).Please help me on the same.

On security run we are getting

 

buffer overflow issue

 

 

Wondering from code point of view where we are sending this value.

 

 

And also for parameter fuzzing issue

Parameter Fuzzing

 

Viewing all 91209 articles
Browse latest View live


Latest Images

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