Disable OOTB Off Time from page properties | Adobe Higher Education
Skip to main content
Level 4
July 3, 2024
Répondu

Disable OOTB Off Time from page properties

Hi Everyone,

I have a requirement to temporary disable off Time from page properties.

If anyone has any idea it will be helpful.

 

Thanks in Advance

Ce sujet a été fermé aux réponses.
Meilleure réponse par h_kataria

ok, thanks for clarifying. But as far as I know it is part of sling resolution process itself. https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/need-some-explanation-on-how-on-off-time-works/td-p/190506 So, there will not be any easy way to disable it. On the other hand, a simple script to remove the offTime property from the pages would be rather easy and straightforward for your use case.

4 commentaires

h_kataria
Community Advisor
Community Advisor
July 3, 2024

I will assume you have your own page resourceType defined already, you can easily hide the offtime in your page's dialog. You can overlay this /libs/wcm/foundation/components/basicpage/v1/basicpage/tabs/basic/items/column/items/onofftime if it is not there in your page's dialog and change it as per your requirements. 

Level 4
July 3, 2024

I have overlayed page ....but already many pages are created with offTime authored.. that pages are expiring.. so want to disable functionality. Is there any way to disable it?

 

h_kataria
Community Advisor
h_katariaCommunity AdvisorRéponse
Community Advisor
July 3, 2024

ok, thanks for clarifying. But as far as I know it is part of sling resolution process itself. https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/need-some-explanation-on-how-on-off-time-works/td-p/190506 So, there will not be any easy way to disable it. On the other hand, a simple script to remove the offTime property from the pages would be rather easy and straightforward for your use case.

arunpatidar
Community Advisor
Community Advisor
July 3, 2024

Hi @lone_ranger 

you can try switching off below setting in the Replication Agent

 

On-/Offtime reached

This triggers automatic replication (to activate or deactivate a page as appropriate) when the ontimes or offtimes defined for a page occur. This is primarily used for Dispatcher Flush agents.


Example of replication setting page

 

 

 

Not sure if this can help or not since this is a global setting in the replication agent.

Otherwise you can write a simple groovy scrip to query page with offtime properties and remove it

Arun Patidar
Level 4
July 4, 2024

Can we do same in Cloud?

arunpatidar
Community Advisor
Community Advisor
July 4, 2024

Hi @lone_ranger 
I have not tried this in cloud but you try in local/dev to check if this works or not?

Arun Patidar
Level 2
July 4, 2024

You can write an script to find out all the offtime and remove them.  Also override page component dialog to remove (hideResource) the offtime from the page properties.

 

 

kautuk_sahni
Community Manager
Community Manager
July 8, 2024

@lone_ranger Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you! 

Kautuk Sahni