AEM Eclipse PlugIn: cq:editConfig gets deleted on auto publish | Community
Skip to main content
New Participant
October 16, 2015
Solved

AEM Eclipse PlugIn: cq:editConfig gets deleted on auto publish

  • October 16, 2015
  • 8 replies
  • 1551 views

Hi,

we are using the AEM-Eclipse-Plugin to deploy automatically into AEM if a file changes. This setup works fine so far, but we have still a problem when deploying components:

 - There is a component with the following files and structure:
       /apps/foo/components/bar
           |- cq:dialog
           |- cq:editConfig
           |- bar.html
 - Now change the file "bar.html" and save (auto publishing is enabled) the changes get deployed:
       [26. Januar 2015 06:04:06 MEZ] AddOrUpdateNodeCommand -> /apps/foo/components/bar : JcrResult[ success:true] (112 ms)
       [26. Januar 2015 06:04:06 MEZ] AddOrUpdateNodeCommand -> /apps/foo/components/bar/bar.html : JcrResult[ success:true] (95 ms)
       [26. Januar 2015 06:04:06 MEZ] ReorderChildNodesCommand -> /apps/foo/components/bar/bar.html : JcrResult[ success:true] (68 ms)

The problem is that this deployment not just updates the "bar.html" file in the repository but also deletes the "cq:editConfig". My filter.xml looks something like
    ...
    <filter root="/apps/foo/components" />
    ...
    
Our maven build also uses the same filter.xml and has no such problems. Any ideas what we are doing wrong here?

I am working on Windows 7 and Eclipse Luna with:
 - AEM IDE Tools: UI-Extensions    1.0.2    com.adobe.granite.ide.eclipse-ui    ADOBE
 - Sling IDE Tools    1.0.4    org.apache.sling.ide.feature.feature.group    The Apache Foundation
 - Sling IDE Tools, M2e-based    1.0.4    org.apache.sling.ide.m2e-feature.feature.group    The Apache Foundation

Regards,

Andreas

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

This appears to be a bug in the Eclipse plug-in the you are using. This is a 3rd party plug-in - not an Adobe plug-in. Therefore - i cannot ask you to file a bug. 

Instead - I recommend using vault from the command line to upload your HTML/JSP files after you modify them in Eclipse. Here is an example. 

Assume this is your working directory on your machine:

[img]pic1.png[/img]

Next assume that you make a change to hero.jsp and save it in Eclipse. To get this into AEM JCR -- start the command line. From the command line - go to the working directory. Ie:

C:\AdobeCQ\echoprojecteclipse\content\src\main\content\jcr_root\apps\nook\components\content\hero

Run this vault command:

vlt --credentials admin:admin ci hero.jsp

This uploads the change you made in Eclipse successfully -- as shown here:

[img]commandline.png[/img]

Now the change is made and /apps/nook/components/content/hero/cq:editConfig is still there.

[img]crxde22.png[/img]

See this topic for more info about vlt commands:

http://docs.adobe.com/docs/en/crx/current/how_to/how_to_use_the_vlttool.html

8 replies

New Participant
October 6, 2016

Adding /* to the end of my path string solved this problem for me.

<filter root="/apps/foo/components/*" />

smacdonald2008
New Participant
October 16, 2015

IN the AEM repository - make sure that you have the node cq:editConfig. When the system updates from Eclipse to AEM JCR, it will not delete cq:editConfig if it's there before the update is made. The only way I can see the system deleting cq:editConfig is if it's NOT present in the AEM JCR. 

New Participant
October 16, 2015

Thanks for your answer, but that's exactly what's happening. The node is there in Eclipse but it gets deleted if the deployment happens.

For further clarification:

  1. The node is there in Eclipse AND JCR
  2. I change the file bar.html
  3. The cq:editConfig-node is still there in Eclipse but gets deleted in JCR
smacdonald2008
New Participant
October 16, 2015

I am going to try and reduplicate this functionality. It may be a bug. 

smacdonald2008
New Participant
October 16, 2015

I have a project that uses this node - as shown here:

[img]PicAA.png[/img]

I have synced this project into Eclipse using the Eclipse plug-in:

[img]PicA.png[/img]

As you can see this is working on AEM 6. cq:editConfig is present in both Eclipse and the AEM JCR. 

What CQ version are you using? 

New Participant
October 16, 2015

Hi,

please find attached a sample project (just change the file extension from "png" to "zip"). With the following steps I am able to reproduce the issue.

My Setup:

  • AEM6.0SP1
  • Eclipse Luna 4.4.1
  • AEM IDE Tools: UI-Extensions    1.0.2    com.adobe.granite.ide.eclipse-ui    ADOBE
  • Sling IDE Tools    1.0.4    org.apache.sling.ide.feature.feature.group    The Apache Foundation
  • Sling IDE Tools, M2e-based    1.0.4    org.apache.sling.ide.m2e-feature.feature.group    The Apache Foundation
  • AEM-Server configured and connected in the Eclipse "Servers"-Tab

 
What I am doing:

  1. Import -> Existing Maven Projects -> select projects pom and import
  2. right click on the project -> Configure -> Convert to Content Project -> select "src/main/content" as sync root location
  3. right click on the server -> Add or Remove -> add com.testeclipseplugin
  4. right click on the source folder (Project Explorer View) "src/main/content/jcr_root" -> Export to server

Result: the nodes will be created in the repository but the "cq:editConfig" node is missing.

Regards,

Andreas

smacdonald2008
smacdonald2008Accepted solution
New Participant
October 16, 2015

This appears to be a bug in the Eclipse plug-in the you are using. This is a 3rd party plug-in - not an Adobe plug-in. Therefore - i cannot ask you to file a bug. 

Instead - I recommend using vault from the command line to upload your HTML/JSP files after you modify them in Eclipse. Here is an example. 

Assume this is your working directory on your machine:

[img]pic1.png[/img]

Next assume that you make a change to hero.jsp and save it in Eclipse. To get this into AEM JCR -- start the command line. From the command line - go to the working directory. Ie:

C:\AdobeCQ\echoprojecteclipse\content\src\main\content\jcr_root\apps\nook\components\content\hero

Run this vault command:

vlt --credentials admin:admin ci hero.jsp

This uploads the change you made in Eclipse successfully -- as shown here:

[img]commandline.png[/img]

Now the change is made and /apps/nook/components/content/hero/cq:editConfig is still there.

[img]crxde22.png[/img]

See this topic for more info about vlt commands:

http://docs.adobe.com/docs/en/crx/current/how_to/how_to_use_the_vlttool.html

New Participant
October 16, 2015

Thank you for the suggestion. In the meantime I found out, that this is a known issue here:
https://issues.apache.org/jira/browse/SLING-4098

The fix will probably be included in the next release.