Legacy Knowledge Base
Published Jun. 30, 2025

After patching, all publications in flight are outdated.

Written By

Debora Vita

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

After updating our fix pack level, all publications in flight are outdated.

Steps to reproduce the issue:

  1. Add new Publication called "lmp_excel_upd"
  2. Update Web Content in that Publication "lmp_excel_upd" for review, do not publish these changes.
  3. Upgrade to a newer version, that Publication "lmp_excel_upd" status becomes "OUT OF DATE"

Environment

  • DXP 7.4

Resolution

We have a groovy script which can be used to resolve this issue.

Then, you can run it from Control Panel > Server Administration > Script

// This script updates the schema version id of the given CT collection. This is
// to be used as a workaround when a CT collection becomes out of date.

// The script contains two adjustable variables on lines 22 and 23: companyId
// and ctCollectionId. Please adjust them to point to the desired CT Collection.

import com.liferay.change.tracking.model.CTCollection;
import com.liferay.change.tracking.model.CTSchemaVersion;
import com.liferay.change.tracking.service.CTCollectionLocalServiceUtil;
import com.liferay.change.tracking.service.CTSchemaVersionLocalServiceUtil
import com.liferay.portal.kernel.security.auth.CompanyThreadLocal;
import com.liferay.portal.kernel.workflow.WorkflowConstants;

import java.util.HashMap;
import java.util.Map;

final long companyId = 42637;
final long ctCollectionId = 602;

long oldCompanyId = CompanyThreadLocal.getCompanyId();

try {
CompanyThreadLocal.setCompanyId(companyId);

CTCollection ctCollection = CTCollectionLocalServiceUtil.getCTCollection(
ctCollectionId);

CTSchemaVersion ctSchemaVersion =
CTSchemaVersionLocalServiceUtil.getLatestCTSchemaVersion(companyId);

ctCollection.setSchemaVersionId(ctSchemaVersion.getSchemaVersionId());
ctCollection.setStatus(WorkflowConstants.STATUS_DRAFT);

CTCollectionLocalServiceUtil.updateCTCollection(ctCollection);

out.println(
"Successfully updated schema version of CT collection " +
ctCollectionId);
}
finally {
CompanyThreadLocal.setCompanyId(oldCompanyId);
}


Additional Information

LPS-173411

 

Did this article resolve your issue ?

Legacy Knowledge Base