Coder Social home page Coder Social logo

adobe / aem-modernize-tools Goto Github PK

View Code? Open in Web Editor NEW
64.0 15.0 40.0 8 MB

A suite of tools to modernize your AEM Sites implementations off legacy features.

Home Page: http://opensource.adobe.com/aem-modernize-tools/

License: Apache License 2.0

Java 91.88% CSS 0.58% JavaScript 6.25% HTML 1.29%

aem-modernize-tools's Introduction

Maven Central Build Codecov License

AEM Modernization Tools Suite

This suite of tools provides AEM Development teams with converting legacy AEM features to the current capabilities. It consists of:

  • Template Conversion Tool (Static -> Editable)
  • Policy Conversion Tool (Design Configurations -> Policies)
  • Component Conversion Tool (Legacy -> Modern/Core)

Goals

The goal of this project is to provide development teams with a framework for updating their AEM implementations. Consumers of this project should be able to execute conversions by providing the minimally necessary rewrite rules for their sites

Install

The tool should work on instances of AEM 6.5 or newer. To install it, review the documentation on the setup page.

Usage

Documentation for the tools contained within this project can be found on Adobe's HelpX Documentation site.

Contributing

Contributions are welcomed! Read the Contributing Guide for more information.

Licensing

This project is licensed under the Apache V2 License. See LICENSE for more information.

aem-modernize-tools's People

Contributors

arunsathiya avatar badvision avatar bstopp avatar dependabot[bot] avatar gknobloch avatar ujjwal5 avatar web-flow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aem-modernize-tools's Issues

RepoInit failure on local SDK

Expected Behaviour

When installing the package into AEMaaCS SDK, it should not error during the RepoInit process

Actual Behaviour

This error occurs:

17.11.2021 21:28:49.315 *ERROR* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.repoinit.RepositoryInitializer~aem-modernize)] com.adobe.granite.repository.impl.SlingRepositoryManager Exception in a SlingRepositoryInitializer: RepositoryInitializerFactory, references=[], scripts=1
java.lang.RuntimeException: Failed to set ACL (javax.jcr.PathNotFoundException: Cannot set ACL on non-existent path /etc/designs) AclLine ALLOW {paths=[/etc/designs], privileges=[rep:write]}

Steps to Reproduce

Platform and Version

  • AEMaaCS SDK
  • AEM 6.5 quickstart

Logs taken while reproducing problem

LiveCopy and BluePrint configs moved to Root

After the successful conversion of Classic Template to Editable Template, cq:LiveSyncConfig and cq:BlueprintSyncConfig are moved to root node. we had to right a custom script to move them back to jcr:content node.

It would be better if we have a config for "skip nodes"

Warning on Wizard node named "config"

Don't name nodes in the JCR config - they have connotations for security and may prevent use by non-administrator users.

Logs taken while reproducing problem

Warning in scan:

Node /apps/aem-modernize/content/component/job/create/body/items/form/items/wizard/items/details/items/fixedColumnContainer/items/fixedColumn/items/config is an OSGi config or install path which contains non-OSGi-related children that will not be visible to non-administrative users.

Exception because of empty XML file

Hi,

I am surprised no one has caught this one before but when I try to use the modernize tools I am greeted with this Exception in my error.log:

ERROR [qtp35781411-1541] org.apache.jackrabbit.vault.fs.impl.io.GenericArtifactHandler Error while parsing /jcr_root/libs/cq/modernize/design/content/console/import/.content.xml:
{}    org.xml.sax.SAXParseException: Premature end of file

If I remove the empty XML file (/jcr_root/libs/cq/modernize/design/content/console/import/.content.xml) everything works.

I am running AEM 6.5 SP2.

The set up page is down

The set up page is down (https://opensource.adobe.com/aem-modernize-tools/pages/plan-operate/set-up.html)

Expected Behaviour

Instructions show on page

Actual Behaviour

page not found 404

Reproduce Scenario (including but not limited to)

https://opensource.adobe.com/aem-modernize-tools/pages/plan-operate/set-up.html

Steps to Reproduce

https://opensource.adobe.com/aem-modernize-tools/pages/plan-operate/set-up.html

Platform and Version

Mac os Chrome

Sample Code that illustrates the problem

Logs taken while reproducing problem

Policy importer doesn't copy child nodes with cq:copyChildren

According to the documentation, you can use cq:copyChildren in the rules to copy a tree of content from the designs folder to the policies folder. This does not work, as only the parent node is copied.

For example designs for the text core component cannot easily be converted. They are set up like this :



...
</>

The only thing that gets copied to the policy is the text node

Tool throws error, but the session was still getting saved leading to partial conversion

Expected Behaviour

When tools throws error in conversion, the repository session should not be saved. This leads to partial conversion of the page.

Actual Behaviour

Whenever tools throws any error while conversion, the session should not get saved.

Reproduce Scenario (including but not limited to)

Add a non-existing component in the "order.components" page rewrite osgi configuration.
Once we run the page conversion, error would be thrown in error.log & status is shown as "failed" in the wizard.
Post that if we check the node structure in crx/de, we would see partial changes being saved there.

Steps to Reproduce

Add a non-existing component in the "order.components" page rewrite osgi configuration.
Once we run the page conversion, error would be thrown in error.log & status is shown as "failed" in the wizard.
Post that if we check the node structure in crx/de, we would see partial changes being saved there.

Platform and Version

Tool Version - 2.1.0

Sample Code that illustrates the problem

Logs taken while reproducing problem

Repository Exception when Rule deletes node

Expected Behaviour

If a rewrite rule removes the node it processes, then there should not be any errors when continuing to process nodes in the Job.

Actual Behaviour

When a node is deleted via a rule, the Service will attempt to maintain the order of the parent's children (or the deleted node's siblings). However the node having been deleted will throw a Repository exception due to item not found - since the node no longer exists to order.

Logs taken while reproducing problem

20.01.2022 18:41:19.545 *ERROR* [sling-threadpool-6987d6e0-972c-4870-a437-31cd8b7fbe91-(apache-sling-job-thread-pool)-19-AEM Modernize Tools Queue(com/adobe/aem/modernize/job/topic/convert/component)] com.adobe.aem.modernize.component.job.ComponentJobExecutor Component conversion resulted in an error
com.adobe.aem.modernize.RewriteException: Repository exception while performing rewrite operation.
	at com.adobe.aem.modernize.component.impl.ComponentRewriteRuleServiceImpl.apply(ComponentRewriteRuleServiceImpl.java:95) [com.adobe.aem.aem-modernize-tools.core:2.0.15.SNAPSHOT]
	at com.adobe.aem.modernize.component.job.ComponentJobExecutor.doProcess(ComponentJobExecutor.java:74) [com.adobe.aem.aem-modernize-tools.core:2.0.15.SNAPSHOT]
	at com.adobe.aem.modernize.job.AbstractConversionJobExecutor.process(AbstractConversionJobExecutor.java:82) [com.adobe.aem.aem-modernize-tools.core:2.0.15.SNAPSHOT]
	at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:351) [org.apache.sling.event:4.2.24]
	at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:60) [org.apache.sling.event:4.2.24]
	at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:287) [org.apache.sling.event:4.2.24]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: javax.jcr.ItemNotFoundException: Not a child: featuredcontent
	at org.apache.jackrabbit.oak.jcr.delegate.NodeDelegate.orderBefore(NodeDelegate.java:375) [org.apache.jackrabbit.oak-jcr:1.40.0.T20211203153857-c006959]
	at org.apache.jackrabbit.oak.jcr.session.NodeImpl$6.performVoid(NodeImpl.java:339) [org.apache.jackrabbit.oak-jcr:1.40.0.T20211203153857-c006959]
	at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:275) [org.apache.jackrabbit.oak-jcr:1.40.0.T20211203153857-c006959]
	at org.apache.jackrabbit.oak.jcr.session.NodeImpl.orderBefore(NodeImpl.java:330) [org.apache.jackrabbit.oak-jcr:1.40.0.T20211203153857-c006959]
	at com.adobe.aem.modernize.component.impl.ComponentRewriteRuleServiceImpl.applyTo(ComponentRewriteRuleServiceImpl.java:139) [com.adobe.aem.aem-modernize-tools.core:2.0.15.SNAPSHOT]
	at com.adobe.aem.modernize.component.impl.ComponentRewriteRuleServiceImpl.apply(ComponentRewriteRuleServiceImpl.java:92) [com.adobe.aem.aem-modernize-tools.core:2.0.15.SNAPSHOT]
	... 8 common frames omitted

[Enhancement] Support to move content from page to Experience fragment

Expected Behaviour

While migrating Static template to Editable template, we mostly leverage XF for header and footer.
It would be nice if we can have mechanism to automatically create required XF and also move content from existing source to this newly created XF.

Actual Behaviour

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

RepoInit fails Cloud Manager pipelines

Expected Behaviour

When embedding the all package in a project the RepoInit script should correctly grant permissions and AEMaaCS pipelines should not fail.

Actual Behaviour

AEMaaCS pipelines fail due to attempts to write to immutable paths.

Show conversion rule on search page

When searching for conversions, it would be useful to display the rule that is being matched to the item. Linking to this in the repository would be useful to validate the rules are being applied in the correct priority order.

Request: Support Node names on Pattern Rules

Make it possible to specify a literal node name, or prefix, or even a regex on the pattern.

This will allow potentially wide reaching (parsys) conversions to only a specified, desired subset of nodes found.

PageRewriter Rule - All Rules are not processed (Issue in new 2.0 release)

Expected Behaviour

PageRewriteRule is factory configuration, added few conversions for each static templates conversion but during Page conversion only one rule is processed.

Actual Behaviour

Page conversion should process all the configured rules

Reproduce Scenario (including but not limited to)

  1. Create couple of PageRewriter configuration
  2. Run the page conversion, process only one rule and exits.

Steps to Reproduce

  1. Factory configuration created for PageRewirteRule ( to convert say /apps/demo/templates/template1)
  2. Added second configuration (to convert /apps/demo/templates/template2)
  3. Now when page conversion on page which has /apps/demo/templates/template2 but though release is present, it didn't convert the page structure.

Platform and Version

Latest AEM SDK

Sample Code that illustrates the problem

Logs taken while reproducing problem

Unable to use dialog converter tool

[[

Expected Behaviour

Actual Behaviour

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

][[(https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/modernization-tool-for-dialog-conversion/td-p/442640)](http://localhost:6500/mnt/overlay/aem-modernize/content/component/job/create.listcomponents.json?pat...
when I open this xhr in new tab I see following message
Invalid recursion selector value 'listcomponents'
I used dialog converter long time ago it has some interface like this
http://aem-podcast.com/2016/aem-resources/classic-touch-converting-component-dialogs-updated-ui/#.Yh...
dialog converter is not longer available, it is replaced with modernization tool .
Anyone experienced this and any resolution on this?
)

Component Conversion Deletes Subnodes

Expected Behaviour

When running a component conversion on a node that has subnodes the subnodes should be left in the repository and not deleted.

Actual Behaviour

When running a component conversion on a node with subnodes the conversion occurs correctly but all nodes below the converted component are removed.

Steps to Reproduce

Create a component conversion rule that converts a component that has subnodes below it. For instance if you want to convert a container to a new container component make sure that this component has subnodes below it in the CRX/DE.

Run the component conversion tool and then look at the converted node and see that the resource type has been changed but all subnodes below this have been removed.

Platform and Version

AEM 6.5.12
Java 8
aem-modernize-tools-2.1.0

Sample Code that illustrates the problem

Before
After

Logs taken while reproducing problem

AEM Modernize Tool - Bucket List-Status - Not Found

I am trying to convert geometrixx site using Modernize tool. I added basic rules for title and text components conversion and updated Modernize configurations with correct path.

When I trigger job for Component Conversion, I am getting Status as "Not found". There are no errors in Modernize logs to debug issue.
Even though rules are working fine, I am able to see count as well before triggering job but still no luck

I dont see any errors in the log, page conversion is working fine.

image image

Please help me here as I am stuck with no where to find the issue. Its greatly appreciated your help

AEM Version 6.5.13
Tool - 2.1.0

The Java8 AEM65 all package is built for Java11

Expected Behaviour

The all package for the Java8 AEM65 classifier will install via packmgr and the core bundle will start.

Actual Behaviour

The package installs but the bundle doesn't start, throwing an error about missing a requirement of java 11.

Steps to Reproduce

Platform and Version

AEM 6.5 on Java 8

Logs taken while reproducing problem

10.01.2022 17:32:53.126 ERROR [qtp454225993-5179] org.apache.felix.http.jetty Bundles: Cannot start (org.osgi.framework.BundleException: Unable to resolve com.adobe.aem.aem-modernize-tools.core [630](R 630.0): missing requirement [com.adobe.aem.aem-modernize-tools.core [630](R 630.0)] osgi.ee; (&(osgi.ee=JavaSE)(version=11)) Unresolved requirements: [[com.adobe.aem.aem-modernize-tools.core [630](R 630.0)] osgi.ee; (&(osgi.ee=JavaSE)(version=11))])

Broken link in the documentation

Expected Behaviour

Be able to open
"configuration page" link https://opensource.adobe.com/aem-modernize-tools/pages/configuration/structure.html

Actual Behaviour

While reading https://opensource.adobe.com/aem-modernize-tools/pages/structure/about.html
and navigated to the "configuration page" link https://opensource.adobe.com/aem-modernize-tools/pages/configuration/structure.html got 404 error.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

see "Actual Behaviuor"

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Inconsistent Component Converter configuration and output in documentation

Docs Issue

In the Rewrite Map Properties section of the COMPONENT CONVERSION > CONFIGURING THE RULES, the example rule does not match the example output.

Based on this cq:rewriteMapProperties node:

{
  "jcr:primaryType": "nt:unstructured",
  "rewrite-map": {
    "jcr:primaryType": "nt:unstructured",
    "One": "First",
    "Two": "Middle",
    "Three": "Last"
  }
}

I'd expect the output to include "First", "Middle", and "Last". Instead, the documentation shows the following input:

{
  "rewriteMapPropertiesOne": {
    "jcr:primaryType": "nt:unstructured",
    "sling:resourceType": "aem-modernize/components/rewritten",
    "rewrite-map": "First"
  },
  "rewriteMapPropertiesTwo": {
    "jcr:primaryType": "nt:unstructured",
    "sling:resourceType": "aem-modernize/components/rewritten",
    "rewrite-map": "Second"
  },
  "rewriteMapPropertiesThree": {
    "jcr:primaryType": "nt:unstructured",
    "sling:resourceType": "aem-modernize/components/rewritten",
    "rewrite-map": "Third"
  }
}

"First" matches, but where did "Second" and "Third" come from?

URL: opensource.adobe.com/aem-modernize-tools/pages/component/config.html.

You do not have permissions, while scheduling Modernization tools -> component update job

Expected Behaviour

It should update the component references on the pages with new references

Actual Behaviour

Throwing error. Attached screenshot

Reproduce Scenario (including but not limited to)

  1. Created the rule to replace component references
  2. Make sure to add rules path for below configuration com.adobe.aem.modernize.component.impl.ComponentRewriteRuleServiceImpl

Select Tools -> AEM Modernize Tools -> Component Conversion and select the pages that you want to apply the rule.

Run the schedule job to see the error.

Steps to Reproduce

As described above

Platform and Version

AEM version 6.5.13

Sample Code that illustrates the problem

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:cq="http://www.day.com/jcr/cq/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="sling:OrderedFolder">

<grid_builder jcr:primaryType="nt:unstructured">
    <patterns jcr:primaryType="nt:unstructured">
        <grid_builder
                jcr:primaryType="nt:unstructured"
                sling:resourceType="chevrolet/components/structure/grid_builder" />
    </patterns>
    <replacement jcr:primaryType="nt:unstructured">
        <grid_builder
                jcr:primaryType="nt:unstructured"
                sling:resourceType="chevrolet/components/structure/chevy_grid_builder"
        />
    </replacement>
</grid_builder>

</jcr:root>

Logs taken while reproducing problem

Moderniztion tools - Component converter (1).pdf

Page Conversion Tool url encode issue with page/folders that are numerically named

Expected Behaviour

When entering a path like: "/content/geometrixx/en/tour-top-10/2020/08/17" to search for specific templates, 'Show Pages' button should show me all templates that match the configs from OSGi

Actual Behaviour

PageDataSource createQuery method has the following:
String encodedPath = RewriteUtils.encodePath(searchPath);
which is giving back a result like: "/content/geometrixx/en/tour-top-10/_x0032_020/_x0030_8/_x0031_7" which then causes the jcr query to return no results.

Reproduce Scenario (including but not limited to)

Create a folder structure/path with numerically named pages, as above.

Steps to Reproduce

Go to Page Template/Stucture Conversion Tool page and try to run a search against path with numerically based folder/page names (http://localhost:4502/libs/cq/modernize/templatestructure/content/console.html)

Platform and Version

6.5.6 and 6.5.9 - with jdk 11

[Page Template/Structure Conversion Tool returns empty list

Dear team,
I'm trying to convert the static template to editable using V1.0.0. When I tried to get the list of templates, I see the empty list and got to see the below error.
GET /libs/cq/modernize/templatestructure/content/console.html HTTP/1.1] com.adobe.aem.modernize.structure.datasources.PageDataSource Unable to list components: java.text.ParseException: Query: SELECT * FROM [cq:PageContent] AS pc WHERE ISDESCENDANTNODE(pc, '/content/xxx') AND pc.[cq:template] IN ((*)); expected: static operand

Expected Behaviour:
Expected to see the list of templates, that are provided in the search box.

Actual Behaviour
It returns an empty list.

Steps to Reproduce

  1. Install the V1.0.0 package
  2. After landing on the template/structure conversion tool page, try to enter the search path, the system returns an empty list.

Platform and Version
AEM 6.5 using aem-modernize-tools-1.0.0

Logs taken while reproducing problem
GET /libs/cq/modernize/templatestructure/content/console.html HTTP/1.1] com.adobe.aem.modernize.structure.datasources.PageDataSource Unable to list components: java.text.ParseException: Query: SELECT * FROM [cq:PageContent] AS pc WHERE ISDESCENDANTNODE(pc, '/content/xxx') AND pc.[cq:template] IN ((*)); expected: static operand

Responsive ColumnControl Support

Due to how the rewriting a tree functions, when using the Responsive logic, the parent node order is not preserved. There becomes a conflict between the Column Control order being overwritten by the tree traversal.

Need to find a way to apply the Responsive handling for the Column Control rewriter, without losing the order.

Remove unnecessary columns

Each of the conversion search/execution pages have a column which is a hold over from the dialog conversion (converted ). This can be removed.

AEM Modernizer Tool is failing to convert page/structure in Chrome if the pages are 1000+ (Issue is only on Chrome)

Expected Behaviour

Convert page/structure successfully regardless of pages.

Actual Behaviour

Conversion happening fine in Safari and Firefox

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Error :

GET https://author-pXXXXXX-eXXXXXX.adobeaemcloud.com/mnt/overlay/aem-modernize/content/structure/job/create.template.rules.json?path=%2Fcontent%2Fgmenvolve%2Fna%2Fus%2Fen%2Fpartials%2Fvehicle-cash-incentives-sub-content%2Ftable-partials%2F2022-chevrolet-low-cab-forward-price-table&reprocess=false net::ERR_INSUFFICIENT_RESOURCES

List lookup wait overlay ends early

Depending on the number of pages being loaded, the wait overlay during page selection may terminate early even though all of the pages have not been listed yet.

Page Conversion resulting in zero structure rules

Hello,

I am using Modernizer 2.1.1.SNAPSHOT in my cloud instance. I have created a basic template using geodemo provided by Adobe. I am currently trying to move my /apps/geometrixx/templates/homepage (static) to /conf/geodemo/settings/wcm/templates/geodemo-home-page(editable). I used layout containers to recreate the geometrix page. How ever after i choose configuration as the conf/geodemo my page shows zero conversions. I get no logs. Below is the screenshot. Any help Thanks in Advance.

Regards
jayanta

image

[Enhancement] Support to convert AEM foundation forms to core component based AF

Expected Behaviour

Currently, AEM Forms customers both on-premises and cloud services face challenges in migrating their foundation forms to core component-based Adaptive Forms. To address this, we aim to utilize aem-modernize-tools to streamline the migration process.

To ensure clarity and efficiency, we intend to introduce a dedicated tile for forms. A separate tile for forms is required since:

  1. The All-in-One conversion job mandates configuration paths and other parameters for policy conversion, which are unnecessary for forms.
  2. The Component conversion job lacks Page Handling options essential for forms.
  3. Adaptive Forms (AF) are accessible both as a Site page located at /content/forms/af and as a Digital Asset Management (DAM) asset at /content/dam/formsanddocument. Therefore, to utilize the "Copy to Target" page policy, we must copy the source form (asset) to the target, a functionality not available in any of the existing conversion jobs.
  4. Furthermore, this separation ensures that any future additions of form-specific code to the tool won't impact other conversion jobs.
  5. To prevent user confusion regarding the appropriate job to execute for specific purposes.

Actual Behaviour

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

#210
Forms-modernizer PR: https://git.corp.adobe.com/livecycle/forms-modernizer/pull/2 [in progress]

Logs taken while reproducing problem

Unable to get the multifield nodes from a component, with updated property name

Hi All,

I am unable to get the multifield nodes from a component with the updated property name.

Expected Behaviour

While migrating components, the multifield nodes under it should also be added into the new migrated component, with the updated property name as well.

Actual Behaviour

cq:copyChildren simply adds the children nodes as it, but there is no way to feed in the new property names which should replace the old property names from the children node.

This is a specific use case where the components have the multifield nodes (the number cannot be specified in the rewrite rules). Is there a way to copy the children nodes with the updated property names?

Thanks in advance for the answer! looking forward for the same.

Make order.components value check as optional

Expected Behaviour

If user has configured "order.components" in "Page Rewrite Rule" OSGI configuration. The page conversion should NOT break if one the components mentioned in this configuration doesn't exist on any required page.

Actual Behaviour

If user has configured "order.components" in "Page Rewrite Rule" OSGI configuration. The page conversion breaks if one the components mentioned in this configuration doesn't exist on any required page.

Reproduce Scenario (including but not limited to)

Configure "order.components" in "Page Rewrite Rule" OSGI configuration with some components. Run page conversion on one of the page where one the component from "order.components" doesn't exist. breaks if one the components mentioned in this configuration doesn't exist on any required page. Below error (in log section) would come up & conversion will fail.

Steps to Reproduce

Configure "order.components" in "Page Rewrite Rule" OSGI configuration with some components. Run page conversion on one of the page where one the component from "order.components" doesn't exist. breaks if one the components mentioned in this configuration doesn't exist on any required page. error shown in log section would come up & conversion will fail.

Platform and Version

Version-2.1.0

Sample Code that illustrates the problem

Logs taken while reproducing problem

07.08.2022 21:23:12.399 *ERROR* [sling-threadpool-16016acd-95ff-4744-baaf-e0fb3661542c-(apache-sling-job-thread-pool)-1-AEM Modernize Tools Queue(com/adobe/aem/modernize/job/topic/convert/structure)] com.adobe.aem.modernize.structure.job.PageStructureJobExecutor Page structure conversion resulted in an error.
com.adobe.aem.modernize.RewriteException: Repository exception while performing rewrite operation.
	at com.adobe.aem.modernize.structure.impl.StructureRewriteRuleServiceImpl.apply(StructureRewriteRuleServiceImpl.java:106) [com.adobe.aem.aem-modernize-tools.core:2.1.0]
	at com.adobe.aem.modernize.structure.job.PageStructureJobExecutor.doProcess(PageStructureJobExecutor.java:98) [com.adobe.aem.aem-modernize-tools.core:2.1.0]
	at com.adobe.aem.modernize.job.AbstractConversionJobExecutor.process(AbstractConversionJobExecutor.java:82) [com.adobe.aem.aem-modernize-tools.core:2.1.0]
	at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:351) [org.apache.sling.event:4.2.24]
	at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:60) [org.apache.sling.event:4.2.24]
	at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:287) [org.apache.sling.event:4.2.24]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: javax.jcr.ItemNotFoundException: Not a child: dropdown1
	at org.apache.jackrabbit.oak.jcr.delegate.NodeDelegate.orderBefore(NodeDelegate.java:370) [org.apache.jackrabbit.oak-jcr:1.42.0.T20220505140541-fbdad6b]
	at org.apache.jackrabbit.oak.jcr.session.NodeImpl$6.performVoid(NodeImpl.java:339) [org.apache.jackrabbit.oak-jcr:1.42.0.T20220505140541-fbdad6b]
	at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:280) [org.apache.jackrabbit.oak-jcr:1.42.0.T20220505140541-fbdad6b]
	at org.apache.jackrabbit.oak.jcr.session.NodeImpl.orderBefore(NodeImpl.java:330) [org.apache.jackrabbit.oak-jcr:1.42.0.T20220505140541-fbdad6b]
	at com.adobe.aem.modernize.structure.rule.PageRewriteRule.orderNodes(PageRewriteRule.java:285) [com.adobe.aem.aem-modernize-tools.core:2.1.0]
	at com.adobe.aem.modernize.structure.rule.PageRewriteRule.applyTo(PageRewriteRule.java:175) [com.adobe.aem.aem-modernize-tools.core:2.1.0]
	at com.adobe.aem.modernize.structure.impl.StructureRewriteRuleServiceImpl.apply(StructureRewriteRuleServiceImpl.java:101) [com.adobe.aem.aem-modernize-tools.core:2.1.0]
	... 8 common frames omitted

Dynamically populated classic ui with options path is not converted

Quite often, we have dialogs like:

<some-node 
    xtype="selection"
    type="select"
    options="$PATH.some-selector.json"/>

Is there a recommended way to get this automatically converted, or should we manually create datasources for all these components?
Right now the result would be like this:

<some-node
        jcr:primaryType="nt:unstructured"
        sling:resourceType="granite/ui/components/coral/foundation/form/select">
    <items jcr:primaryType="nt:unstructured"/>
</some-node>

Infinite Loop if Rule doesn't change Node state

Expected Behaviour

If a rule matches a node, it should not be attempted on that node again during the Tree Rewrite process.

Actual Behaviour

When a rule matches a node but does not make enough changes for the matches to return false after the update, the ComponentTreeRewriter enters an infinite loop.

Platform and Version

v2.0.12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.