saomay
Forum Replies Created
-
Forum: Plugins
In reply to: [Edit Flow] [Plugin: Edit Flow] Custom statuses create timestamp problemHi Daniel,
Thanks for the fix but upon closer look, even though the timestamp now shows the correct current time after clicking “Publish” on the post page as in “Published on:……” but the timestamp of the post on the blog as well as in the All Posts manage page showed an older timestamp. Again, this could be an issue with how the db records the timestamp when you change the custom statuses and how it is being queried and shown or displayed.
So here what I did:
1. Created a post on August 10th at 5:55PM with title “Test 5:50PM 08/10” which is a Wednesday.
2. I switched from Pending Review to Pending Publication and saved the post with the respective status.
3. I purposely waited for for midnight to pass up until 1:28AM August 11th which is a Thursday and clicked “Publish”
4. I went to view the blog post and saw the date posted as August 10th NOT August 11th; I also clicked on All Posts and filtered by Published status, looked at the specific test post and saw under Date:
8 hours ago
PublishedIt actually should be “2 min ago Published” because I just published it. Based on these two indicators, WP seems to go by a different timestamp or that the timestamp shown on the post itself is a current time at the time of clicking “Publish” but not the post time understood by WP. So I think there is still that issue of changing the custom statuses and the auto-affixed timestamp even though it is now not shown on the post page.
Sorry but this is getting very interesting hope you think so too =)
Forum: Plugins
In reply to: [Edit Flow] [Plugin: Edit Flow] Custom statuses create timestamp problemHi Daniel,
I apologize because in the my own way of messing around with the meta-boxes.php file I must have taken out something and it somehow still reported the issue; I replaced the modified file with the original and everything works perfectly now.
I just really want to say thank you so much for cranking on this…you’re awesome!
David
Forum: Plugins
In reply to: [Edit Flow] [Plugin: Edit Flow] Custom statuses create timestamp problemSo for you to understand better:
1. Created a new post with title say “Test 3:30PM” —-> Save as either Draft or Pending Review
2. Changed status from Draft or Pending Review to —-> Pending Publication or any of the other Edit Flow’s custom statuses and clicked Save (and verify that the Publish Immediately is there)
3. Waited for 5-40 min and clicked Publish and the article shows the timestamp of 3:30PM NOT 3:35PM or later.
Forum: Plugins
In reply to: [Edit Flow] [Plugin: Edit Flow] Custom statuses create timestamp problemI created new posts because I realized that old posts will have this inherent issue. I waited for 5-40 minutes passed and published the Pending Publication articles and they all carry the timestamp at the time when I changed the post status say from Pending Review to Pending Publication.
Did you create a new post, record the time and then publish it later and got the current time instead of the “old” time?
Forum: Plugins
In reply to: [Edit Flow] [Plugin: Edit Flow] Custom statuses create timestamp problemHi Daniel,
I still got the timestamp affixed automatically when changing to any of the Edit Flow’s custom statuses even thought it shows “Publish Immediately” versus Published On:…; and that timestamp is recorded as published date when publishing. I ran several tests for the last couple hours and got the same results.
Forum: Plugins
In reply to: [Edit Flow] [Plugin: Edit Flow] Custom statuses create timestamp problemAlso, if you look at this code from the same file wp-admin/includes/meta-boxes:
<?php // translators: Publish box date formt, see http://php.net/date $datef = __( 'M j, Y @ G:i' ); if ( 0 != $post->ID ) { if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date $stamp = __('Scheduled for: <b>%1$s</b>'); } else if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published $stamp = __('Published on: <b>%1$s</b>'); } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified $stamp = __('Publish <b>immediately</b>'); } else if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified $stamp = __('Schedule for: <b>%1$s</b>'); } else { // draft, 1 or more saves, date specified $stamp = __('Publish on: <b>%1$s</b>'); } $date = date_i18n( $datef, strtotime( $post->post_date ) ); } else { // draft (no saves, and thus no date specified) $stamp = __('Publish <b>immediately</b>'); $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); }You see this particular comment: // draft, 1 or more saves, date specified at the top of these three lines:
} else { // draft, 1 or more saves, date specified $stamp = __('Publish on: <b>%1$s</b>'); } $date = date_i18n( $datef, strtotime( $post->post_date ) );I assume that as you switch from a WP Draft or Pending Review status to any of the Edit Flow’s custom ones, it automatically adds the timestamp based on this logic stated by the comment – but this is only my assumption.
So if it is the case, then can we remove that “multiple” save option within these three lines and thereby solve the issue?
Forum: Plugins
In reply to: [Edit Flow] [Plugin: Edit Flow] Custom statuses create timestamp problemHi Daniel,
I tested several times and here are my findings:
1. Switching between different statuses e.g. from Pending Review (which is WP default status) to Pending Publication now does not show “Published on:….” and instead just like how I think it should be which is “Publish Immediately” (since the post has not been published). This is a good thing!
However, after several hours have passed, I decided to publish a few “test” articles in Pending Publication status and found that those carried and displayed the timestamp at the time when I switched them from Pending Review to Pending Publication. I thought I made some mistakes but repeated tests conclusively showed the same result. So all I can say is that moving articles from a WP statuses like Draft or Pending Review to Pending Publication or any other custom statuses controlled by Edit Flow still automatically affixes a timestamp to the post – and when you pulbish the post it carries the old affixed timestamp not the current one.
2. So I thought maybe I just deal with WP statuses ONLY like changing current drafts from Draft to Pending Review, waited for a couple hours and then published them. The result in this case showed correctly the current timestamp at the time of publication; thus, based on my testing, I assume using the WP statuses won’t cause this issue.
3. Then I decided to do a bit research on the internet and found out that you can actually change the meta-box or UI of the statuses concerning the timestamp by messing around and changing this code in wp-admin/includes/meta-boxes.php:
From this:
} else { // draft, 1 or more saves, date specified $stamp = __('Publish on: <b>%1$s</b>'); } $date = date_i18n( $datef, strtotime( $post->post_date ) );To this:
} else { // draft, 1 or more saves, date specified $stamp = __('Publish <b>immediately</b>'); $date = date_i18n( $datef, strtotime( $post->post_date ) );and you would also get the “Publish Immediately” for every status. However, the problem still persists as soon as you switch from a WP status Draft or Pending Review to any of Edit Flow’s custom status the timestamp get affixed immediately and will be registered as the published timestamp at the time of publication.
So in a nutshell, even though the fix shows “Publish Immediately” but the timestamp still gets affixed to the post as soon as you change from Draft or Pending Review to any of the Edit Flow’s custom statuses.
Sorry for the long post but hopefully this helps you to understand and find a solution. Thanks so much for your time and patience.
David
Forum: Plugins
In reply to: [Edit Flow] [Plugin: Edit Flow] Custom statuses create timestamp problemHi,
This is still an issue; I am using wp 3.2.1 and Edit Flow 0.6.4. Please help! Thanks.
Hi Scott,
Have you found anything on this issue? Thank you.
Hi Scott,
Don’t mean not to give you a chance to look into this but here is what I did by modifying the exports-and-reports.php file directly:
$has_full_access = current_user_can(‘exports_reports_full_access’);
if (!$has_full_access && current_user_can(‘level_2’))
$has_full_access = true;I changed ‘administrator’ to ‘level_2’ to give menu access to editors and authors but now they can also have full access to groups, reports, etc; so this is where I am stuck. I suppose the role-based access configured via the admin panel should some how save customized setting automatically versus what I am doing here which is hard-coding.
Thank you, Scott. I think it has to do with the $has_full_access etc that I can change in the exports-and-reports.php file but that is a manual hard-coding one-time modification process.
Forum: Plugins
In reply to: [Edit Flow] [Plugin: Edit Flow] Cannot delete statusesThis is a great plugin but I also have the same issue with deleting the default statuses; will we have a fix soon?
Thank you.
Rougesmoke