We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36695
    • 47 Posts
    As per the title - why does this happen? In core/model/modx/processors/resource/publish.class.php, ~line 51, the unpub_date is set to false. In particular, this processor is triggered when you use the Publish buttons when using Articles. The processor isn't called when you change the "published" tick box and save the resource. I can't think of any use case where this is helpful, but am welcome to suggestions.

    In my case, I was setting the unpublish date based on a template variable date (a closing date for job applications). When submitted (in a non-published state) the unpub_date was entered correctly. When an admin user then published the resource, the unpub_date was cleared.

    Has anyone got any rationale for this behaviour? Or use cases? Or even better, a solution without hacking the core? Would I break anything if I just removed that line anyway?!