core icon indicating copy to clipboard operation
core copied to clipboard

Push Publish: Not able to push content for a language with different ids in the sender/receiver

Open nollymar opened this issue 9 years ago • 4 comments

Currently, when a language is pushed, the id it takes to insert the row in DB is the receiver sequential (language_seq), instead of the id from the sender. It generates problems when a new content for this language is pushed.

Take a look at: https://github.com/dotCMS/enterprise-2.x/blob/master/src/main/java/com/dotcms/enterprise/publishing/remote/handler/LanguageHandler.java#L64-L67

Reported by a client: https://my.dotcms.com/tickets/detail.dot?id=38e7afa2-9a1b-4543-9be4-5ef94705c4d9

Known Workarounds

Modify the id of the language in the receiver directly in DB

Steps to Reproduce (for bugs)

  1. Create a language A in the sender (probably it takes id=3 in a fresh dotcms installation)
  2. Create a new language B in the receiver (probably it takes id=3 in a fresh dotcms installation)
  3. Delete the language B from the receiver
  4. Create a new language C in the receiver (it takes id=4)
  5. Create a new language D in the sender (it takes id=4)
  6. Create new content for language D and try to push it to the receiver
  7. In the sender the push has status: "Success". However, in the receiver, language D was saved with id=5 and the content is not shown in the list of contents

Your Environment

  • dotCMS version used: dotCMS 4.1+
  • Browser Name and version: Google Chrome
  • Operating System and version: OSx
  • Application Server and version: tomcat 8
  • Java Brand and version: JDK 8
  • Database and version: postgres
  • Application module (if apply): Push Publish

nollymar avatar Sep 21 '17 17:09 nollymar

Not able to reproduce with the latest master. https://screencast.com/t/A8WOvo9M Neither with the client's data

erickgonzalez avatar Sep 25 '17 19:09 erickgonzalez

This is an existing bug. I was able to reproduce it following "Steps to Reproduce" Language is not being push by dependency to the receiver. Content created in server A: image Content received in server B: image

Tested locally on master branch / Mac OS 10.10 / Postgres 9.6.6 / Chrome v64.0.3282.167 / Tomcat 8 / Java 8.6

shaydotcms avatar Apr 02 '18 14:04 shaydotcms

Tested again, unable to reproduce in latest master. Content in new language (deutsch id=4) was pushed successfully and also language was pushed by dependency(in receiver, deutsch id=5) Sender: image

Receiver: image

Tested on master branch / Mac OS 10.10 / Postgres 9.6.6 / Chrome v64 / Tomcat 8 / Java 8.6

shaydotcms avatar Apr 03 '18 20:04 shaydotcms

Passed QA. Tested scenario when same language exists in both sender and receiver but having different language id on each. Content was pushed successfully without errors on sender nor receiver.

shaydotcms avatar Apr 05 '18 15:04 shaydotcms