Feature #184
Please respect date/order in blog. Updating a post schedules it.
| Status: | Assigned | Start: | 2009-11-26 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | % Done: | 0% |
||
| Category: | - | Spent time: | - | |
| Target version: | - |
Description
Hello:
I have the following issue. If I do :Blogit push on an old post I've
updated, it schedules it for two hours later.
This seems related to the now closed Feature 92.
However, I think firstly published post time shouldn't change, only get updated.
With the actual behaviour, wordpress takes it as an entirely new post, breaking
post's order.
Wordpress and vimpress don't modify the inital publishing time, only add a new
modification time.
Thanks, Omar
Associated revisions
Revision 27ea27a9acb1f09dcf65256551ab1dcd3329da40
Fixed time in blog posts.
Closes #184 (last part of that report)
It seems Wordpress has changed and sends us the time in the users local
time instead of utc. #92 asked for local time and now we have double
local time.
The Old Wordpress behaviour was preferable. The local time of the
current computer seems more reliable then my blog settings. E.g. when
traveling I don't really want to change the time setting of every web
page.
History
Updated by Adam Schmalhofer 8 months ago
- Assigned to set to Adam Schmalhofer
You should use ":Blogit commit" when you update posts. push is only for publishing. At the very least this needs to be documented clearer. As I can't think of any use of repushing a post, it might be better to simply make push a synonm for commit in this case. unpush followed by push would then be used for repushing (if needed).
To "it schedules it for two hours later.": Does this only happen with repushing (not original push; not unpush; not commit)? What is your timezone? What version are you using?
Updated by elric melnibone 8 months ago
Thanks for your interest, indeed I should have experimented/read a bit more.
As I can't think of any use of repushing a post,
i.e. I'm in a small localization project (vim-doc-es), and would just
like to repush a post (change date and make it more "visible") with new
versions but reusing the original.
At the very least this needs to be documented clearer.
Just a bit, though a better reading and some experimentation teaches you it's
use. However, my two cents.
:Blogit commit
Saves/Updates the article
:Blogit unpush
Unpublish post/Save post as draft
I'm using the latest blogit. user settings and hwclock display
the same and correct time. I live in Spain, GMT +1.
My installation was English as language, yet timezone, keyboard
etc on Spanish. Vim 7.2.284 on Debian testing.
The problem happens with repush and original push. Commit is right at updating.
Funnily enough, commit on a new post (I now it's not meant for that)
sets the date to 10 years in the past + 2 hours :)
All in all, very nice app. I don't see the need to change behaviour or anything
if unpush as draft and commit as update is mentioned in the doc.
If you ever feel to offer a translated help file to spanish (it doesn't really
happen with vim scripts, I think I've seen it only twice) just poke me and I'll be
glad to take the task.
Regards, Omar
P.s. Sorry if I've created empty reports you had to clean (I fought a bit with the
page). It seems they were removed automatically.
Updated by Adam Schmalhofer 8 months ago
- Status changed from New to Assigned
i.e. I'm in a small localization project (vim-doc-es), and would just like to repush a post (change date and make it more "visible") with new versions but reusing the original.
Keep in mind, that on wordpress.com and probably most wordpress setups this will destroy all links to your post (as the URL contains the date).
it schedules it for two hours later.
GMT +1.
Strange. We are in the same timezone, but for me it is only one hour in the future (never noticed this before).
Funnily enough, commit on a new post (I now it's not meant for that) sets the date to 10 years in the past + 2 hours :)
I think this isn't (current - 10 years + 2 hours) but constant Di 30 Nov 1999 12:00:00 UTC (in your tz). I consider this a (minor) bug.
If you ever feel to offer a translated help file to spanish (…) just poke me and I'll be glad to take the task.
Sounds great. What do I need to do to offer internationalization of the vim help file? I couldn't find anything on this topic. Do you have a good pointer?
P.s. Sorry if I've created empty reports you had to clean (I fought a bit with the page). It seems they were removed automatically.
No problem. I don't charge for the two clicks to remove it ;-).
Updated by elric melnibone 8 months ago
Keep in mind, that on wordpress.com and probably most wordpress setups this will destroy all links to your post (as the URL contains the date).
True. I later thought I could just use the stick/unstick post feature.
Giving more thought to the matter makes it appear as if, basically, I misinterpreted
the guide. I do think it could be a 2% clearer as well, (I may be a 2% more stupid than
others :)
Take into account I'm a USER (no programmer, just curious/tech oriented USER),
that likes and uses Vim for anything but programming. The bug in commit (sending post as new)
is of no importance to me, as it is basically a misuse of the extension.
It's just the scheduling post thing that I find a minor nuissance.
What do I need to do to offer internationalization of the vim help file?
Localized help files are detected through the country code set in the extension, i.e.
blogit.txt
blogit.esx (spanish)
blogit.frx (french), and so on
Besides that, the top vim tag in the file needs to be set accordingly. That's about it IIRC
(also since it's not a part of the user manual, where files are more linked to each other).
Vim searches help files based on the .vimrc(1) and locale(2) system settings by default.
":h help-translated" explains in more detail. I don't know how it could be done to avoid having
more than one translated copy.
The translation can be done with a txt 2 po (gnu gettext format) converter. Translate toolkit
should do it in this project just fine, and edition can be done with Vim or any spexialized
por editor.
My mail address is ocampagne#gmail.com. I will send the translation when I get the time (perhaps next
weekend).
Regards, Omar
Updated by Adam Schmalhofer 8 months ago
Giving more thought to the matter makes it appear as if, basically, I misinterpreted the guide. I do think it could be a 2% clearer as well, (…). Take into account I'm a USER
I agree that it should be written as clear as possible and for non-programmers. When things aren't that way it is because I am not aware of it and/or I am not that good at writing the documentation. I find it especially difficult to write documentation for something I have been working on for a while and internalized how to use it.
I'd be glad to take any changes you have to make it clearer. If you have time to improve the help file and mail it to me (be brave with your changes) it would be great.
The bug in commit (sending post as new) is of no importance to me, as it is basically a misuse of the extension.
Well, I fixed it anyway (b4bc227). It acutally used to behave as you expected it (isn't a misuse) and got lost while restructuring the code. Repushing a post doesn't change the date anymore either.
The translation can be done with a txt 2 po (gnu gettext format) converter.
Having the translation in a .po file is good. I like beeing able to tell how current the translation is. I added gettext to the help command of Blogit (:Blogit help), too (7a1a084b6).
:Blogit commit
Saves/Updates the article
:Blogit unpush
Unpublish post/Save post as draft
I don't like the use of a slash. It interrupts the reading flow. I would suggest:
:Blogit commit
save article
:Blogit unpush
unpublish article (save as draft)
Do you think this is good?
Updated by elric melnibone 8 months ago
I find it especially difficult to write documentation for something I have been working on for a while and internalized how to use it.
Pretty understandable :) If you have time to improve the help file and mail it to me (be brave with your changes) it would be great.
I will do so. On a first overview it seems to need few real modifications, and just a couple of "cosmetic" changes.
Well, I fixed it anyway (b4bc227). It acutally used to behave as you expected it (isn't a misuse) and got lost while restructuring the code. Repushing a post doesn't change the date anymore either.
Great!
(7a1a084b6).
I don't see the changes in the web interface of the repository. Is development elsewhere, or just unpushed?
I don't like the use of a slash. It interrupts the reading flow. I would suggest:
True.
:Blogit commit save article
:Blogit unpush unpublish article (save as draft)
Perfect.
I will send a blogit.txt soon
Updated by Adam Schmalhofer 8 months ago
I don't see the changes in the web interface of the repository. Is development elsewhere, or just unpushed?
It's in my repository: http://git.symlink.me/?p=adam/blogit.git;a=summary
Eventually the project repository gets synced (I think Romain does that manually).
Updated by elric melnibone 8 months ago
- File blogit.txt added
I used the latest blogit in the repo (without the misused tag in the file).
Besides the clarification, everything else is fine. I did change some verbs
for textual coherence, and corrected a typo. If you diff it, you'll see it
ain't much.
":Blogit page" description had a "haves" that I think it might mean "behaves".
Correct me if not.
I also changed "runtimepath" for $VIMRUNTIME, as it appears in such manner in
other help files.
Updated by Adam Schmalhofer 8 months ago
I included all your changes (5197390195f). I really like your changes. If you have more ideas just go ahead.
(without the misused tag in the file).
I don't understand what you mean.
While including the changes I noticed (which you left unchanged):
:Blogit preview
Preview current post locally.
I think "Preview article in browser." would be clearer and more consistent. What do you think? Do you have a different suggestion?
Updated by elric melnibone 8 months ago
If you have more ideas just go ahead.
On second reading I didn't find much. Perhaps commit could be made more clear in
the sense that it does the same as push if you want to.
:Blogit commit
Publish or update an article to the blog.
(without the misused tag in the file).
I don't understand what you mean.
Actual blogit 1.4.2 tar.bzz has a duplicate tag in the help file.
I can't find the reference, but I informed Romain when 1.4.2 came out,
and he fixed accordingly (but not in the tarball).While including the changes I noticed (which you left unchanged):
:Blogit preview Preview current post locally.
I think "Preview article in browser." would be clearer and more consistent. What do you think? Do you have a different suggestion?
Absolutely. I thought about it, but didn't make the changes. I actually think it's the right choice.
I just tried your git version, and it works fine. Commit does not update the date, but
displays one hour less than what's shown in the web interface. For some reason, my schedule
problem is only one hour wrong now.
I might open a feature i18n request, so issues can be separated. If you need a hand with po4a, I can give it to you. I use po4a, and I am the actual translation maintainer. In case you've used it before, all the better.
I just don't know how to use gettext in the code (mark translatable strings), but I can help automatizing the
workflow. You could just have the po, and run po4a po4a.cfg for all (generating pot and po's, updating, and
generating the documentation).
Updated by elric melnibone 8 months ago
Sorry.
And push works perfect too :)
How much of an overlap exists now between push and commit?
It seems I can publish and update a post with both commands
now.
Updated by Adam Schmalhofer 8 months ago
How much of an overlap exists now between push and commit? It seems I can publish and update a post with both commands now.
That's a bug. I couldn't reproduce it. I did ":Blogit new", filled subject and body and ":Blogit commit" and it was saved as draft. commit should always keep the status. File this as a separat report with an instruction how to reproduce it.
I thought about it, but didn't make the changes. I actually think it's the right choice.
When in doubt, you can make the change or comment.
I might open a feature i18n request, so issues can be separated.
Sure.
If you need a hand with po4a, I can give it to you. I use po4a, and I am the actual translation maintainer.
Would you like to do this yourself? You are obviously the expert and know a lot more than I do. I can ask Romain to create a git repository for you, if you want. Just give me your public ssh key. Until then (or instead) you can use git format-patch and git send-email. It is easier than uploading files to the bug tracker.
I just don't know how to use gettext in the code (mark translatable strings),
The command help is marked. They can currently be extracted via intltool-update --pot (I guess po4a will take over that, too?). Marking the mail-like headers might need a few changes in the program (as they are read back from the buffer). I will work on that. I also need to make the translations actually get used.
but I can help automatizing the workflow. You could just have the po, and run po4a po4a.cfg for all (generating pot and po's, updating, and generating the documentation).
Sounds great.
Updated by elric melnibone 8 months ago
That's a bug. I couldn't reproduce it. I did ":Blogit new", filled subject and body and ":Blogit commit" and it was saved as draft. commit should always keep the status. File this as a separat report with an instruction how to reproduce it.
My mistake. Got confused with draft, scheduled, and the one hour later publishing.I might open a feature i18n request, so issues can be separated.
Sure.
Good. On this side of things, only the one hour delay is left, although I have
to admit I grew accostumed to it :)
Updated by mo chen 8 months ago
I am facing the scheduled problem , too ...
As I :Blogit push one , the Date seems to be 8 hours later , like this .
1 From: mofering
2 Id: 51
3 Subject: hope
4 Status: publish – 0 Comments
5 Categories:
6 Tags:
7 Date: Sat 12 Dec 2009 09:22:28 AM CST
8
9 Hope so!!!
Actually , the time is Sat 12 Dec 2009 01:22:28 AM CST .
And on the website , the blog is scheduled to be published 8 hours later .
I am a student from China , the time zone is UTC+8 ...
I try to modify the source code myself , but I found it is written in Python which I know nothing ...
I am so frustrated , I spent my whole day trying to work out it , but failed in vain ...
Hope the bug will be fixed soon !
I love blogit , and wish you everything goes well !
Updated by Adam Schmalhofer 8 months ago
It should be fixed now in commit:c264c81a2a . http://git.symlink.me/?p=adam/blogit.git;a=blob_plain;f=plugin/blogit.vim;hb=HEAD
It seems Wordpress has changed and sends us the time in the users local
time instead of utc. #92 asked for local time and now we have double
local time.
The Old Wordpress behaviour was preferable. The local time of the
current computer seems more reliable then my blog settings. E.g. when
traveling I don't really want to change the time setting of every web
page.
Oh well.
Updated by mo chen 8 months ago
Adam Schmalhofer wrote:
It should be fixed now in commit:c264c81a2a . http://git.symlink.me/?p=adam/blogit.git;a=blob_plain;f=plugin/blogit.vim;hb=HEAD
It seems Wordpress has changed and sends us the time in the users local time instead of utc. #92 asked for local time and now we have double local time.
The Old Wordpress behaviour was preferable. The local time of the current computer seems more reliable then my blog settings. E.g. when traveling I don't really want to change the time setting of every web page.
Oh well.
I have just tried it , but it seems not work at all , the web page still reminds me the blog is scheduled 8 hours later ...
Oh , sigh :(
I have spent the whole day on it .
Now in China it's already 3:30 am , I have to go to bed , it's too late .
Good night to myself and best wishes to you !
Updated by mo chen 8 months ago
You are AWESOME !
The problem has gone , you are so so great ~~http://symlink.me/repositories/revision/blogit/27ea27a9acb1f09dcf65256551ab1dcd3329da40
I love Blogit and thank you very very much ^-^
Updated by mo chen 8 months ago
I am sorry to bother you again , there is a bad news .
It is quite odd that Blogit worked well yesterday afternoon , but went wrong since last night .
I don't know why , the blog is still scheduled to be posted 8 hours later .
I download the last version of Blogit again , and the problem still remain .
Yesterday I just updated my Ubuntu 9.10 , I'm not sure , is this the reason ?
Updated by Adam Schmalhofer 8 months ago
You are not bothering at all. It is nice that you are taking the time to report
the problem. It is extremely unlikely the update of Ubuntu is the problem.
Did you update blogit in between it working and not anymore? If so, please try
the old (fixed) version, again. I had made a change in that time interval that
could have caused the problem.
The other reason could be that manual testing especially when comparing
different times is easy to mix things up. Well, at least I have had that
problem.
I would like to divide this problem into different tests:
1. Read an already posted post in blogit and compare the time with what is
displayed on the wordpress page (":Blogit edit <id>").
2. Unpush an already posted post (":Blogit edit <id>" ":Blogit unpush") and
verify that the time is current on both wordpress and in blogit
For me they both work. Do they work for you? Please also tell me the commit id
you are using.
Updated by elric melnibone 7 months ago
Hello Adam:
I tried the very last code from git, and this is the result.
1. Blogit new -> Blogit push: wordpress time = blogit time +1
Curious enough, if i restart Vim and blogit ls, I still get the
same time in blogit as before (my real time) and the "publish" status
if I blogit edit.
2.Following the instructions in your last comment in this "thread"
1. Blogitedit: wordpress time = blogit +1 or +2 (the latter may be
caused because wordpress wasn't set to my time for a while, but
I never used blogit then, so only +1)
2. unpush + push behaves equal to blogit push on a new post.
wordpress time = blogit +1
I don't really understand the commit id question. 111, 324, and so,
sometimes I just hit Intro on the post I want to edit.
I see MANY other files in blogit's git. Is there any way I can offer
a richier output?
Updated by Smith Dhumbumroong 6 months ago
Hi,
I've just install blogit.vim version 1.4.3 and it seems that this issue is still present (i.e., all posts pushed by blogit.vim are all scheduled to publish 6-7 hours later).
Is there anything I can do to help you guys debug this bug? Blogit.vim is a very nice piece of software and I'd really like to help you perfected it.
Updated by Smith Dhumbumroong 6 months ago
I think I've just found something.
When I create a new post and save it with :Blogit commit command, on my blog the post is listed as created -7 hours ago which I guess is server time (I'm live in Thailand, which is UTC +7).
But after I run :Blogit push command to the post, the post date get change to +7 hours, thereby casuing WordPress to schedule it instead of publish it.
Hope this will be of use to you.
Updated by Adam Schmalhofer 6 months ago
Hi Smith,
Sorry, for the slow response. Previously I wasn't able to reproduce this bug. Now I can. Not just that, I new occurs on every version of blogit.vim. This makes me assume this bug is due to changes in wordpresses api. Anyhow that really doesn't matter. Being able to reproduce this bug should be more than half of fixing it. That being said, due to exams I don't have much time currently. I expect to have this bug solved at the beginning of next month (March). Sorry, for the annoyance and thanks for reporting.
--Adam