Details
-
Bug
-
Resolution: Duplicate
-
Low
-
Severity 2 - Major
-
Description
Summary
Some existing Confluence instances still have the search-box macro on pages instead of the new "Livesearch" one. Since 1000.601.0, these pages will display as Not Found.
Steps to reproduce
- Create a blank page.
- Add the "Livesearch" macro and save the page.
- Run the following SQL in the database (to simulate the page having an already-existing Search Box macro, since it can't be added afresh now):
update bodycontent set body = replace(body, 'ac:name="livesearch"', 'ac:name="search-box"') where contentid = <ID of page created in Step 1>;
- Refresh the page.
Expected results
The page displays with at least an "Unknown macro" message.
Actual results
Confluence says the page can't be found.
Notes
The following error appears in the logs:
2016-12-02 19:14:49,091 ERROR [http-bio-1996-exec-2] [[Catalina].[localhost].[/wiki].[noop]] log Servlet.service() for servlet [noop] in context with path [/wiki] threw exception [Filter execution threw an exception] with root cause java.lang.NoClassDefFoundError: com/atlassian/gzipfilter/org/apache/commons/lang/BooleanUtils at com.atlassian.confluence.extra.livesearch.SearchBoxMacroMigrator.migrateSpaceKey(SearchBoxMacroMigrator.java:64) at com.atlassian.confluence.extra.livesearch.SearchBoxMacroMigrator.migrate(SearchBoxMacroMigrator.java:23) at com.atlassian.confluence.impl.macro.schema.DefaultMacroSchemaMigrator.migrateSchema(DefaultMacroSchemaMigrator.java:61) at com.atlassian.confluence.impl.macro.schema.DefaultMacroSchemaMigrator.migrateSchemaIfNecessary(DefaultMacroSchemaMigrator.java:37) at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshalInternal(ViewMacroMarshaller.java:146) at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.lambda$marshal$0(ViewMacroMarshaller.java:122) at com.atlassian.confluence.impl.content.render.xhtml.analytics.MetricsCollectingMarshaller.marshal(MetricsCollectingMarshaller.java:52) at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshal(ViewMacroMarshaller.java:131) at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshal(ViewMacroMarshaller.java:57) at com.atlassian.confluence.content.render.xhtml.UnmarshalMarshalFragmentTransformer.transform(UnmarshalMarshalFragmentTransformer.java:29) at com.atlassian.confluence.content.render.xhtml.transformers.DefaultFragmentTransformer.transformFragment(DefaultFragmentTransformer.java:146) at com.atlassian.confluence.content.render.xhtml.transformers.DefaultFragmentTransformer.transform(DefaultFragmentTransformer.java:128) at com.atlassian.confluence.content.render.xhtml.storage.StorageXhtmlTransformer.transform(StorageXhtmlTransformer.java:41) at com.atlassian.confluence.content.render.xhtml.TransformerChain.transform(TransformerChain.java:33) at com.atlassian.confluence.content.render.xhtml.TransformerChain.transform(TransformerChain.java:33) at com.atlassian.confluence.content.render.xhtml.PluggableTransformerChain.transform(PluggableTransformerChain.java:43) at com.atlassian.confluence.content.render.xhtml.DefaultRenderer.renderWithoutMetrics(DefaultRenderer.java:193) at com.atlassian.confluence.content.render.xhtml.DefaultRenderer.renderWithResult(DefaultRenderer.java:152) at com.atlassian.confluence.content.render.xhtml.DefaultRenderer.render(DefaultRenderer.java:133) at com.atlassian.confluence.content.render.xhtml.DeviceTypeAwareRenderer.render(DeviceTypeAwareRenderer.java:50) at com.atlassian.confluence.api.impl.service.content.ContentBodyConversionManagerImpl.computeConvertedValue(ContentBodyConversionManagerImpl.java:164) at com.atlassian.confluence.api.impl.service.content.ContentBodyConversionManagerImpl.lambda$null$0(ContentBodyConversionManagerImpl.java:103) at com.atlassian.confluence.api.impl.service.content.ThreadlocalWebResourceDependenciesRecorder.record(ThreadlocalWebResourceDependenciesRecorder.java:84) at com.atlassian.confluence.api.impl.service.content.ContentBodyConversionManagerImpl.lambda$computeConversionResources$1(ContentBodyConversionManagerImpl.java:97) at com.atlassian.confluence.api.impl.ReadOnlyAndReadWriteTransactionConversionTemplate.lambda$executeInReadWrite$1(ReadOnlyAndReadWriteTransactionConversionTemplate.java:61) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at com.atlassian.confluence.api.impl.ReadOnlyAndReadWriteTransactionConversionTemplate.executeInReadWrite(ReadOnlyAndReadWriteTransactionConversionTemplate.java:61) at com.atlassian.confluence.api.impl.service.content.ContentBodyConversionManagerImpl.computeConversionResources(ContentBodyConversionManagerImpl.java:95) at com.atlassian.confluence.api.impl.service.content.ContentBodyConversionManagerImpl.convert(ContentBodyConversionManagerImpl.java:88) at com.atlassian.confluence.api.impl.service.content.factory.ContentBodyFactory.makeContentBody(ContentBodyFactory.java:94) at com.atlassian.confluence.api.impl.service.content.factory.ContentBodyFactory.makeContentBodies(ContentBodyFactory.java:79) at com.atlassian.confluence.api.impl.service.content.factory.ContentFactory.makeContentBodies(ContentFactory.java:262) at com.atlassian.confluence.api.impl.service.content.factory.ContentFactory.buildersFrom(ContentFactory.java:161) at com.atlassian.confluence.api.impl.service.content.factory.ContentFactory.buildFrom(ContentFactory.java:115) at com.atlassian.confluence.api.impl.service.content.factory.ContentFactory.buildFrom(ContentFactory.java:108) at com.atlassian.confluence.api.impl.service.content.factory.AbstractSpaceFactory.getHomepageRef(AbstractSpaceFactory.java:72) at com.atlassian.confluence.api.impl.service.content.sql.SqlSpaceFactory.buildFrom(SqlSpaceFactory.java:58) at com.atlassian.confluence.api.impl.service.content.sql.SqlSpaceFinder$SqlSpaceFinderImpl.lambda$fetchMany$1(SqlSpaceFinder.java:102) at com.google.common.collect.Iterators$8.transform(Iterators.java:799) at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) at java.lang.Iterable.forEach(Iterable.java:74) at com.atlassian.confluence.api.model.pagination.PageResponseImpl$Builder.addAll(PageResponseImpl.java:173) at com.atlassian.confluence.api.model.pagination.PageResponseImpl.from(PageResponseImpl.java:84) at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.executeBatch(PaginationServiceImpl.java:169) at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.lambda$doRequestInTransaction$1(PaginationServiceImpl.java:143) at com.atlassian.confluence.api.impl.ReadOnlyAndReadWriteTransactionConversionTemplate.executeInReadOnly(ReadOnlyAndReadWriteTransactionConversionTemplate.java:38) at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.doRequestInTransaction(PaginationServiceImpl.java:138) at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.doPaginationListRequest(PaginationServiceImpl.java:70) at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.doPaginationRequest(PaginationServiceImpl.java:46) at com.atlassian.confluence.api.impl.service.content.sql.SqlSpaceFinder$SqlSpaceFinderImpl.fetchMany(SqlSpaceFinder.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at com.atlassian.confluence.osgi.HostClassLoaderMethodInterceptor.invoke(HostClassLoaderMethodInterceptor.java:23) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) at com.sun.proxy.$Proxy2709.fetchMany(Unknown Source) at com.atlassian.confluence.plugins.restapi.resources.SpaceResource.spaces(SpaceResource.java:294) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) [...]
Going directly to the edit page URL just results in a blank page.
Fix
Run the following SQL:
update bodycontent set body = replace(body, 'ac:name="search-box"', 'ac:name="livesearch"') where contentid = <content ID of affected page>;
Attachments
Issue Links
- duplicates
-
CONFCLOUD-53307 Pages using the search-box macro are not accessible
- Closed