[typo] Lost Textile markup after upgrading to the trunk (r865)

Kyle Heon kheon at comcast.net
Tue Feb 28 21:55:29 EST 2006


Success!
 
Many thanks to everyone who offered me assistance. The tip below got me much
closer then I'd been able to get on my own. It didn't solve the issue but
with a little exploration I was able to get things working in development.
 
Unfortunately this same fix didn't work out of the gate on my Textdrive
hosted site. I'm not sure what the issue was. I contined to get the "missing
default helper" errors so I once more uploaded the app and component
directories, this time overwriting every file. I then followed up with a
chmod -R 777 ./ in the project root.
 
Tried once more with script/console using the following code:
 
articles = Article.find(:all)
articles.each do |a|
  a.body_html = nil
  a.save
end
 
This reset all of the body_html columns in the database. I then hard
refreshed the site (running with Webrick in development mode) which reset
the body_html columns in the database.
 
My problems didn't quite go away then but I was very suspicous of some weird
caching issue. Clicking into an article worked. I removed the cache folder
and reloaded the homepage, success!
 
Thanks again.

Kyle Heon 
kheon at comcast.net 

 

  _____  

From: Steve Longdo [mailto:steve.longdo at gmail.com] 
Sent: Saturday, February 25, 2006 9:39 PM
To: kheon at comcast.net; typo-list at rubyforge.org
Subject: Re: [typo] Lost Textile markup after upgrading to the trunk (r865)


The code below will loop through and show you what if any text filters are
set on your Articles.

    Article.find(:all).each do |a|
      a.text_filter
    end

I also notice when I add a new article with Textile as the filter, when I
view the article's "body" property it is the non HTML markup, when you view
the article's "body_html" property it will be the filter applied version or
HTML markup. 

You may just want to load things up in ./script/console first and noodle
around:
>> a = Article.find(81)
=> #<Article:0x142d848 @attributes={"allow_pings"=>"1", "name"=>nil,
"text_filter"=>nil, 
... Blah Blah Blah ...
"keywords"=>"testy textile"}>
>> a.body
=> "this will be *bold?*  This one will be _italic_ I forget what this
\"does\":1 \r\n\r\nHere's a list for fun:\r\n* _apple_\r\n* orange\r\n*
*banana*\r\n\r\nHere's another list not fun:\r\n# _apple_\r\n# orange\r\n#
*banana*\r\n\r\n[1]http://cnn.com" 
>> a.body_html
=> "<p>this will be <strong>bold?</strong>  This one will be <em>italic</em>
I forget what this <a href=\"http://cnn.com\  <http://cnn.com\>
">does</a></p>\n\n\nHere&#8217;s a list for
fun:\n\t<ul>\n\t<li><em>apple</em></li>\n\t\t<li>orange</li>\n\t\t<li><stron
g>banana</strong></li>\n\t</ul>\n\n\nHere&#8217;s another list not
fun:\n\t<ol>\n\t<li><em>apple</em></li>\n\t\t<li>orange</li>\n\t\t<li><stron
g>banana</strong></li>\n\t</ol>" 
>> a.text_filter
=> #<TextFilter:0x579f90 @attributes={"name"=>"textile", "filters"=>"---
[]", "id"=>"5", "params"=>"--- {}", "description"=>"Textile",
"markup"=>"textile"}> 

-Steve
http://www.stevelongdo.com


On 2/25/06, Kyle Heon <kheon at comcast.net  <mailto:kheon at comcast.net> >
wrote: 

Continuing to troubleshoot this problem. Hoping that someone might be able
to give me a hand. Ias I noted last night this seemed to be something to do
with the database. I think it might have something to do with a banged up
migration that happened on my production site.
 
Tonight I noticed that in the content table, the body_html column does not
have the proper html content. For instance, non of the paragraphs have p
tags wrapped around them.
 
For instance, here is a sample from my working development database:
 
content_html
<p>Kids sure say the darndest things don&#8217;t they? My daughter sneezed
at the table all over her food. I made some comment about coughing on your
food.</p>


<p>She replies: I&#8217;m not coughing, I&#8217;m blessyouing.</p>
 
And here is a sample of the same content_html field from the busted
database: 
 
content_html
Kids sure say the darndest things don't they? My daughter sneezed at the
table all over her food. I made some comment about coughing on your food.
 
She replies: I'm not coughing, I'm blessyouing.
 
 
Notice that the markup is missing. I'm starting to think this can be fixed
by running something from via the console (script/console) to force the
articles through the textile parser again and resave the items. Does this
sound like a good approach? If so, can anyone give me a hand on the syntax
(very new to Ruby/Rails).
 
Many thanks to all.
Kyle Heon 
kheon at comcast.net 

 

  _____  

From: typo-list-bounces at rubyforge.org
[mailto:typo-list-bounces at rubyforge.org] On Behalf Of Kyle Heon
Sent: Friday, February 24, 2006 9:47 PM 

To: typo-list at rubyforge.org
Subject: Re: [typo] Lost Textile markup after upgrading to the trunk (r865)



It would appear that this issue is somehow in the database. I don't have
this behaviour locally after upgrading so I pulled down the MySQL database
and restored it locally, pointed my development environment at it and it is
happening there.
 
Any thoughts as to what I should begin looking for?

Kyle Heon 
kheon at comcast.net 

 

  _____  

From: typo-list-bounces at rubyforge.org
[mailto:typo-list-bounces at rubyforge.org] On Behalf Of Kyle Heon
Sent: Thursday, February 23, 2006 9:32 PM
To: typo-list at rubyforge.org
Subject: Re: [typo] Lost Textile markup after upgrading to the trunk (r865)


Oops, forgot the attachment.

Kyle Heon 
kheon at comcast.net 

 

  _____  

From: typo-list-bounces at rubyforge.org
[mailto:typo-list-bounces at rubyforge.org] On Behalf Of Kyle Heon
Sent: Thursday, February 23, 2006 9:22 PM
To: typo-list at rubyforge.org
Subject: Re: [typo] Lost Textile markup after upgrading to the trunk (r865)


Attached is a copy of a fresh development.log file that includes a single
request to the root of the site.
 
I removed the app and components directories and then re-uploaded them. Next
I did a chmod -R 777 on the folders as I thought it might have something to
do with permissions.
 
Now the list of missing items is smaller, just the initial TextFilterPlugin
lines.

Kyle Heon 
kheon at comcast.net 

 

  _____  

From: typo-list-bounces at rubyforge.org
[mailto:typo-list-bounces at rubyforge.org] On Behalf Of Kyle Heon
Sent: Thursday, February 23, 2006 8:46 PM
To: typo-list at rubyforge.org
Subject: Re: [typo] Lost Textile markup after upgrading to the trunk (r865)


Please forgive me, I'm pretty new to this stuff. I have my site running on
webrick right now and I keep seeing things like this in the logs:
 
TextFilterPlugin: missing default helper path text_filter_plugin_helper
TextFilterPlugin::Markup: missing default helper path
text_filter_plugin/markup_helper
TextFilterPlugin::Macro: missing default helper path
text_filter_plugin/macro_helper
TextFilterPlugin::MacroPre: missing default helper path
text_filter_plugin/macro_pre_helper
TextFilterPlugin::MacroPost: missing default helper path
text_filter_plugin/macro_post_helper
TextFilterPlugin::PostProcess: missing default helper path
text_filter_plugin/post_process_helper
Plugins::Textfilters::AmazonController: missing default helper path
plugins/textfilters/amazon_helper
Plugins::Textfilters::CodeController: missing default helper path
plugins/textfilters/code_helper
Plugins::Textfilters::FlickrController: missing default helper path
plugins/textfilters/flickr_helper
Plugins::Textfilters::HtmlfilterController: missing default helper path
plugins/textfilters/htmlfilter_helper
Plugins::Textfilters::MacroPostController: missing default helper path
plugins/textfilters/macro_post_helper
Plugins::Textfilters::MacroPreController: missing default helper path
plugins/textfilters/macro_pre_helper
Plugins::Textfilters::MarkdownController: missing default helper path
plugins/textfilters/markdown_helper
Plugins::Textfilters::NoneController: missing default helper path
plugins/textfilters/none_helper
Plugins::Textfilters::SmartypantsController: missing default helper path
plugins/textfilters/smartypants_helper
Plugins::Textfilters::SparklineController: missing default helper path
plugins/textfilters/sparkline_helper
Plugins::Textfilters::TextileController: missing default helper path
plugins/textfilters/textile_helper
Plugins::Textfilters::LightboxController: missing default helper path
plugins/textfilters/lightbox_helper
 
I found these in the components folder.

Kyle Heon 
kheon at comcast.net 

 

  _____  

From: scott at lairdmail.com [mailto:scott at lairdmail.com] On Behalf Of Scott
Laird
Sent: Thursday, February 23, 2006 7:44 PM
To: kheon at comcast.net; typo-list at rubyforge.org
Subject: Re: [typo] Lost Textile markup after upgrading to the trunk (r865)


Look in the logs and see if you're getting an exception in the filtering
code; when a filter fails, the input text is passed through unfiltered.


Scott


On 2/23/06, Kyle Heon <kheon at comcast.net> wrote: 

Has anyone else seen this? Any suggestions on what I can do to fix it?

Kyle Heon 
kheon at comcast.net 

 

  _____  

From: typo-list-bounces at rubyforge.org [mailto:
<mailto:typo-list-bounces at rubyforge.org> typo-list-bounces at rubyforge.org] On
Behalf Of Kyle Heon
Sent: Wednesday, February 22, 2006 9:38 PM
To: typo-list at rubyforge.org
Subject: [typo] Lost Textile markup after upgrading to the trunk (r865)



I upgraded my install of Typo on my site tonight and had more then my fair
share of issues while doing so. I thought I had them all sorted out but now
my Textile markup is being ignored.

I don't know what caused this and really don't know what I can do to fix it.
I've tried re-saving Textile as my markup language

You can see this at www.kyleheon.com. 

Kyle Heon 
kheon at comcast.net 



_______________________________________________
Typo-list mailing list
Typo-list at rubyforge.org
http://rubyforge.org/mailman/listinfo/typo-list





_______________________________________________
Typo-list mailing list
Typo-list at rubyforge.org
http://rubyforge.org/mailman/listinfo/typo-list




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/typo-list/attachments/20060228/07fa06a2/attachment-0001.htm


More information about the Typo-list mailing list