jimie VIP
Total posts: 531
14 Mar 2015 08:52

Hello Sergey,

I found that articles which are set to expire after a period of time, they will get marked as expired and message posted in easysocial wall only when me as admin browse the section of those articles, can you have a look ?

Rgds

Last Modified: 17 Mar 2015


Sergey
Total posts: 13,748
17 Mar 2015 12:32

Not only you. Anyone who have access to see them in the list. You see if for example you set article expire on 20 March 2015 but from 19 March to 22 March there will be no users at all. Not a single user, it means that php will never be triggered. Thus code that will change date will be never executed.

So there are 2 aproaches to solve problem like that.

  1. Create cron task that will run every 5 minuts and check all article.
  2. Change article expire date whne it is listed in the list.

We decided to go last option although it has one downside. It will show article in the list after expire once. But already close access to full view. And for that someone have to open list of articles but that is ok because if no one opens the list, then it does not matter is date was changed or not. No one is viewing it anyway.

Powered by Cobalt