MODX Community

Can we unpublish and then publish again (automatically)?

I have some currently published pages – that run a slide show – which I want to be able to unpublish at a certain time, then a few hours later republish them.

I was hoping I could automate this a few days in advance by simultaneously setting an unpublish date and then a publish-on date which comes after the unpublish date. MODx doesn’t seem to allow this and automatically unpublishes the document if the publish-on field is filled in.

  1. Is there a setting to disable the automatic unpublish action?
  2. Is there a reason this hand-holding needs to be there? Would publishing a currently published document cause a problem in the database?
  3. If not, can we consider this a bug that needs fixing?

Is there a way to work around this?

maybe you could create a plugin at OnResourceAutoPublish and set the appropriate values

here is, where it happens: