I am a little bit confused about how the publishing time work in modx. I found two columns in database: pub_date and publishedon. I am not sure if I understand the difference correctly. The pub_date is time, when the article is supposed to be published, useful when I want to publish document in the future. Publishedon is the time when I check the ’Publish’ checkbox in editor and hit save. The problem is that if the article is published automatically at specific time given by pub_date, the field publishedon doesn’t update. Also the correct time of publishing is either in pub_date column or in publishedon column.
Well, now tell me, how am I supposed to sort them?

It is impossible with ORDER BY.
-- sorry for my english, bad teacher

Ok, sorry! The publishedon field IS updated. However the time of publishedon and pub_date isn’t the same. That confused me. However it is still weird. Imagine small web with very few visitors. I create document and set the time of publishing to Monday. However first visitor comes at Friday and the publishedon field is set to Friday so it seems that the document is newer than it in fact is.
-- sorry for my english, bad teacher

You’re right, that might not be what you want. You can visit the page yourself on the pub date, but shouldn’t have to.
MODx should probably set the publishedon date to the pub_date if there is one set and it is prior to today’s date (unless it does already -- I haven’t checked). If it doesn’t, feel free to file that request through the Jira Bugs and Requests link at the top of this page.
Or it might be possible to sync these two values with some plugin. There is an onDocPublished event but I am not sure whether it is triggered also when the document is published automatically. Maybe I’ll try it later.
-- sorry for my english, bad teacher

Quote from: tobice at Jun 04, 2010, 04:38 PM
Or it might be possible to sync these two values with some plugin. There is an onDocPublished event but I am not sure whether it is triggered also when the document is published automatically. Maybe I’ll try it later.
OnDocPublished doesn’t get triggered when docs are published automatically. It only happens when you publish a doc manually in the Manager.
-- sorry for my english, bad teacher
