Legacy Knowledge Base
Published Jun. 30, 2025

In Progress Publications Can't Be Published After Upgrading

Written By

Madeleine Clay

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

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

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

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

Issue

  • After upgrading, any "in progress" publications fail to publish.
  • When I attempt to publish them, the publication fails and they are marked "out of date".
  • An Unable to publish from test to Production because it is out of date with the current release error is printed in the logs:
ERROR [liferay/background_task-2][BackgroundTaskMessageListener:162] Unable to execute background task
java.lang.IllegalArgumentException: Unable to publish from test to Production because it is out of date with the current release
at com.liferay.change.tracking.internal.background.task.CTPublishBackgroundTaskExecutor.execute(CTPublishBackgroundTaskExecutor.java:122) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
[...]

Environment

  • Quarterly Releases

Resolution

  • All publications should be published before upgrading as part of our documented Upgrade Preparation and Planning steps.
  • However, there are some cases where this may not be possible, e.g. upgrading to apply fixes to resolve publication issues.
  • In these cases, please open a support ticket and request a hotfix containing LPD-31488 and LPD-32036.
  • Or you can manually work around the issue using the following Groovy script to update the schemaVerionId of publications:

NOTE: Be sure to take a backup of your database prior to making any changes. Always test the changes in a lower environment before making changes in production.

Making manual changes to the database is not recommended, and should be carefully assessed based on your own business needs and risk factors. Any such operation is performed at the sole discretion of your own team.

import com.liferay.portal.kernel.dao.jdbc.DataAccess;

import java.sql.Connection;
import java.sql.PreparedStatement;

try {
Connection connection = DataAccess.getConnection();

PreparedStatement ps =
connection.prepareStatement(
"update CTCollection set status = 2, schemaVersionId = (select max(schemaVersionId) as maxSchemaVersion from CTSchemaVersion) where status in (2,3)" );

ps.execute();

connection.commit();
}
catch (Throwable t) {
out.println(t);
}
  • Note: Remove the connect.commit() line if autocommit=true is set in your environment.

 

Did this article resolve your issue ?

Legacy Knowledge Base