AEM/CQ5 On/Off Time vs Activate Later On Content and Understanding

Activate later and On-Off Time of Content are two different behavior in CQ5/AEM 6. When you apply activate later on any content , that content gets activated at given time and exist in publish instance until it is deactivated or deleted.
On-Off time is little different . It adds additional attribute as properties to the content but it does not activate content. To make it available on publish, it has to be activated. The On and Off Time gets applied on publish site. When Off time matches or greater than current time , CQ5 OSGI Services consider that content as dead and if you try to access using HTTP, CQ5 would return 404 error.

However that content resides in JCR opposite to deactivate feature that deletes content from Publish JCR.That’s the catch and generally Developer thinks  that off time would make content disappear but that’s not the fact.

Off time related content can be checked in CQ5 Component like this.

<% currentPage.isValid()%> or You can use ResourceUtil Class that will return false because Off time has been applied and even that exist in Publish JCR would be considered as dead content.

Replication

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s