Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content changes in parent project are not synced to layer after restore from archive #9468

Closed
alansemenov opened this issue May 12, 2022 · 0 comments
Assignees
Labels
Milestone

Comments

@alansemenov
Copy link
Member

  1. Start with a project that has a child layer.
  2. Create a site in the project.
  3. Switch to the layer - the site is there. All is good is far.
  4. Archive the site in the layer
  5. Switch back to the project. Create a new content under the site.
  6. Switch back to the layer. Nothing is synced. Still correct.
  7. Go to the layer's archive and restore the site.

The expected behaviour is that the new items added to the parent site would be synced to the site in the layer after it has been restored. But instead there's an error in the logs:

10:05:38.806 ERROR c.e.x.c.i.c.ProjectContentEventListener - Project node sync failed
java.lang.IllegalArgumentException: targetContent must be set.
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:141)
	at com.enonic.xp.core.impl.content.UpdatedEventSyncCommand$Builder.validate(UpdatedEventSyncCommand.java:193)
	at com.enonic.xp.core.impl.content.UpdatedEventSyncCommand$Builder.build(UpdatedEventSyncCommand.java:199)
	at com.enonic.xp.core.impl.content.ParentContentSynchronizer.lambda$new$5(ParentContentSynchronizer.java:72)
	at com.enonic.xp.core.impl.content.ParentContentSynchronizer.createEventCommand(ParentContentSynchronizer.java:305)
	at com.enonic.xp.core.impl.content.ParentContentSynchronizer.sync(ParentContentSynchronizer.java:188)
	at com.enonic.xp.core.impl.content.ProjectContentEventListener.lambda$doHandleContentEvent$11(ProjectContentEventListener.java:177)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
	at com.enonic.xp.core.impl.content.ProjectContentEventListener.lambda$doHandleContentEvent$14(ProjectContentEventListener.java:138)
	at com.enonic.xp.context.ContextImpl.runWith(ContextImpl.java:84)
	at com.enonic.xp.core.impl.content.ProjectContentEventListener.doHandleContentEvent(ProjectContentEventListener.java:102)
	at com.enonic.xp.core.impl.content.ProjectContentEventListener.lambda$handleContentEvent$4(ProjectContentEventListener.java:89)
	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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants