Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Push Publishing] : Pushing content with Tags that have single quote in their names are failing #15792

Closed
jcastro-dotcms opened this issue Jan 8, 2019 · 2 comments

Comments

@jcastro-dotcms
Copy link
Contributor

commented Jan 8, 2019

Reproducible in dotCMs 4.3.3
Reported by customer via Support: https://dotcms.zendesk.com/agent/tickets/97261

Tags associated to Contentlets might have single quotes in their names. When pushing a Contentlet with associated Tags, the Push Publishing mechanism validates if the pushed Tags need to be updated or created in the destination dotCMS instance. When those Tags have single quotes in their names, the API is failing to handle them correctly and the push fails.

Expected Behavior

The API must handle single quotes correctly.

Current Behavior

Tags with single quotes in their names are causing Push Publishing to fail.

Possible Solution

Code fix.

Known Workarounds

N/A

Steps to Reproduce

  1. Create a dotCMS Push Publishing Environment with one sender and one receiver.
  2. Create an HTML Page, and associate a Tag to it (add the Tag field to the Content Type if needed).
  3. Push the new HTML Page to the receiver.
  4. Force Push or make any change to the HTML Page so that it will be pushed again.
  5. The Push fails, and the dotcms.log file displays an error similar to this one:
[07/01/19 16:17:49:131 EST] INFO caffine.CaffineCache: ***	Building Cache : workflowstepcache, size:1000,Concurrency:32
[07/01/19 16:17:49:140 EST] ERROR business.PublisherAPIImpl: Error publishing bundle with ID '197bc049-f2ff-41f9-b202-422cd98bfb3f.tar.gz': null
com.dotcms.publishing.DotPublishingException
at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.a(SourceFile:368) ~[ee-4.3.3.jar:?]
at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.handle(SourceFile:153) ~[ee-4.3.3.jar:?]
at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.handle(SourceFile:130) ~[ee-4.3.3.jar:?]
at com.dotcms.publisher.receiver.BundlePublisher.process(BundlePublisher.java:203) [dotcms_4.3.3_999999.jar:?]
at com.dotcms.rest.PublishThread.run(PublishThread.java:42) [dotcms_4.3.3_999999.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
Caused by: java.lang.NullPointerException
at com.dotcms.repackage.uk.ltd.getahead.dwr.WebContextFactory$ProxyWebContext.getHttpServletRequest(WebContextFactory.java:104) ~[dot.dwr-3rc2modified_2.jar:?]
at com.dotmarketing.util.web.WebDotcmsException.getFomatedMessage(WebDotcmsException.java:45) ~[dotcms_4.3.3_999999.jar:?]
at com.dotmarketing.util.web.WebDotcmsException.<init>(WebDotcmsException.java:31) ~[dotcms_4.3.3_999999.jar:?]
at com.dotmarketing.tag.business.GenericTagException.<init>(GenericTagException.java:11) ~[dotcms_4.3.3_999999.jar:?]
at com.dotmarketing.tag.business.TagAPIImpl.saveTag(TagAPIImpl.java:281) ~[dotcms_4.3.3_999999.jar:?]
at com.dotmarketing.tag.business.TagAPIImpl.saveTag(TagAPIImpl.java:216) ~[dotcms_4.3.3_999999.jar:?]
at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.a(SourceFile:693) ~[ee-4.3.3.jar:?]
at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.a(SourceFile:565) ~[ee-4.3.3.jar:?]
at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.a(SourceFile:225) ~[ee-4.3.3.jar:?]
... 5 more
[07/01/19 16:17:49:145 EST] ERROR lang.String: Error publishing bundle with ID '197bc049-f2ff-41f9-b202-422cd98bfb3f.tar.gz': com.dotcms.publishing.DotPublishingException
[07/01/19 16:17:49:145 EST] INFO rest.PublishThread: Finished bundle publish process

Your Environment

  • dotCMS version used: 4.3.3
  • Browser Name and version: Not relevant.
  • Operating System and version: Not relevant.
  • Application Server and version: Not relevant.
  • Java Brand and version: Not relevant.
  • Database and version: Not relevant.
  • Application module: Push Publishing

@jcastro-dotcms jcastro-dotcms self-assigned this Jan 8, 2019

jcastro-dotcms added a commit that referenced this issue Jan 9, 2019

#15792 : Fixing single quote handling in TagFactoryImpl class. Adding…
… missing logging in TagAPI classes and doing some cleanup in there too.
@jcastro-dotcms

This comment has been minimized.

Copy link
Contributor Author

commented Jan 9, 2019

PR: #15798

@jtesser jtesser added this to Important Issues in Enterprise Services Issues Jan 10, 2019

jgambarios added a commit that referenced this issue Jan 16, 2019

jgambarios added a commit that referenced this issue Jan 16, 2019

#15792 : Fixing single quote handling in TagFactoryImpl class. Adding… (
#15798)

* #15792 : Fixing single quote handling in TagFactoryImpl class. Adding missing logging in TagAPI classes and doing some cleanup in there too.

* #15792 Fixed query

@bryanboza bryanboza added this to CODY in QA Jan 16, 2019

@bryanboza

This comment has been minimized.

Copy link
Contributor

commented Jan 24, 2019

Fixed, tested on master // Oracle // FF and after the changes, I'm unable to recreate the issue... A new case reported here #15885

@bryanboza bryanboza moved this from CODY to Done in QA Jan 24, 2019

@wezell wezell moved this from Important Issues to R&D Said will add to Current/Next Iteration in Enterprise Services Issues Jan 30, 2019

@wezell wezell closed this Jan 31, 2019

Enterprise Services Issues automation moved this from R&D Said will add to Current/Next Iteration to Done Jan 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.