Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-70400

Creating wiki fails when a sanitizer is defined

    Details

      Description

      Description

      The customer's sanitizer hook conflicts with the Wiki. When the hook is deployed the Wiki fails to display. This issue is resolved in branch, but I tested on the latest portal-133 and it was still reproducible. I could not find a previous instance of this issue. Can you assist in locating the fix since it appears to exist?

      Steps to reproduce

      1. Deploy the attached basic-sanitizer-hook-6.2.10.1.war
      2. Place a wiki portlet on the home page.

      Results of Testing

      Expected Result: The Wiki portlet is rendered with a default, blank starting page.
      Actual Results: The Wiki is unavailable and an error appears in the logs.

      Errors/Logs

      13:44:43,297 ERROR [http-bio-8080-exec-70][render_portlet_jsp:132] null
      java.lang.NullPointerException
      	at com.liferay.portal.kernel.sanitizer.BaseSanitizer.sanitize(BaseSanitizer.java:67)
      	at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
      	at com.liferay.portal.sanitizer.SanitizerImpl.sanitize(SanitizerImpl.java:129)
      	at com.liferay.portal.kernel.sanitizer.SanitizerUtil.sanitize(SanitizerUtil.java:130)
      	at com.liferay.portal.kernel.sanitizer.SanitizerUtil.sanitize(SanitizerUtil.java:96)
      	at com.liferay.portal.kernel.sanitizer.SanitizerUtil.sanitize(SanitizerUtil.java:62)
      	at com.liferay.portlet.wiki.service.impl.WikiPageLocalServiceImpl.addPage(WikiPageLocalServiceImpl.java:144)
      	at com.liferay.portlet.wiki.service.impl.WikiPageLocalServiceImpl.addPage(WikiPageLocalServiceImpl.java:238)
      	at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
      	at com.liferay.portlet.wiki.service.WikiPageLocalServiceWrapper.addPage(WikiPageLocalServiceWrapper.java:367)
      	at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      

      Master

      Unable to test, the plugin will not deploy in master.

      Branch

      Reproduced
      3d2e71b58e5bf0c128403e23a880d58d97a1a7fa

      QA Notes

      Please be aware that my fix will not work unless the working-hook is deployed (instead of the customer's basic-sanitizer-hook). This is due to the fact that the sanitize method is not functionally implemented in basic-sanitizer-hook, and so will error out with different errors once my fix has been applied.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 43 weeks, 4 days ago

                  Packages

                  Version Package
                  6.2.X EE