toto icon indicating copy to clipboard operation
toto copied to clipboard

Local host works fine, @heroku, all articles (and their links) are todays date

Open structuralartistry opened this issue 14 years ago • 8 comments

I have a pretty stock instance of Toto. Locally I run it on thin and everything works. When I push it to heroku, the index loads but on every article, instead of showing the date in the article file, it shows today's date. This wrong date shows visually on the page and also in the links. So the links are all wrong and end in 404 errors. If I modify the link to the correct date of the article (in the article file), the article loads. Hoping someone has seen this problem...guessing I must be doing something wrong as I don't see reports of similar problems.

My blog: http://blog.structuralartistry.com/ This is the link that is on the first article. Follow it and you will have a 404: http://blog.structuralartistry.com/2010/11/09/using-wkhtmltopdf-with-ruby-and-rails/

This is the header of the article file for this article: title: Using wkhtmltopdf with Ruby and Rails date: 2010-09-20 description: Pdf generation with wkhtmltopdf on Rails

If you fix the link to the right date you will get the article: http://blog.structuralartistry.com/2010/09/20/using-wkhtmltopdf-with-ruby-and-rails/

This is the date setting in my config.ru (stock): set :date, lambda {|now| now.strftime("%B #{now.day.ordinal} %Y") }

structuralartistry avatar Nov 09 '10 16:11 structuralartistry

I'm getting the same problem. It wasn't this way until I published a new article. This is really bad as I'm getting a ton of traffic to the site. How do I fix this?!

dfischer avatar Nov 20 '10 10:11 dfischer

I have not had the time to figure out... short of start digging through the source I have not been able to find a solution. Do let me know if you find the answer. Not that it is much solace but you have probably noticed that if you change the date in your link you can still get to your article....

structuralartistry avatar Nov 27 '10 23:11 structuralartistry

I was having the same issue here, and found a simple solution.

First of all, it accours due default error-safe routine for date parsing errors from .txt file: https://github.com/cloudhead/toto/blob/master/lib/toto.rb#L242

Some parsing problems could appear when you not use quotes for date or title fields.

Instead of using: title: My post: colons can crash them! date: 2011-05-02

Just quote your params: title: 'My post: colons can crash them!' date: '2011-05-02'

endel avatar May 19 '11 02:05 endel

You are using wrong format of the date in posts, it should be, e.g. 02/05/2011 Please if somebody still have this problem - comment here. Otherwise, I don't see anything that will stop cloudhead from closing this issue, as original author of issue is not using toto anymore, and I believe the error was because of the date format.

ixti avatar Aug 08 '11 02:08 ixti

Oh, he stopped using Toto? Aww. Why? What's better?

dfischer avatar Aug 10 '11 22:08 dfischer

He switched to Tumblr. I guess there's no such thing as "objective better". Everybody choose for himself. I was using WordPress for more than 5 years. I can change anything there, but, everytime I was really upset when I wanted to post something - open browser, go to the wp-admin, log-in, figure out that for last week there were three security updates, and 8 updates for plugins, update, forgot the initial reason why I have opened it up, remember, press new post, hate use semi-html... And even more upset when I wanted to take a look on one of old posts (I use blog as a notebook with public access)... So for me toto is the best - it has even structure of directories and files that seems best for me ;))

ixti avatar Aug 10 '11 22:08 ixti

Yeah... I went there as did not have the time to figure out what was going on and had other more pressing commitments and wanted to keep my blog alive. Not that I would not come back when I have the spare time... I thought... and think Toto is very cool and love the simplicity, so please keep up the work!

structuralartistry avatar Aug 11 '11 00:08 structuralartistry

Yeah, the only thing I would think about using these days is Tumblr... maybe have to switch to that but then I'd have to deal with the pain of migrating my posts all over again and dunno if I want to do that. Lizzame!

On Wed, Aug 10, 2011 at 5:29 PM, structuralartistry < [email protected]>wrote:

Yeah... I went there as did not have the time to figure out what was going on and had other more pressing commitments and wanted to keep my blog alive. Not that I would not come back when I have the spare time... I thought... and think Toto is very cool and love the simplicity, so please keep up the work!

Reply to this email directly or view it on GitHub: https://github.com/cloudhead/toto/issues/62#issuecomment-1778096

dfischer avatar Aug 11 '11 01:08 dfischer