RE: Migration from 6.2ce to 7.3ce - Asset publisher preferences are empty

Fabiana Laufer, modified 5 Years ago. New Member Posts: 4 Join Date: 3/1/13 Recent Posts
We are trying to migrate a Liferay 6.2ce GA6 portal to 7.3ce GA2. Our asset publishers in the 6.2ce have many preferences set, among these also a specific content they show or several contents based on a structure filtering. None of these settings are properly migrated resulting in that every Asset Publisher shows ALL of the content.
The error we see is:
2020-04-15 04:43:50.809 INFO [main][LoggingTimer:83] Starting com.liferay.portal.kernel.upgrade.BaseUpgradePortletId#upgradeInstanceablePortletIds 2020-04-15 04:43:52.566 WARN [main][BaseUpgradePortletId:403] org.postgresql.util.PSQLException: ERROR: value too long for type character varying(200) org.postgresql.util.PSQLException: ERROR: value too long for type character varying(200)

This is due to the updating the portletid on portletpreferences. The portletids are replaced with a new id in Liferay 7.3. In some cases this might be exceeding 200 characters, thus it fails to be updated.

We use a postgres database and on starting the portal 7.3ce the length of the field is already too small for the value it will hold after the migration. I could update the table to change the field size, but I wish to first know if I am missing something else.What we notice is that in the portletpreferences, all of the portlets present in a plid (layout) are added. One of this lines caught our attention holding a comma separated value of portletid:101_INSTANCE_14nPoLj4GLWT,101_INSTANCE_iNWDqh3nnsYN,101_INSTANCE_SbezGshllrqk,
My questions here are:
  1.  Is  "101_INSTANCE_14nPoLj4GLWT,101_INSTANCE_iNWDqh3nnsYN,101_INSTANCE_SbezGshllrqk," a normal entry in the portletpreferences portletid field for a single record?
  2.  Could it be that each of these will change it's id to a longer value and there this comma separated list becomes to long for this field?
  3.  How do I solve all this?
thumbnail
Alberto Chaparro Terleira, modified 5 Years ago. Liferay Master Posts: 560 Join Date: 4/25/11 Recent Posts
Hi Fabiana,
This is use can be related with a problem when the companyId is 0 in the portletPreferences table, in that case, the records in the portletPreferences table can be removed during the upgrade because they are considered orphaned. To verify this, can you check the number of records with the companyId 0 after the upgrade?
select * from PortletPreferences where companyId is NULL or companyId = 0

Also, can you verify if you verify these two things:

- Is the companyId part of the portletPreferences table in your original database?

- How many companies do you have? (See company table)

Thanks.
Darryl Kpizingui, modified 5 Years ago. Junior Member Posts: 82 Join Date: 1/10/13 Recent Posts
Hi,

I just did a migration to 7.3 GA 2 from Liferay 7.2. Per my experience, many of the issue observed after the migration is because the error in the migration log of the type:

Attempting to upgrade table Layout by recreating the table due to: ...


When Liferay dump the table to file and recreate the whole thing many data are missing. Later in the portal I found issue with Assets, Layout, Web content and so on. So make sure you create the missing columns before running the migration tool. This prevent Liferay from dumping the database to a file.

I didn't have the error you have, I also used Postgres.

ERROR: value too long for type character varying(200)


Cheers,
Darryl.