headwirecom / peregrine-cms

an api first, head optional cms with based on vuejs and apache sling
Apache License 2.0
52 stars 31 forks source link

Copy and Paste component does not work #673

Closed reggie7 closed 3 years ago

reggie7 commented 3 years ago

To Reproduce Steps to reproduce the behavior:

  1. Create a new Tenant and open e.g. the index page,
  2. Add an image at the page bottom,
  3. Copy the image component,
  4. Paste the component.

Expected behavior It works.

Actual behavior It doesn't.

Screenshots

buttons

errors

Desktop

Additional Context


0: "java.lang.NullPointerException"
1: "    at java.base/java.util.Objects.requireNonNull(Objects.java:221)"
2: "    at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:178)"
3: "    at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)"
4: "    at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)"
5: "    at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1746)"
6: "    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)"
7: "    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)"
8: "    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)"
9: "    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)"
10: "   at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)"
11: "   at com.peregrine.commons.ResourceUtils.filterCopyableProperties(ResourceUtils.java:172)"
12: "   at com.peregrine.commons.ResourceUtils.filterPropertiesAllowedOnExistingNode(ResourceUtils.java:176)"
13: "   at com.peregrine.admin.resource.AdminResourceHandlerService.applyProperties(AdminResourceHandlerService.java:1130)"
14: "   at com.peregrine.admin.resource.AdminResourceHandlerService.createNode(AdminResourceHandlerService.java:1040)"
15: "   at com.peregrine.admin.resource.AdminResourceHandlerService.insertNode(AdminResourceHandlerService.java:766)"
16: "   at com.peregrine.admin.servlets.InsertNodeAt.handleRequest(InsertNodeAt.java:182)"
17: "   at com.peregrine.commons.servlets.AbstractBaseServlet.doRequest(AbstractBaseServlet.java:93)"
18: "   at com.peregrine.commons.servlets.AbstractBaseServlet.doPost(AbstractBaseServlet.java:87)"
19: "   at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:146)"
20: "   at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342)"
21: "   at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374)"
22: "   at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552)"
23: "   at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)"
24: "   at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82)"
25: "   at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:283)"
26: "   at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49)"
27: "   at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82)"
28: "   at com.peregrine.versions.VersioningRequestFilter.doFilter(VersioningRequestFilter.java:51)"
29: "   at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)"
30: "   at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:110)"
31: "   at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)"
32: "   at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131)"
33: "   at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72)"
34: "   at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)"
35: "   at org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151)"
36: "   at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:250)"
37: "   at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:123)"
38: "   at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:86)"
39: "   at org.apache.sling.junit.impl.servlet.TestLogServlet$TestNameLoggingFilter.doFilter(TestLogServlet.java:257)"
40: "   at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142)"
41: "   at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)"
42: "   at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131)"
43: "   at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142)"
44: "   at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)"
45: "   at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75)"
46: "   at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142)"
47: "   at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)"
48: "   at org.apache.sling.engine.impl.parameters.RequestParameterSupportConfigurer.doFilter(RequestParameterSupportConfigurer.java:67)"
49: "   at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142)"
50: "   at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)"
51: "   at org.apache.felix.http.base.internal.dispatch.Dispatcher$1.doFilter(Dispatcher.java:146)"
52: "   at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1002)"
53: "   at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:97)"
54: "   at org.apache.felix.http.base.internal.handler.PreprocessorHandler.handle(PreprocessorHandler.java:136)"
55: "   at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1008)"
56: "   at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager.invokePreprocessors(WhiteboardManager.java:1012)"
57: "   at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:91)"
58: "   at org.apache.felix.http.base.internal.dispatch.DispatcherServlet.service(DispatcherServlet.java:49)"
59: "   at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)"
60: "   at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)"
61: "   at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:551)"
62: "   at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)"
63: "   at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610)"
64: "   at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)"
65: "   at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1363)"
66: "   at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)"
67: "   at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:489)"
68: "   at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)"
69: "   at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)"
70: "   at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1278)"
71: "   at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)"
72: "   at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)"
73: "   at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)"
74: "   at org.eclipse.jetty.server.Server.handle(Server.java:500)"
75: "   at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)"
76: "   at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547)"
77: "   at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)"
78: "   at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)"
79: "   at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)"
80: "   at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)"
81: "   at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)"
82: "   at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)"
83: "   at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)"
84: "   at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)"
85: "   at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)"
86: "   at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)"
87: "   at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)"
88: "   at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)"
89: "   at java.base/java.lang.Thread.run(Thread.java:834)"
message: "Failed with runtime exception"```
reggie7 commented 3 years ago

From @reusr1

I think we also have a copy/paste issue if there are children (like the teaser or the cards component)

reggie7 commented 3 years ago

702 will cover other weird behaviors

reusr1 commented 3 years ago

@reggie7 @Felix-Puetz since #703 has been merged - can we close this ticket?