<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HCoder.org &#187; typo</title>
	<atom:link href="http://hcoder.org/tag/typo/feed/" rel="self" type="application/rss+xml" />
	<link>http://hcoder.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 15 Apr 2012 21:43:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Another Typo upgrade</title>
		<link>http://hcoder.org/2009/02/23/another-typo-upgrade/</link>
		<comments>http://hcoder.org/2009/02/23/another-typo-upgrade/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 19:06:00 +0000</pubDate>
		<dc:creator>emanchado</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Meta]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[5.2]]></category>
		<category><![CDATA[issues]]></category>
		<category><![CDATA[rubygems]]></category>
		<category><![CDATA[typo]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I just upgraded the blog to Typo 5.2. I had a couple of issues, but things worked reasonably ok. Just in case this helps anyone, these are the issues I ran into: I had to install a ridiculous amount of dependencies, sometimes to go from version 1.1.1 to 1.1.3 of some module. I really wonder [...]]]></description>
			<content:encoded><![CDATA[<p>I just upgraded the blog to Typo 5.2. I had a couple of issues, but things worked reasonably ok. Just in case this helps anyone, these are the issues I ran into:</p>
<ul>
<li>I had to install a <strong>ridiculous</strong> amount of dependencies, sometimes to go from version 1.1.1 to 1.1.3 of some module. I really wonder if Typo 5.2 really needs those versions.</li>
<li>When trying to upgrade, it seemed to hang in this line: <code>Backing up to /var/www/virtual/hcoder.org/db/backup/backup-20090223-1843.yml</code>. It turns out, it didn&#8217;t really hang, it just takes a good while (and yeah, the file stays at 0 bytes for a long time too)</li>
<li>I had some permission issues that I had to fix (when upgrading, it tried to modify/copy some files, and it couldn&#8217;t)</li>
<li>When applying the migrations, it died with a really strange error message. It turns out, my version of Rubygems was too old ????</li>
</ul>
<p>While writing this first post, I see some improvements in the admin interface, although I still can&#8217;t see any kind of &#8220;preview&#8221;. I hope it helps me with my struggle with spam, at least :-/</p>
 <p><a href="http://hcoder.org/?flattrss_redirect&amp;id=58&amp;md5=817baa09ce76cc88fae3730ab49d2e01" title="Flattr" target="_blank"><img src="http://hcoder.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://hcoder.org/2009/02/23/another-typo-upgrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=30124&amp;popout=1&amp;url=http%3A%2F%2Fhcoder.org%2F2009%2F02%2F23%2Fanother-typo-upgrade%2F&amp;language=en_GB&amp;category=text&amp;title=Another+Typo+upgrade&amp;description=I+just+upgraded+the+blog+to+Typo+5.2.+I+had+a+couple+of+issues%2C+but+things+worked+reasonably+ok.+Just+in+case+this+helps+anyone%2C+these+are+the+issues+I...&amp;tags=5.2%2Cissues%2Crubygems%2Ctypo%2Cupgrade%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Problems with comments</title>
		<link>http://hcoder.org/2008/11/26/problems-with-comments/</link>
		<comments>http://hcoder.org/2008/11/26/problems-with-comments/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 18:30:00 +0000</pubDate>
		<dc:creator>emanchado</dc:creator>
				<category><![CDATA[Meta]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[typo]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Today, my good friend &#8220;Esberrito&#8221; warned me that comments were not working in the blog. I hadn&#8217;t realised earlier, but I had them enabled so they should have appeared all the time. I investigated a bit, and it turns out that there&#8217;s some bug (apparently related to saving a post as draft, then publishing) that [...]]]></description>
			<content:encoded><![CDATA[<p>Today, my good friend &#8220;Esberrito&#8221; warned me that comments were not working in the blog. I hadn&#8217;t realised earlier, but I had them enabled so they should have appeared all the time.</p>
<p>I investigated a bit, and it turns out that there&#8217;s some bug (apparently related to saving a post as draft, then publishing) that makes the post have an empty &#8220;permalink&#8221;. When this happens, the link to the blog post looks exactly like the view of the posts for that particular day (say, http://hcoder.org/2008/11/23/ instead of http://hcoder.org/2008/11/23/why-i-hate-rubygems), so Typo decides that it shouldn&#8217;t show the comment form.</p>
<p>The bad news is that many posts are fucked now (although I have fixed some of the most recent ones). The good news is that it&#8217;s more or less easy to fix. You just have to connect to a &#8220;Rails terminal&#8221; with the production configuration (with <code>./script/console production</code>) and do something like this for each post you want to fix:</p>
<p>&gt;&gt; a = Article.find(:first, :conditions =&gt; [&#8220;title <span class="caps">LIKE</span> ?&#8221;, &#8220;<span class="caps">GPG</span>%&#8221;])<br />
=&gt; #&lt;Article id: 41, type: &#8220;Article&#8221;, yadda, yadda, yadda, &#8230;&gt;<br />
&gt;&gt; a.title<br />
=&gt; &#8220;<span class="caps">GPG</span> confusion&#8221;<br />
&gt;&gt; a.permalink = a.stripped_title<br />
=&gt; &#8220;gpg-confusion&#8221;<br />
&gt;&gt; a.save<br />
=&gt; true</p>
<p>Lesson learned: don&#8217;t save as draft for now (maybe I should upgrade to 5.1.3, it seems fixed there). Instead, untick the &#8220;Online&#8221; under &#8220;Post settings&#8221;, and hit &#8220;Publish&#8221;. That will assign a default, sane permalink value.</p>
 <p><a href="http://hcoder.org/?flattrss_redirect&amp;id=50&amp;md5=50c89ef561373561975e9be6466b3c4b" title="Flattr" target="_blank"><img src="http://hcoder.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://hcoder.org/2008/11/26/problems-with-comments/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=30124&amp;popout=1&amp;url=http%3A%2F%2Fhcoder.org%2F2008%2F11%2F26%2Fproblems-with-comments%2F&amp;language=en_GB&amp;category=text&amp;title=Problems+with+comments&amp;description=Today%2C+my+good+friend+%26%238220%3BEsberrito%26%238221%3B+warned+me+that+comments+were+not+working+in+the+blog.+I+hadn%26%238217%3Bt+realised+earlier%2C+but+I+had+them+enabled+so+they+should+have+appeared+all...&amp;tags=bug%2Ccomments%2Cproblem%2Ctypo%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Sucky Typo update</title>
		<link>http://hcoder.org/2008/08/19/sucky-typo-update/</link>
		<comments>http://hcoder.org/2008/08/19/sucky-typo-update/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 21:19:00 +0000</pubDate>
		<dc:creator>emanchado</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Meta]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rants]]></category>
		<category><![CDATA[typo]]></category>
		<category><![CDATA[upgrading]]></category>
		<category><![CDATA[woes]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[The other day I was talking about upgrading Typo. The update itself went well, true, and the site was up and running without too much downtime, but then I started using it again&#8230; and I have noticed two things so far (both about writing posts) that I really dislike: First, the good old editor is [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I was talking about <a href="http://hcoder.org/2008/08/07/">upgrading Typo</a>. The update itself went well, true, and the site was up and running without <em>too much</em> downtime, but then I started using it again&#8230; and I have noticed two things so far (both about writing posts) that I really dislike:</p>
<p>First, the good old editor is not there anymore: the Typo editor used to be really good, because on the left hand side you had a very reliable and easy to use textarea with Wiki syntax (you can choose which exact syntax you want), and on the right hand side you had a &#8220;live preview&#8221; of your post, automatically updated with Ajax, that showed you how the post was going to look like. Well, that&#8217;s <strong>gone</strong>. Now there are two options: some retarded <span class="caps">WYSIWYG</span> box, that I tried to use and failed, and some good old textarea&#8230; <em>without the damn live preview</em>. That <strong>sucks</strong> big time, because there is <em>no other preview</em> (that I have seen: <strong>please</strong> enlighten me if there is indeed one), so I just blindly write things in a Wiki format, and <strong>hope</strong> that it&#8217;s going to look OK when I press &#8220;Publish&#8221;.</p>
<p>Second, I was playing with the Wiki format for the articles, and I changed it to &#8220;Markdown&#8221; (I always mix &#8220;Textile&#8221; with &#8220;Markdown&#8221;, and never remember which is which; the one I prefer is Textile). After I hit &#8220;Save&#8221;, not only the next article was parsed in Markdown format by default, but <strong>every single blog post</strong>. It&#8217;s like, you select the parser the system is going to use to interpret your whole blog. How retarded is that? Once you have written posts, it doesn&#8217;t make sense to change their syntax (unless you do it manually editing the post itself). <strong>Clearly</strong> the format is a property of each blog post, not of the whole blog installation.</p>
<p>Not everything is bad though: it seems that now you finally have a &#8220;Draft&#8221; concept, so I can start writing a blog post and just save as a draft, instead of unticking the &#8220;Online&#8221; property and saving as a normal post. Also, the drafts are saved <em>automatically</em>, so I don&#8217;t have to remember to hit &#8220;Save&#8221; from time to time just in case the browser crashes or I hit something stupid and erase the contents of the post. Yay for that.</p>
 <p><a href="http://hcoder.org/?flattrss_redirect&amp;id=38&amp;md5=b284396e75d48636ba7cd3f7a7ec5828" title="Flattr" target="_blank"><img src="http://hcoder.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://hcoder.org/2008/08/19/sucky-typo-update/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=30124&amp;popout=1&amp;url=http%3A%2F%2Fhcoder.org%2F2008%2F08%2F19%2Fsucky-typo-update%2F&amp;language=en_GB&amp;category=text&amp;title=Sucky+Typo+update&amp;description=The+other+day+I+was+talking+about+upgrading+Typo.+The+update+itself+went+well%2C+true%2C+and+the+site+was+up+and+running+without+too+much+downtime%2C+but+then+I+started...&amp;tags=design%2Cprogramming%2Crants%2Ctypo%2Cupgrading%2Cwoes%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Typo upgrade</title>
		<link>http://hcoder.org/2008/08/07/typo-upgrade/</link>
		<comments>http://hcoder.org/2008/08/07/typo-upgrade/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 21:05:00 +0000</pubDate>
		<dc:creator>emanchado</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Meta]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[problems]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[typo]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hey there! I have just upgraded Typo. It was slightly traumatic, because at first the blog broke horribly and I couldn&#8217;t see anything other than errors 500. To be fair, the change was quite big, because it included also an upgrade to Rails 2 (I was using some older Typo that used Rails 1.2.x), so [...]]]></description>
			<content:encoded><![CDATA[<p>Hey there!</p>
<p>I have just upgraded Typo. It was slightly traumatic, because at first the blog broke horribly and I couldn&#8217;t see anything other than errors 500. To be fair, the change was quite big, because it included also an upgrade to Rails 2 (I was using some older Typo that used Rails 1.2.x), so everything worked better than expected.</p>
<p>I could login as admin, and change preferences and whatnot, and the only thing that was broken was the public view of the blog. I had a look at the logs, and it complained about not being able to find some template for the sidebars. I was very confused, and didn&#8217;t know where to starting looking for this. So, obviously, I asked &#8220;Señor Google&#8221;. He didn&#8217;t tell me that much, but someone left me the following hint: if you comment out the call to the helper `render_sidebars` (in the active theme code) solved the problem&#8230;. at the price of not having sidebars of course.</p>
<p>So I decided to connect a Ruby/Rails console to the production database, and have a look at the Sidebar model. The summary of what I did is this:</p>
<p>&gt;&gt; Sidebar.find(:all, :order =&gt; &#8216;active_position <span class="caps">ASC</span>&#8217;).<br />
map {|s| s.active_position}<br />
=&gt; [0, 0, 1, 1, 2, 2, 3, 4]<br />
&gt;&gt; Sidebar.find(:all, :order =&gt; &#8216;active_position <span class="caps">ASC</span>&#8217;).<br />
map {|s| s.type}<br />
=&gt; [nil, &#8220;CategorySidebar&#8221;, nil, &#8220;ArchivesSidebar&#8221;, nil,<br />
&#8220;TagSidebar&#8221;, &#8220;StaticSidebar&#8221;, &#8220;XmlSidebar&#8221;]<br />
&gt;&gt; Sidebar.find(:all, :order =&gt; &#8216;active_position <span class="caps">ASC</span>&#8217;).<br />
find_all {|s| s.type.nil?}.size<br />
=&gt; 3<br />
&gt;&gt; Sidebar.find(:all, :order =&gt; &#8216;active_position <span class="caps">ASC</span>&#8217;).<br />
find_all {|s| s.type.nil?}.each {|s| s.destroy}<br />
=&gt; [#&lt;Sidebar id: 1, active_position: 0, config: {&quot;empty&quot;=&gt;false, &#8220;count&#8221;=&gt;true}, staged_position: nil, type: nil&gt;,<br />
#&lt;Sidebar id: 2, active_position: 1, config: {&quot;title&quot;=&gt;&quot;Links&quot;, &#8220;body&#8221;=&gt;&quot;&#8230;&quot;}, staged_position: nil, type: nil&gt;,<br />
#&lt;Sidebar id: 3, active_position: 2, config: {&quot;format&quot;=&gt;&quot;rss20&quot;, &#8220;trackbacks&#8221;=&gt;true, &#8220;comments&#8221;=&gt;true, &#8220;articles&#8221;=&gt;true}, staged_position: nil, type: nil&gt;]<br />
&gt;&gt; Sidebar.find(:all, :order =&gt; &#8216;active_position <span class="caps">ASC</span>&#8217;).find_all {|s| s.type.nil?}.size<br />
=&gt; 0</p>
<p>So, the problem is that there were some (severely broken) leftovers of the upgrade. I just removed them, and everything started working again. Phew!</p>
 <p><a href="http://hcoder.org/?flattrss_redirect&amp;id=35&amp;md5=8273c1f4c688163cc8faace0e614b85c" title="Flattr" target="_blank"><img src="http://hcoder.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://hcoder.org/2008/08/07/typo-upgrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=30124&amp;popout=1&amp;url=http%3A%2F%2Fhcoder.org%2F2008%2F08%2F07%2Ftypo-upgrade%2F&amp;language=en_GB&amp;category=text&amp;title=Typo+upgrade&amp;description=Hey+there%21+I+have+just+upgraded+Typo.+It+was+slightly+traumatic%2C+because+at+first+the+blog+broke+horribly+and+I+couldn%26%238217%3Bt+see+anything+other+than+errors+500.+To+be+fair%2C...&amp;tags=problems%2Crails%2CRuby%2Csolution%2Ctypo%2Cupgrade%2Cblog" type="text/html" />
	</item>
	</channel>
</rss>

