Push Publish: Not able to push content for a language with different ids in the sender/receiver
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)
- Create a language A in the sender (probably it takes id=3 in a fresh dotcms installation)
- Create a new language B in the receiver (probably it takes id=3 in a fresh dotcms installation)
- Delete the language B from the receiver
- Create a new language C in the receiver (it takes id=4)
- Create a new language D in the sender (it takes id=4)
- Create new content for language D and try to push it to the receiver
- 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
Not able to reproduce with the latest master. https://screencast.com/t/A8WOvo9M Neither with the client's data
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:
Content received in server B:

Tested locally on master branch / Mac OS 10.10 / Postgres 9.6.6 / Chrome v64.0.3282.167 / Tomcat 8 / Java 8.6
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:

Receiver:

Tested on master branch / Mac OS 10.10 / Postgres 9.6.6 / Chrome v64 / Tomcat 8 / Java 8.6
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.