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="" href="http://cnn.com\">http://cnn.com\ ">does</a></p>\n\n\nHere’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><strong>banana</strong></li>\n\t</ul>\n\n\nHere’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><strong>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 <[EMAIL PROTECTED]
> 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’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’m not coughing, I’m blessyouing.</p>And here is a sample of the same content_html field from the busted database:content_htmlKids 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
[EMAIL PROTECTED]
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Kyle Heon
Sent: Friday, February 24, 2006 9:47 PM
To: typo-list@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
[EMAIL PROTECTED]
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Kyle Heon
Sent: Thursday, February 23, 2006 9:32 PM
To: typo-list@rubyforge.org
Subject: Re: [typo] Lost Textile markup after upgrading to the trunk (r865)Oops, forgot the attachment.Kyle Heon
[EMAIL PROTECTED]
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Kyle Heon
Sent: Thursday, February 23, 2006 9:22 PM
To: typo-list@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
[EMAIL PROTECTED]
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Kyle Heon
Sent: Thursday, February 23, 2006 8:46 PM
To: typo-list@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_helperI found these in the components folder.Kyle Heon
[EMAIL PROTECTED]
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.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Scott Laird
Sent: Thursday, February 23, 2006 7:44 PM
To: [EMAIL PROTECTED]; typo-list@rubyforge.org
Subject: Re: [typo] Lost Textile markup after upgrading to the trunk (r865)
Scott
On 2/23/06, Kyle Heon <[EMAIL PROTECTED]> wrote:Has anyone else seen this? Any suggestions on what I can do to fix it?Kyle Heon
[EMAIL PROTECTED]
From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of Kyle Heon
Sent: Wednesday, February 22, 2006 9:38 PM
To: typo-list@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
[EMAIL PROTECTED]
_______________________________________________
Typo-list mailing list
Typo-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/typo-list
_______________________________________________
Typo-list mailing list
Typo-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/typo-list
_______________________________________________ Typo-list mailing list Typo-list@rubyforge.org http://rubyforge.org/mailman/listinfo/typo-list