8 Replies Latest reply on Mar 13, 2013 12:54 PM by vmehrotr

    Creating a blueprint out of an existing livecopy

    donyan

      Hello,

       

      We have a site in CQ 5.4 using roughly the following structure.

       

      -/content/site/

                     -/blueprint1/home/

                                         -/page1...

                                         -/page2...

                     -/livecopy1/home/

                                         -/page1...

                                         -/page2...

                     -/livecopy2/home/

                                         -/page1...

                                         -/page2...

       

      ETC...

       

      Now we would like to create a new blueprint out of livecopy2 that will follow the same structure so...

       

                -/livecopy2-copy1/home/

                                         -/page1...

                                         -/page2...

                -/livecopy2-copy2/home/

                                         -/page1...

                                         -/page2...

       

      ETC...

       

       

      After some testing, I can confirm this works, but only if /livecopy2 is pristine, meaning it has no cancelled inheritance from blueprint1. If it has any properties that have been modified (which I want to carry over to it's livecopies), the Site Admin gives me a message "Could not create Live Copy: Unable to remove Live Copy markers." And I see the following in the error log:

       

       

      12.03.2013 12:33:20.943 *ERROR* [127.0.0.1 [1363106000934] POST /bin/wcmcommand HTTP/1.1] com.day.cq.wcm.msm.impl.commands.CreateSiteCommand Error during Live Copy creation. com.day.cq.wcm.api.WCMException: Unable to remove Live Copy markers

                at com.day.cq.wcm.msm.impl.Utils.detachLiveCopy(Utils.java:225)

                at com.day.cq.wcm.msm.impl.LiveCopyManager.remove(LiveCopyManager.java:213)

                at com.day.cq.wcm.msm.impl.LiveRelationshipManagerImpl.endRelationship(LiveRelationshipManag erImpl.java:308)

                at com.day.cq.wcm.msm.impl.commands.LiveCommand.createCopyTarget(LiveCommand.java:99)

                at com.day.cq.wcm.msm.impl.commands.LiveCommand.createLiveCopy(LiveCommand.java:145)

                at com.day.cq.wcm.msm.impl.commands.CreateLiveCopyCommand.performCommand(CreateLiveCopyComma nd.java:83)

                at com.day.cq.wcm.core.impl.commands.WCMCommandServlet$CommandHolder.performCommand(WCMComma ndServlet.java:149)

                at com.day.cq.wcm.core.impl.commands.WCMCommandServlet.performCommand(WCMCommandServlet.java :251)

                at com.day.cq.commons.servlets.AbstractCommandServlet.doPost(AbstractCommandServlet.java:49)

                at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.ja va:148)

                at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.jav a:344)

                at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.jav a:375)

                at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:491)

                at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilter Chain.java:45)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:64)

                at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:147)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:334 )

                at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:152)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProce ssorImpl.java:280)

                at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChai n.java:49)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:64)

                at com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.doFilter(RedirectFilter.java:287)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgre ssTrackerLogFilter.java:59)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet.doFilter(FormsHandlingServlet.j ava:220)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at com.day.cq.theme.impl.ThemeResolverFilter.doFilter(ThemeResolverFilter.java:67)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:96)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at com.day.cq.wcm.core.impl.WCMRequestFilter.doFilter(WCMRequestFilter.java:119)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at org.apache.sling.rewriter.impl.RewriterFilter.doFilter(RewriterFilter.java:84)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at org.apache.sling.portal.container.internal.request.PortalFilter.doFilter(PortalFilter.jav a:76)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter.doFilter(BackgroundServle tStarterFilter.java:135)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processRequest(SlingRequestProcess orImpl.java:171)

                at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:199)

                at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:9 6)

                at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)

                at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java: 42)

                at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFil terChain.java:49)

                at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.jav a:33)

                at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:249)

                at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)

                at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)

                at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFil terChain.java:47)

                at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.jav a:33)

                at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java: 48)

                at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)

                at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

                at org.apache.felix.http.proxy.ProxyServlet.service(ProxyServlet.java:60)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

                at org.apache.sling.launchpad.base.webapp.SlingServletDelegate.service(SlingServletDelegate. java:277)

                at org.apache.sling.launchpad.webapp.SlingServlet.service(SlingServlet.java:150)

                at com.day.j2ee.servletengine.ServletRuntimeEnvironment.service(ServletRuntimeEnvironment.ja va:228)

                at com.day.j2ee.servletengine.RequestDispatcherImpl.doFilter(RequestDispatcherImpl.java:315)

                at com.day.j2ee.servletengine.FilterChainImpl.doFilter(FilterChainImpl.java:74)

                at com.day.crx.launchpad.filters.CRXLaunchpadLicenseFilter.doFilter(CRXLaunchpadLicenseFilte r.java:96)

                at com.day.j2ee.servletengine.FilterChainImpl.doFilter(FilterChainImpl.java:72)

                at com.day.j2ee.servletengine.RequestDispatcherImpl.service(RequestDispatcherImpl.java:334)

                at com.day.j2ee.servletengine.RequestDispatcherImpl.service(RequestDispatcherImpl.java:378)

                at com.day.j2ee.servletengine.ServletHandlerImpl.execute(ServletHandlerImpl.java:315)

                at com.day.j2ee.servletengine.DefaultThreadPool$DequeueThread.run(DefaultThreadPool.java:134 )

                at java.lang.Thread.run(Thread.java:680)

      Caused by: com.day.cq.wcm.api.WCMException: Unable to remove Live Copy markers

                at com.day.cq.wcm.msm.impl.Utils.detachLiveCopy(Utils.java:274)

                at com.day.cq.wcm.msm.impl.Utils.detachLiveCopy(Utils.java:221)

                ... 70 more

      Caused by: javax.jcr.nodetype.NoSuchNodeTypeException: Mixin cq:LiveRelationship not included in node /content/site/livecopy2-copy1/home/jcr:content

                at org.apache.jackrabbit.core.RemoveMixinOperation.perform(RemoveMixinOperation.java:87)

                at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)

                at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)

                at org.apache.jackrabbit.core.NodeImpl.removeMixin(NodeImpl.java:912)

                at org.apache.jackrabbit.core.NodeImpl.removeMixin(NodeImpl.java:2316)

                at com.day.cq.wcm.msm.impl.Utils.detachLiveCopy(Utils.java:249)

                ... 71 more

       

       

       

       

       

      This kind of makes sense, because you can't cancel a live relationship before one actually exists, but there must be some sort of workaround to allow for this type of structure. We cannot be the only ones trying to use this CMS for multiple livecopy/blueprint relationship branches that share the same root. Does anyone have any ideas?

       

      Thanks.