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

Generated Auto Tags that have apostrophes do not get added to the tag; Console errors are present

    Details

      Description

      Steps to Reproduce:

      1. Navigate to Control Panel > Configuration > System Settings > Assets > Enable Auto Tagging
      2. Navigate to Control Panel > Configuration > System Settings > Documents and Media > Enable MS Cognitive Services
      3. Navigate to Documents and Media > Add > Basic Document
      4. Upload an image similar to the attached image
      5. Publish

      Expected result:
      Image is tagged and there are no console errors.

      Actual result:
      Image is not tagged
      Console errors are as follows:

      2019-02-05 19:05:08.796 ERROR [liferay/asset_auto_tagger-1][AssetAutoTaggerImpl:132] Unable to add auto tag: Bird's-eye view
      com.liferay.asset.kernel.exception.AssetTagException: & ' @ \ ] } : , = > / < _ [ { % | + # ` ? " _ ; / * ~ [Sanitized]
              at com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl.validate(AssetTagLocalServiceImpl.java:829)
              at com.liferay.portlet.asset.service.impl.AssetTagLocalServiceImpl.addTag(AssetTagLocalServiceImpl.java:111)
              at sun.reflect.GeneratedMethodAccessor726.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
              at com.sun.proxy.$Proxy693.addTag(Unknown Source)
              at com.liferay.asset.kernel.service.AssetTagLocalServiceWrapper.addTag(AssetTagLocalServiceWrapper.java:85)                                                                                                       at sun.reflect.GeneratedMethodAccessor726.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
              at com.sun.proxy.$Proxy694.addTag(Unknown Source)
              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 com.liferay.portal.spring.aop.AopMethodInvocation.proceed(AopMethodInvocation.java:44)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.lambda$invoke$0(TransactionInterceptor.java:61)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:128)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:51)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:59)
              at com.liferay.portal.spring.aop.AopMethodInvocation.proceed(AopMethodInvocation.java:51)
              at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:46)
              at com.liferay.portal.spring.aop.AopMethodInvocation.proceed(AopMethodInvocation.java:51)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:70)
              at com.liferay.portal.spring.aop.AopMethodInvocation.proceed(AopMethodInvocation.java:51)
              at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:44)
              at com.sun.proxy.$Proxy48.addTag(Unknown Source)
              at com.liferay.asset.auto.tagger.internal.AssetAutoTaggerImpl.lambda$tag$0(AssetAutoTaggerImpl.java:115)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:128)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:51)
              at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:39)
              at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28)
              at com.liferay.asset.auto.tagger.internal.AssetAutoTaggerImpl.tag(AssetAutoTaggerImpl.java:91)
              at com.liferay.asset.auto.tagger.internal.messaging.AssetAutoTaggerMessageListener.doReceive(AssetAutoTaggerMessageListener.java:41)
              at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
              at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
              at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:752)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:664)
              at java.lang.Thread.run(Thread.java:748)
      

      Reproduced on:
      Tomcat 9.0.10 + MySQL 5.7 + Edge 42. Portal master GIT ID: a50180db50f53f86c6a96fadb396d5a7fce4a645.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  32 weeks, 4 days ago

                  Packages

                  Version Package
                  Master