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

Upgrade process (7.0 to 7.4): Data too long for column 'fieldName'

Details

    Description

      1. Go to Content & Data -> Forms and click + to create a new form
      2. Set the title to "New Form"
      3. Add a random field to form's first page (e.g. a Text field)
      4. enter a long text as its label (more than 255 letters overall), and do not change the default generate field name
      5. publish the form
      6. got to the published url, and submit at least one entry in that form
      7. you will notice that both DDMStructure and DDMContent tables contain a json with a large field name
      8. stop the server
      9. launch DXP 7.4 db migration tool
      10.watch the upgrade log

      Expected result:
      no error occurs

      Actual result:
      2022-01-06 16:11:56.537 ERROR [Portal Dependency Manager Component Executor--2][UpgradeStepRegistratorTracker:221] Failed upgrade process for module com.liferay.dynamic.data.mapping.service
      com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.BatchUpdateException: Data truncation: Data too long for column 'fieldName' at row 1

      at com.liferay.dynamic.data.mapping.internal.upgrade.v4_1_0.DDMFieldUpgradeProcess.doUpgrade(DDMFieldUpgradeProcess.java:154) ~[?:?]
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.lambda$upgrade$0(UpgradeProcess.java:122) ~[portal-kernel.jar:?]
              at com.liferay.portal.db.partition.DBPartitionUtil.forEachCompanyId(DBPartitionUtil.java:113) ~[portal-impl.jar:?]
              at com.liferay.portal.dao.db.BaseDB.process(BaseDB.java:308) ~[portal-impl.jar:?]
              at com.liferay.portal.kernel.dao.db.BaseDBProcess.process(BaseDBProcess.java:241) ~[portal-kernel.jar:?]
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:109) ~[portal-kernel.jar:?]
              ... 168 more
      Caused by: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'fieldName' at row 1
       ...

      Attachments

        Activity

          People

            pt-bravo Product Team Bravo (Inactive)
            istvan.dezsi Istvan Dezsi
            Kiyoshi Lee Kiyoshi Lee
            Istvan Dezsi Istvan Dezsi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              33 weeks, 3 days ago

              Packages

                Version Package
                7.4.3.12 CE GA12
                7.4.13 DXP U8
                Master