From paul at luon.net Sun Sep 3 12:01:49 2006
From: paul at luon.net (Paul van Tilburg)
Date: Sun, 3 Sep 2006 18:01:49 +0200
Subject: Patch problems
Message-ID: <20060903160149.GB7376@power.luon.net>
Hey all,
I was trying out a current Subversion snapshot of Hobix, especially the
patch stuff, but I encountered a problem... hobix bailed out halfway the
patching. I haven't looked into this part of Hobix yet, maybe someone
here knows rightaway what the problem is?
I ran: hobix patch journal apache2-all
Output:
---
% hobix patch journal apache2-all
*** Applying patch #1 for /home/paul/.hobix/journal/htdocs/.htaccess (file-ensure).
*** Applying patch #1 for /home/paul/.hobix/journal/lib/local.rb (file-create).
*** Applying patch #1 for /home/paul/.hobix/journal/htdocs/js/prototype.js (file-create).
*** Applying patch #1 for /home/paul/.hobix/journal/skel/sidebar.html.quick (file-create).
*** Applying patch #1 for /home/paul/.hobix/journal/htdocs/control/.htaccess (file-ensure).
*** Applying patch #1 for /home/paul/.hobix/journal/hobix.yaml (yaml-merge).
*** Applying patch #2 for /home/paul/.hobix/journal/hobix.yaml (yaml-merge).
*** Applying patch #1 for /home/paul/.hobix/journal/htdocs/control/hobix.cgi (file-create).
/usr/local/lib/site_ruby/1.8/hobix/base.rb:420:in `[]': Symbol as array index (TypeError)
from /usr/local/lib/site_ruby/1.8/hobix/base.rb:420:in `text_processor_fields'
from /usr/local/lib/site_ruby/1.8/hobix/base.rb:419:in `text_processor_fields'
from /usr/local/lib/site_ruby/1.8/hobix/base.rb:394:in `to_yaml'
from /usr/lib/ruby/1.8/yaml/rubytypes.rb:18:in `to_yaml'
from /usr/lib/ruby/1.8/yaml/rubytypes.rb:17:in `to_yaml'
from /usr/lib/ruby/1.8/yaml/rubytypes.rb:16:in `to_yaml'
from /usr/lib/ruby/1.8/yaml.rb:387:in `quick_emit'
from /usr/lib/ruby/1.8/yaml/rubytypes.rb:15:in `to_yaml'
from /usr/local/lib/site_ruby/1.8/hobix/util/patcher.rb:81:in `apply'
from /usr/local/lib/site_ruby/1.8/hobix/util/patcher.rb:62:in `apply'
from /usr/local/lib/site_ruby/1.8/hobix/commandline.rb:311:in `patch_action'
from /usr/bin/hobix:79
---
Thanks in advance,
Paul
--
Student @ Eindhoven | email: paul at luon.net
University of Technology, The Netherlands | JID: paul at luon.net
>>> Using the Power of Debian GNU/Linux <<< | GnuPG key ID: 0x50064181
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20060903/aa4273c1/attachment.bin
From paul at luon.net Sun Sep 3 12:27:25 2006
From: paul at luon.net (Paul van Tilburg)
Date: Sun, 3 Sep 2006 18:27:25 +0200
Subject: Patch problems
In-Reply-To: <20060903160149.GB7376@power.luon.net>
References: <20060903160149.GB7376@power.luon.net>
Message-ID: <20060903162725.GC7376@power.luon.net>
On Sun, Sep 03, 2006 at 06:01:49PM +0200, Paul van Tilburg wrote:
> I was trying out a current Subversion snapshot of Hobix, especially the
> patch stuff, but I encountered a problem... hobix bailed out halfway the
> patching. I haven't looked into this part of Hobix yet, maybe someone
> here knows rightaway what the problem is?
>
> I ran: hobix patch journal apache2-all
Hmm, same problems with hobix edit journal too... can't do much now really
Paul
--
Student @ Eindhoven | email: paul at luon.net
University of Technology, The Netherlands | JID: paul at luon.net
>>> Using the Power of Debian GNU/Linux <<< | GnuPG key ID: 0x50064181
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20060903/0876c1eb/attachment.bin
From paul at luon.net Sun Sep 3 14:13:05 2006
From: paul at luon.net (Paul van Tilburg)
Date: Sun, 3 Sep 2006 20:13:05 +0200
Subject: Patch problems
In-Reply-To: <20060903162725.GC7376@power.luon.net>
References: <20060903160149.GB7376@power.luon.net>
<20060903162725.GC7376@power.luon.net>
Message-ID: <20060903181305.GD7376@power.luon.net>
Hello,
Heh, replying to myself again, but this time I solved it.
On Sun, Sep 03, 2006 at 06:27:25PM +0200, Paul van Tilburg wrote:
> On Sun, Sep 03, 2006 at 06:01:49PM +0200, Paul van Tilburg wrote:
> > I was trying out a current Subversion snapshot of Hobix, especially the
> > patch stuff, but I encountered a problem... hobix bailed out halfway the
> > patching. I haven't looked into this part of Hobix yet, maybe someone
> > here knows rightaway what the problem is?
> >
> > I ran: hobix patch journal apache2-all
>
> Hmm, same problems with hobix edit journal too... can't do much now really
It seems that the problem was located in linklist.rb... it seems to be a
bit behind on the current API. The _ operator of the BaseEntry class
wants a key and a hash of options as argument... it looks like this used to
be a list. The trivial patch:
---------
--- lib/hobix/linklist.rb (revision 135)
+++ lib/hobix/linklist.rb (working copy)
@@ -47,7 +47,7 @@
module Hobix
class LinkList < BaseEntry
- _ :links, [:req, :textarea]
+ _ :links, :req => true, :edit_as => :textarea, :text_processor => true
# Converts the link list into a RedCloth string for display
# in templates.
---------
I am not exactly sure about the values of :edit_as and :text_processor though?
Kind regards,
Paul
--
Student @ Eindhoven | email: paul at luon.net
University of Technology, The Netherlands | JID: paul at luon.net
>>> Using the Power of Debian GNU/Linux <<< | GnuPG key ID: 0x50064181
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20060903/d5cefcdb/attachment.bin
From paul at luon.net Sun Sep 3 16:33:44 2006
From: paul at luon.net (Paul van Tilburg)
Date: Sun, 3 Sep 2006 22:33:44 +0200
Subject: A fix and a problem
Message-ID: <20060903203344.GE7376@power.luon.net>
Hello all,
I've been trying to upgrade my journal and incorporate the new features
(tags, comments, publishing, etc.) but I keep running into small problems.
1) The tags plugin creates odd links and uses weblog.link which doesn't
work well if you're staging the blog locally first.
A small patch to resolve this:
--------
--- lib/hobix/plugin/tags.rb (revision 135)
+++ lib/hobix/plugin/tags.rb (working copy)
@@ -38,7 +38,7 @@
<% tags_list(weblog.storage.find).sort.each do |name, count| %>
<% end %>
--------
2) I get an error when comments are enabled:
## Page: /2005/06/index.html, updated Mon Jun 13 22:44:27 CEST 2005
/usr/lib/ruby/1.8/hobix/comments.rb:64:in `entry_comment_form_erb':
undefined local variable or method `entry_id' for # (NameError)
To temporarily be able to investigate further, I've set entry_id to "foo"
at the top of entry_comment_form_erb().
3) But then, I still haven't got comments working. That is.. AFAIK
I've got everything configured, but not template stuff appears in the
resulting page(s). I don't know which info I should give you to show
what's wrong, actually.
Kind regards,
Paul
--
Student @ Eindhoven | email: paul at luon.net
University of Technology, The Netherlands | JID: paul at luon.net
>>> Using the Power of Debian GNU/Linux <<< | GnuPG key ID: 0x50064181
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20060903/73cdf1ce/attachment.bin
From bowman at mazirian.com Sun Sep 3 18:26:17 2006
From: bowman at mazirian.com (Bradford R. Bowman)
Date: Sun, 03 Sep 2006 18:26:17 -0400
Subject: A fix and a problem
In-Reply-To: <20060903203344.GE7376@power.luon.net>
References: <20060903203344.GE7376@power.luon.net>
Message-ID: <1157322377.5947.41.camel@phandaal>
On Sun, 2006-09-03 at 22:33 +0200, Paul van Tilburg wrote:
[snip...]
> 2) I get an error when comments are enabled:
>
> ## Page: /2005/06/index.html, updated Mon Jun 13 22:44:27 CEST 2005
> /usr/lib/ruby/1.8/hobix/comments.rb:64:in `entry_comment_form_erb':
> undefined local variable or method `entry_id' for # (NameError)
>
> To temporarily be able to investigate further, I've set entry_id to "foo"
> at the top of entry_comment_form_erb().
>
> 3) But then, I still haven't got comments working. That is.. AFAIK
> I've got everything configured, but not template stuff appears in the
> resulting page(s). I don't know which info I should give you to show
> what's wrong, actually.
Hi Paul:
I did just verify that comments will work with the code in trunk right
now in spite of convincing myself to the contrary a few times. Seems
like I've generated this error before somehow. Have you done a lot of
customizing of the quick templates in hobix.out.quick or in a skel file
for this blog? I have a vague notion the problem might be in there,
although I may be way off base. If you have customized them, may I see
them?
--
Bradford R. Bowman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20060903/be0ebf07/attachment-0001.bin
From mental at rydia.net Mon Sep 4 00:25:54 2006
From: mental at rydia.net (MenTaLguY)
Date: Mon, 04 Sep 2006 00:25:54 -0400
Subject: Patch problems
In-Reply-To: <20060903181305.GD7376@power.luon.net>
References: <20060903160149.GB7376@power.luon.net>
<20060903162725.GC7376@power.luon.net>
<20060903181305.GD7376@power.luon.net>
Message-ID: <1157343954.13211.13.camel@localhost.localdomain>
On Sun, 2006-09-03 at 20:13 +0200, Paul van Tilburg wrote:
> ---------
> --- lib/hobix/linklist.rb (revision 135)
> +++ lib/hobix/linklist.rb (working copy)
> @@ -47,7 +47,7 @@
> module Hobix
> class LinkList < BaseEntry
>
> - _ :links, [:req, :textarea]
> + _ :links, :req => true, :edit_as => :textarea, :text_processor => true
>
> # Converts the link list into a RedCloth string for display
> # in templates.
>
> ---------
>
> I am not exactly sure about the values of :edit_as and :text_processor though?
Applied. :edit_as is correct, I do not believe links should be
automatically RedClothized (given LinkList#contents), so I've left off
the :text_processor bit.
-mental
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20060904/77e8b39e/attachment.bin
From mental at rydia.net Mon Sep 4 00:37:02 2006
From: mental at rydia.net (MenTaLguY)
Date: Mon, 04 Sep 2006 00:37:02 -0400
Subject: A fix and a problem
In-Reply-To: <20060903203344.GE7376@power.luon.net>
References: <20060903203344.GE7376@power.luon.net>
Message-ID: <1157344622.13211.15.camel@localhost.localdomain>
On Sun, 2006-09-03 at 22:33 +0200, Paul van Tilburg wrote:
> 1) The tags plugin creates odd links and uses weblog.link which doesn't
> work well if you're staging the blog locally first.
> A small patch to resolve this:
>
> --------
> --- lib/hobix/plugin/tags.rb (revision 135)
> +++ lib/hobix/plugin/tags.rb (working copy)
> @@ -38,7 +38,7 @@
>
> <% tags_list(weblog.storage.find).sort.each do |name, count| %>
>
> <% end %>
Applied.
-mental
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20060904/29e72209/attachment.bin
From paul at luon.net Mon Sep 4 04:43:41 2006
From: paul at luon.net (Paul van Tilburg)
Date: Mon, 4 Sep 2006 10:43:41 +0200
Subject: A fix and a problem
In-Reply-To: <1157322377.5947.41.camel@phandaal>
References: <20060903203344.GE7376@power.luon.net>
<1157322377.5947.41.camel@phandaal>
Message-ID: <20060904084340.GF7376@power.luon.net>
On Sun, Sep 03, 2006 at 06:26:17PM -0400, Bradford R. Bowman wrote:
> On Sun, 2006-09-03 at 22:33 +0200, Paul van Tilburg wrote:
> [snip...]
> > 2) I get an error when comments are enabled:
> >
> > ## Page: /2005/06/index.html, updated Mon Jun 13 22:44:27 CEST 2005
> > /usr/lib/ruby/1.8/hobix/comments.rb:64:in `entry_comment_form_erb':
> > undefined local variable or method `entry_id' for # (NameError)
> >
> > To temporarily be able to investigate further, I've set entry_id to "foo"
> > at the top of entry_comment_form_erb().
> >
> > 3) But then, I still haven't got comments working. That is.. AFAIK
> > I've got everything configured, but not template stuff appears in the
> > resulting page(s). I don't know which info I should give you to show
> > what's wrong, actually.
>
> Hi Paul:
>
> I did just verify that comments will work with the code in trunk right
> now in spite of convincing myself to the contrary a few times.
But this probably holds for newly created blogs? I've one that is
created with 0.3 and I am trying to adapt. I have attached my hobix.yaml,
AFAIK the skel/ dir contains only standard stuff.
Since the comments seem to do head-prepend and entry-append I wasn't
worried that me overriding some of entry would matter, but does it?
Regards,
Paul
--
Student @ Eindhoven | email: paul at luon.net
University of Technology, The Netherlands | JID: paul at luon.net
>>> Using the Power of Debian GNU/Linux <<< | GnuPG key ID: 0x50064181
-------------- next part --------------
--- !hobix.com,2004/weblog
title: Paul's Journal
link: http://paul.luon.net/journal/
tagline: Some periodical thoughts and actions...
period: 00:60:00
authors:
paul:
name: Paul van Tilburg
url: http://paul.luon.net/
email: paul at luon.net
linklist: !hobix.com,2004/linklist
links: !omap
- Home: /home/
- Journal: /journal/
- About Me: /home/about/Me.html
- Contact Me: /home/about/Contact.html
- My Feeds: /feeds.opml
- Technorati Profile: http://www.technorati.com/profile/PaulVanTilburg
sections: {}
requires:
- hobix/storage/filesys
- hobix/out/quick:
entry_footer: |
posted @ <%= entry.created.strftime( "%H:%M" ) %> |
(L)
head_tags: |
css: " @import \"/css/style.css\";"
- hobix/out/erb
- hobix/out/rss
- hobix/out/atom
- hobix/publisher
- hobix/comments
- hobix/plugin/tags
- hobix/plugin/sections
- local
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20060904/e63ee188/attachment.bin
From paul at luon.net Mon Sep 4 06:31:49 2006
From: paul at luon.net (Paul van Tilburg)
Date: Mon, 4 Sep 2006 12:31:49 +0200
Subject: A fix and a problem
In-Reply-To: <20060904084340.GF7376@power.luon.net>
References: <20060903203344.GE7376@power.luon.net>
<1157322377.5947.41.camel@phandaal>
<20060904084340.GF7376@power.luon.net>
Message-ID: <20060904103149.GC30765@power.luon.net>
On Mon, Sep 04, 2006 at 10:43:41AM +0200, Paul van Tilburg wrote:
> On Sun, Sep 03, 2006 at 06:26:17PM -0400, Bradford R. Bowman wrote:
> > On Sun, 2006-09-03 at 22:33 +0200, Paul van Tilburg wrote:
> > [snip...]
> > > 2) I get an error when comments are enabled:
> > >
> > > ## Page: /2005/06/index.html, updated Mon Jun 13 22:44:27 CEST 2005
> > > /usr/lib/ruby/1.8/hobix/comments.rb:64:in `entry_comment_form_erb':
> > > undefined local variable or method `entry_id' for # (NameError)
> > >
> > > To temporarily be able to investigate further, I've set entry_id to "foo"
> > > at the top of entry_comment_form_erb().
I've created a new blog (hobix create blog ~/.hobix/foo), and after
replying 'apache2-all' to the question which mode should be selected,
I also get this error after:
*** Joining blog `a bokononist asks', adding you as author.
/usr/lib/ruby/1.8/hobix/comments.rb:64:in `entry_comment_form_erb':
undefined local variable or method `entry_id' for # (NameError)
> > I did just verify that comments will work with the code in trunk right
> > now in spite of convincing myself to the contrary a few times.
This is odd, because my verification fails. This is a current checkout.
Paul
--
Student @ Eindhoven | email: paul at luon.net
University of Technology, The Netherlands | JID: paul at luon.net
>>> Using the Power of Debian GNU/Linux <<< | GnuPG key ID: 0x50064181
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20060904/c4607248/attachment.bin
From bowman at mazirian.com Mon Sep 4 14:14:57 2006
From: bowman at mazirian.com (Bradford R. Bowman)
Date: Mon, 04 Sep 2006 14:14:57 -0400
Subject: A fix and a problem
In-Reply-To: <20060904103149.GC30765@power.luon.net>
References: <20060903203344.GE7376@power.luon.net>
<1157322377.5947.41.camel@phandaal>
<20060904084340.GF7376@power.luon.net>
<20060904103149.GC30765@power.luon.net>
Message-ID: <1157393697.5947.51.camel@phandaal>
On Mon, 2006-09-04 at 12:31 +0200, Paul van Tilburg wrote:
> I've created a new blog (hobix create blog ~/.hobix/foo), and after
> replying 'apache2-all' to the question which mode should be selected,
> I also get this error after:
>
> *** Joining blog `a bokononist asks', adding you as author.
> /usr/lib/ruby/1.8/hobix/comments.rb:64:in `entry_comment_form_erb':
> undefined local variable or method `entry_id' for # (NameError)
Oops. It's the result of a recent change that was made to accommodate
blogs served from a subdirectory. I guess I didn't have the most recent
code after all. Sorry about that.
This will fix it:
Index: comments.rb
===================================================================
--- comments.rb (revision 137)
+++ comments.rb (working copy)
@@ -61,7 +61,7 @@
def entry_comment_form_erb; %{