adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
733 stars 741 forks source link

Embed Core component 2.19.2 and AEM 6.5.12 #2355

Open ncordeiro opened 1 year ago

ncordeiro commented 1 year ago

I am on AEM 6.5.12 and hence using the version of core component 2.19.2 The core embed component options that i plan to use is URL embed and embeddable Issue1 URL embed - I noticed that the processor does not pick a query url in a query. If the below url is keyed in, on editing the text field, the processor passes a url to check if it can be processed. the processor returns a response. https://domain/g/mobile/javascript/calendar.js?widgetId=xxx&calendarId=xx

import com.adobe.cq.wcm.core.components.services.embed.UrlProcessor; ....

@Component(label = "CustomProcessor Service", metatype = true, immediate = true) @Service(value = UrlProcessor.class)

public class CustomUrlProcessor implements UrlProcessor { public Result process(String url) { LOGGER.info("***INSIDE Custom processor {}",url); //Note ... ... } }

Observations - url value displayed in log is only first query parameter on editing the url field in the dialog box[1]; whereas on save of the dialog shows the url with both query params[2] [1] https://domain/g/mobile/javascript/calendar.js?widgetId=xxx [2] https://domain/g/mobile/javascript/calendar.js?widgetId=xxx&**calendarId**=xx

Issue2

while creating an embeddable, i ended up overlaying and noted that the embeddable had to point to core/wcm/components/embed/v1/embed/embeddable and not v2 version of embed.

You would see this on the latest version of acs commons as well. Is there a reason why we would use v1 vs v2? I believe i see documentation stating either could be used. kindly assist

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="cq:Component" jcr:title="Marketo" sling:resourceSuperType="core/wcm/components/embed/v1/embed/embeddable" componentGroup=".hidden"/>

**Concern**

Is it normal to see an error like below when url cannot be processed? i see this with Pinterest as well. Do we anticipate any dispatcher rules or permissions ?

image

image

image image

ncordeiro commented 1 year ago

Please assist @vladbailescu