Problem

Sometimes if versioned pages are renamed manually, they do not fit the page naming pattern of Scroll Versions. Therefore users get the error "Change name '<Pagename>' must match page naming pattern" when trying to publish and an exception like the following in the logs.

java.lang.IllegalStateException: Change name 'Introduction' must match page naming pattern.
at com.k15t.scroll.platform.model.config.DefaultPageNaming.getPlainConfluencePageTitleForChange(DefaultPageNaming.java:77)
at com.k15t.scroll.platform.dao.impl.DefaultScrollPageDao.getPlainTitle(DefaultScrollPageDao.java:171)
at com.k15t.scroll.platform.dao.impl.DefaultScrollPageDao.addToScrollLookupIndex(DefaultScrollPageDao.java:125)
at com.k15t.scroll.platform.ui.lookupindex.RebuildScrollLookupIndexTask.addToScrollLookupIndexUniquely(RebuildScrollLookupIndexTask.java:192)
at com.k15t.scroll.platform.ui.lookupindex.RebuildScrollLookupIndexTask.doExecute(RebuildScrollLookupIndexTask.java:172)
at com.k15t.scroll.platform.ui.lookupindex.RebuildScrollLookupIndexTask.doExecute(RebuildScrollLookupIndexTask.java:58)
at com.k15t.scroll.platform.model.task.AbstractTransactionalTask$1.doInTransaction(AbstractTransactionalTask.java:30)
at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25)
at com.atlassian.sal.spring.component.SpringHostContextAccessor$1.doInTransaction(SpringHostContextAccessor.java:88)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:82)
at sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129)
at com.sun.proxy.$Proxy223.doInTransaction(Unknown Source)
at sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154)
at com.sun.proxy.$Proxy223.doInTransaction(Unknown Source)
at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:21)
at sun.reflect.GeneratedMethodAccessor3309.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy2497.execute(Unknown Source)
CODE

Environment

  • Scroll Versions
  • All versions

Resolution

To solve the IllegalStateException:

  1. Copy the content of the affected page to a new page,

  2. deactivate Scroll Versions (disable Scroll Versions and Scroll Platform apps in UPM) and make sure no one edits pages in spaces with versions during this time,

  3. delete the affected page,
  4. enable Scroll Versons and Scroll Platform apps in the UPM,
  5. run Health Check in Scroll Add-ons → Health Check,
  6. publish the version.

Cause

Due to the renaming of the versioned page, its corresponding masterpage can not be found.