Affects Version/s: 6.2.10 EE GA1, 6.2.X EE
Fix Version/s: 6.2.X EE
Steps to reproduce:
(Note: Instead of steps 1. to 5. you can import the attached ee6120.sql and start the 6.2 bundle on that database)
1. Start a Liferay 6.1 GA2 bundle.
2. Set the portal's default and available language to de_DE.
3. On the default Site, create a Web Content Structure with a simple text field.
4. Enable Local Staging on the default Site.
5. After Staging was enabled, create a Web Content Article from the Structure without checking the localizable option, and be sure to set a value to the text field. Don't publish yet.
6. Stop the portal and upgrade it to Liferay 6.2 by starting the bundle connected to the database.
7. Edit the Web Content Structure and set its text field to required (for some reason I was not able to do this on Liferay 6.1, but doing in in 6.2 should bring the same result).
8. Publish the Site to Live.
Actual Result: Publication fails with an exception:
com.liferay.portlet.dynamicdatamapping.StorageFieldRequiredException: Required field value is not present for de_DE
Expected Result: Successful publish.
This issue happens because the dynamic-content tag in the created Web Content doesn't have the 'language-id="de_DE"' option (since it was created in Liferay 6.1 without checking the localizable option), and in this scenario the portal tries to validate the content with the en_US locale, which fails obviously.
master is not affected, but the upgrade framework was heavily refactored there so it doesn't make sense to look for anything to backport. A unique fix is needed for 6.2 that extends the already existing verify process method to make sure language-id is added to dynamic-contents in journal articles.