|
List Info
Thread: Admin posting broken r1139
|
|
| Admin posting broken r1139 |

|
2006-07-19 00:32:14 |
Go ahead and add it. If nothing else, it has a good stack
trace, so
it should be easy enough to fix.
Scott
On 7/18/06, Steve Longdo <steve.longdo gmail.com> wrote:
> Running MySQL/Lightty on r1139. The following happens
after posting through
> the admin interface. No textfilter was used/selected.
Not sure if this the
> same as Trac ticket #948 or not. Didn't want to enter
a ticket if it is the
> same issue.
>
> NOTE: The published date was not populated with
anything and I entered a
> past date. When I return to the admin/articles page,
it is there, but the
> same error happens after clicking on it. Also it
breaks when trying to load
> the homepage?
> NoMethodError in Admin/content#show
>
> Showing app/views/admin/content/show.rhtml where line
#11
> raised: undefined method `filter_text_for_controller'
for
> #<String:0x225e59c>
>
>
> Extracted source (around line #11): 8:
<h3><%=h article.title %></h3>
> 9:
> 10: <div class="form">
> 11: <div><%= article.full_html
%></div>
> 12: <p
class="meta"><label>Posted:</label&g
t; <%=h
> article.published_at.to_formatted_s(:long_weekday)
%> by
> <%=h article.author %></p>
> 13: <p class="meta"><label>Last
updated:</label> <%=h
> article.updated_at.to_formatted_s
> (:long_weekday) %></p>
> 14: <p
class="meta"><label>Published:</labe
l> <%=h
> ( article.published? ? "Yes" :
"No") %></p>
>
> #/app/models/content.rb:132:in
> `populate_html_fields'
>
> #/app/models/content.rb:130:in
> `populate_html_fields'
> #/app/models/content.rb:140:in `html'
> #/app/models/content.rb:126:in `full_html'
> #/app/views/admin/content/show.rhtml:11:in
> `_run_rhtml_admin_content_show'
>
>
>
> Looking at the data stored in the table shows that
body_html is NULL? The
> textfilter that is stored looks like this:
> --- !ruby/object:TextFilter
> attributes:
> name: none
> filters: --- []
> params: --- {}
> description: None
> markup: none
> new_record: true
>
> Do I need to add a new ticket to Trac?
>
> --
> Thanks,
> -Steve
> http://www.stevelongdo.com
> _______________________________________________
> 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
|
|
| Admin posting broken r1139 |

|
2006-07-19 02:52:23 |
|
Trac #1005. For some reason It won't come up though. I have an update for some reason the article.text_filter is returning a YAML String instead of a TextFilter object. This is probably the culprit for Trac #1006 as well. I confirmed this in the console loading the saved new post(a) and an older one that still renders correctly(b):
>> b.text_filter => #<TextFilter:0x26569bc attributes={"name"=>"none", "filters"=>"--- []", "id"=>"1", "params"=>"--- {}", "description"=>"None", "markup"=>"none"}>
>> a.text_filter => "--- !ruby/object:TextFilter \nattributes: \n name: none\n filters: --- []\n params: --- {}\n description: None\n markup: none\nnew_record: true\n"
Don't see anything that has changed with this in the last few changesets, so I am not sure what is up.
In the console I had to do the follwoing actions to get the page to load correctly: >> a.text_filter_id=1 => 1 >> a.text_filter=TextFilter.find 1 => #<TextFilter:0x250deac attributes={"name"=>"none", "filters"=>"--- []", "id"=>"1", "params"=>"--- {}", "description"=>"None", "markup"=>"none"}>
>> a.body_html="<p>Steve is LORD!</p>" => "<p>Steve is LORD!</p>"
On 7/18/06, Scott Laird
<sigkill.org">scott sigkill.org> wrote:Go ahead and add it. If nothing else, it has a good stack trace, so
it should be easy enough to fix.
Scott
On 7/18/06, Steve Longdo <gmail.com">steve.longdo gmail.com> wrote: > Running MySQL/Lightty on r1139. The following happens after posting through
> the admin interface. No textfilter was used/selected. Not sure if this the > same as Trac ticket #948 or not. Didn't want to enter a ticket if it is the > same issue. > > NOTE: The published date was not populated with anything and I entered a
> past date. When I return to the admin/articles page, it is there, but the > same error happens after clicking on it. Also it breaks when trying to load > the homepage? > NoMethodError in Admin/content#show
> > Showing app/views/admin/content/show.rhtml where line #11 > raised: undefined method `filter_text_for_controller' for > #<String:0x225e59c> > > > Extracted source (around line #11): 8: <h3><%=h
article.title %></h3> > 9: > 10: <div class="form"> > 11: <div><%= article.full_html %></div> > 12: <p class="meta"><label>Posted:</label> <%=h
> article.published_at.to_formatted_s(:long_weekday) %> by > <%=h article.author %></p> > 13: <p class="meta"><label>Last updated:</label> <%=h > article.updated_at.to_formatted_s
> (:long_weekday) %></p> > 14: <p class="meta"><label>Published:</label> <%=h > ( article.published? ? "Yes" : "No") %></p> >
> #{RAILS_ROOT}/app/models/content.rb:132:in > `populate_html_fields' > > #{RAILS_ROOT}/app/models/content.rb:130:in > `populate_html_fields' > #{RAILS_ROOT}/app/models/content.rb:140:in `html'
> #{RAILS_ROOT}/app/models/content.rb:126:in `full_html' > #{RAILS_ROOT}/app/views/admin/content/show.rhtml:11:in > `_run_rhtml_admin_content_show' > > > > Looking at the data stored in the table shows that body_html is NULL? The
> textfilter that is stored looks like this: > --- !ruby/object:TextFilter > attributes: > name: none > filters: --- [] > params: --- {} > description: None > markup: none
> new_record: true > > Do I need to add a new ticket to Trac? > > -- > Thanks, > -Steve > http://www.stevelongdo.com > _______________________________________________
> Typo-list mailing list > rubyforge.org">Typo-list rubyforge.org > http://rubyforge.org/mailman/listinfo/typo-list
> > _______________________________________________ Typo-list mailing list rubyforge.org">Typo-list rubyforge.org
http://rubyforge.org/mailman/listinfo/typo-list
-- Thanks, -Steve http://www.stevelongdo.com
|
| Admin posting broken r1139 |

|
2006-07-19 03:13:43 |
Which version of Ruby?
Scott
On 7/18/06, Steve Longdo <steve.longdo gmail.com> wrote:
> Trac #1005. For some reason It won't come up though.
I have an update for
> some reason the article.text_filter is returning a YAML
String instead of a
> TextFilter object. This is probably the culprit for
Trac #1006 as well. I
> confirmed this in the console loading the saved new
post(a) and an older one
> that still renders correctly(b):
>
> >> b.text_filter
> => #<TextFilter:0x26569bc attributes={"name"=>"none"
, "filters"=>"--- []",
> "id"=>"1",
"params"=>"--- {}",
"description"=>"None",
"markup"=>"none"}>
> >> a.text_filter
> => "--- !ruby/object:TextFilter \nattributes:
\n name: none\n filters: ---
> []\n params: --- {}\n description: None\n markup:
none\nnew_record:
> true\n"
>
> Don't see anything that has changed with this in the
last few changesets, so
> I am not sure what is up.
>
> In the console I had to do the follwoing actions to get
the page to load
> correctly:
> >> a.text_filter_id=1
> => 1
> >> a.text_filter=TextFilter.find 1
> => #<TextFilter:0x250deac attributes={"name"=>"none"
, "filters"=>"--- []",
> "id"=>"1",
"params"=>"--- {}",
"description"=>"None",
"markup"=>"none"}>
> >> a.body_html="<p>Steve is
LORD!</p>"
> => "<p>Steve is LORD!</p>"
>
>
>
>
> On 7/18/06, Scott Laird <scott sigkill.org> wrote:
> > Go ahead and add it. If nothing else, it has a
good stack trace, so
> > it should be easy enough to fix.
> >
> >
> > Scott
> >
> > On 7/18/06, Steve Longdo <steve.longdo gmail.com> wrote:
> > > Running MySQL/Lightty on r1139. The
following happens after posting
> through
> > > the admin interface. No textfilter was
used/selected. Not sure if this
> the
> > > same as Trac ticket #948 or not. Didn't
want to enter a ticket if it is
> the
> > > same issue.
> > >
> > > NOTE: The published date was not populated
with anything and I entered a
> > > past date. When I return to the
admin/articles page, it is there, but
> the
> > > same error happens after clicking on it.
Also it breaks when trying to
> load
> > > the homepage?
> > > NoMethodError in Admin/content#show
> > >
> > > Showing app/views/admin/content/show.rhtml
where line
> #11
> > > raised: undefined method
`filter_text_for_controller' for
> > > #<String:0x225e59c>
> > >
> > >
> > > Extracted source (around line #11): 8:
<h3><%=h article.title %></h3>
> > > 9:
> > > 10: <div class="form">
> > > 11: <div><%= article.full_html
%></div>
> > > 12: <p
class="meta"><label>Posted:</label&g
t; <%=h
> > >
article.published_at.to_formatted_s(:long_weekday) %>
> by
> > > <%=h article.author %></p>
> > > 13: <p
class="meta"><label>Last
updated:</label> <%=h
> > > article.updated_at.to_formatted_s
> > > (:long_weekday) %></p>
> > > 14: <p
class="meta"><label>Published:</labe
l> <%=h
> > > ( article.published? ? "Yes" :
"No") %></p>
> > >
> > > #/app/models/content.rb:132:in
> > > `populate_html_fields'
> > >
> > > #/app/models/content.rb:130:in
> > > `populate_html_fields'
> > > #/app/models/content.rb:140:in
`html'
> > > #/app/models/content.rb:126:in
`full_html'
> > >
#/app/views/admin/content/show.rhtml:11:in
> > > `_run_rhtml_admin_content_show'
> > >
> > >
> > >
> > > Looking at the data stored in the table shows
that body_html is NULL?
> The
> > > textfilter that is stored looks like this:
> > > --- !ruby/object:TextFilter
> > > attributes:
> > > name: none
> > > filters: --- []
> > > params: --- {}
> > > description: None
> > > markup: none
> > > new_record: true
> > >
> > > Do I need to add a new ticket to Trac?
> > >
> > > --
> > > Thanks,
> > > -Steve
> > > http://www.stevelongdo.com
> > >
_______________________________________________
> > > 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
> >
>
>
>
> --
>
> Thanks,
> -Steve
> http://www.stevelongdo.com
> _______________________________________________
> 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
|
|
| Admin posting broken r1139 |

|
2006-07-19 04:06:59 |
On Tue, 2006-07-18 at 21:52 -0500, Steve Longdo wrote:
> I have an update for some reason the article.text_filter is returning
> a YAML String instead of a TextFilter object. This is
probably the
> culprit for Trac #1006 as well. I confirmed this in
the console
> loading the saved new post(a) and an older one that
still renders
> correctly(b):
When I encountered symptoms like this, it's because my
database schema
was hosed. Probably happened when I tried to fix the
migrations 6
months ago. My database had an extra table that wasn't
being used but
had the same name as a variable in the code. AR wasn't
very happy about
that and instantiated YAML strings instead of objects.
In my case, I dropped the table and things started working.
So, you might want to give your schema a close look-see.
Especially
check for extra tables.
I've been meaning to write a Typo database lint tool... It
would ensure
that no extra tables exist, all table references work, no
duplicates,
etc. Ah, if only I had a bit more time...
- Scott
_______________________________________________
Typo-list mailing list
Typo-list rubyforge.org
http:
//rubyforge.org/mailman/listinfo/typo-list
|
|
| Admin posting broken r1139 |

|
2006-07-19 04:26:48 |
I've never personally edited my typo table structure. I do
know one
of the migrations ran and turned my UTF-8 data into ASCII.
Only
because I had some language characters outside the overlap
in the
charactersets.
I'm suspicious of the change in the ContentObserver class
from 2 weeks
ago. It seems to be responsible for populating the
html_fields before
a save. I suspect if I remove the commentted line my
body_html field
will get populated again.
At any rate I show 18 tables. Is that right?
mysql> show tables;
+-----------------------+
| Tables_in_rhesus_typo |
+-----------------------+
| articles_categories |
| articles_tags |
| blacklist_patterns |
| blogs |
| categories |
| contents |
| notifications |
| page_caches |
| pings |
| redirects |
| resources |
| schema_info |
| sessions |
| sidebars |
| tags |
| text_filters |
| triggers |
| users |
+-----------------------+
18 rows in set (0.00 sec)
mysql> desc
contents;+------------------+--------------+------+-----+---
------+----------------+|
Field | Type | Null | Key | Default |
Extra
|+------------------+--------------+------+-----+---------+
----------------+|
id | int(11) | | PRI | NULL |
auto_increment || title | varchar(255) | YES |
| NULL
| || author | varchar(255) | YES
| |
NULL | || body | text
| YES |
| NULL | || body_html | text
| YES
| | NULL | || extended | text
|
YES | | NULL | || excerpt |
text
| YES | | NULL | || keywords
|
varchar(255) | YES | | NULL | ||
text_filter
| varchar(255) | YES | | NULL | ||
created_at
| datetime | YES | | NULL |
||
updated_at | datetime | YES | | NULL |
|| extended_html | text | YES | | NULL |
|| user_id | int(11) | YES | | NULL
|
|| permalink | varchar(255) | YES | |
NULL |
|| guid | varchar(255) | YES |
| NULL
| || text_filter_id | int(11) | YES |
|
NULL | |
| whiteboard | text | YES | | NULL |
|
| type | varchar(255) | YES | | NULL |
|
| article_id | int(11) | YES | MUL | NULL |
|
| email | varchar(255) | YES | | NULL |
|
| url | varchar(255) | YES | | NULL |
|
| ip | varchar(40) | YES | | NULL |
|
| blog_name | varchar(255) | YES | | NULL |
|
| name | varchar(255) | YES | | NULL |
|
| comments_count | int(11) | YES | | NULL |
|
| trackbacks_count | int(11) | YES | | NULL |
|
| published | tinyint(1) | YES | | 0 |
|
| allow_pings | tinyint(1) | YES | | NULL |
|
| allow_comments | tinyint(1) | YES | | NULL |
|
| blog_id | int(11) | | MUL | 0 |
|
| published_at | datetime | YES | | NULL |
|
+------------------+--------------+------+-----+---------+--
--------------+
31 rows in set (0.00 sec)
On 7/18/06, Scott Bronson <bronson rinspin.com> wrote:
> On Tue, 2006-07-18 at 21:52 -0500, Steve Longdo wrote:
> > I have an update for some reason the article.text_filter is returning
> > a YAML String instead of a TextFilter object.
This is probably the
> > culprit for Trac #1006 as well. I confirmed this
in the console
> > loading the saved new post(a) and an older one
that still renders
> > correctly(b):
>
> When I encountered symptoms like this, it's because my
database schema
> was hosed. Probably happened when I tried to fix the
migrations 6
> months ago. My database had an extra table that
wasn't being used but
> had the same name as a variable in the code. AR
wasn't very happy about
> that and instantiated YAML strings instead of objects.
>
> In my case, I dropped the table and things started
working.
>
> So, you might want to give your schema a close
look-see. Especially
> check for extra tables.
>
> I've been meaning to write a Typo database lint
tool... It would ensure
> that no extra tables exist, all table references work,
no duplicates,
> etc. Ah, if only I had a bit more time...
>
> - Scott
>
>
>
> _______________________________________________
> Typo-list mailing list
> Typo-list rubyforge.org
> http:
//rubyforge.org/mailman/listinfo/typo-list
>
--
Thanks,
-Steve
http://www.stevelongdo.com
_______________________________________________
Typo-list mailing list
Typo-list rubyforge.org
http:
//rubyforge.org/mailman/listinfo/typo-list
|
|
| Admin posting broken r1139 |

|
2006-07-19 04:44:13 |
A little research on populate_html_fields shows it sprang
into
existence between r1004 and r1033 in the content.rb model.
As near as
I can see it was always expecting a controller of some kind
and never
the instance of Content that the ContentObserver(also r1033)
sends in.
101 def html(controller,what = :all)
99 def populate_html_fields(controller)
*sigh* I will into it some more tomorrow, tired now.
On 7/18/06, Steve Longdo <steve.longdo gmail.com> wrote:
> I've never personally edited my typo table structure.
I do know one
> of the migrations ran and turned my UTF-8 data into
ASCII. Only
> because I had some language characters outside the
overlap in the
> charactersets.
>
> I'm suspicious of the change in the ContentObserver
class from 2 weeks
> ago. It seems to be responsible for populating the
html_fields before
> a save. I suspect if I remove the commentted line my
body_html field
> will get populated again.
>
> At any rate I show 18 tables. Is that right?
>
> mysql> show tables;
> +-----------------------+
> | Tables_in_rhesus_typo |
> +-----------------------+
> | articles_categories |
> | articles_tags |
> | blacklist_patterns |
> | blogs |
> | categories |
> | contents |
> | notifications |
> | page_caches |
> | pings |
> | redirects |
> | resources |
> | schema_info |
> | sessions |
> | sidebars |
> | tags |
> | text_filters |
> | triggers |
> | users |
> +-----------------------+
> 18 rows in set (0.00 sec)
>
> mysql> desc
contents;+------------------+--------------+------+-----+---
------+----------------+|
> Field | Type | Null | Key | Default
| Extra
>
|+------------------+--------------+------+-----+---------+-
---------------+|
> id | int(11) | | PRI | NULL
|
> auto_increment || title | varchar(255) | YES
| | NULL
> | || author | varchar(255) |
YES | |
> NULL | || body | text
| YES |
> | NULL | || body_html | text
| YES
> | | NULL | || extended |
text |
> YES | | NULL | || excerpt
| text
> | YES | | NULL | || keywords
|
> varchar(255) | YES | | NULL | ||
text_filter
> | varchar(255) | YES | | NULL |
|| created_at
> | datetime | YES | | NULL |
||
> updated_at | datetime | YES | | NULL
|
> || extended_html | text | YES | | NULL
|
> || user_id | int(11) | YES | |
NULL |
> || permalink | varchar(255) | YES |
| NULL |
> || guid | varchar(255) | YES
| | NULL
> | || text_filter_id | int(11) |
YES | |
> NULL | |
> | whiteboard | text | YES | | NULL
| |
> | type | varchar(255) | YES | | NULL
| |
> | article_id | int(11) | YES | MUL | NULL
| |
> | email | varchar(255) | YES | | NULL
| |
> | url | varchar(255) | YES | | NULL
| |
> | ip | varchar(40) | YES | | NULL
| |
> | blog_name | varchar(255) | YES | | NULL
| |
> | name | varchar(255) | YES | | NULL
| |
> | comments_count | int(11) | YES | | NULL
| |
> | trackbacks_count | int(11) | YES | | NULL
| |
> | published | tinyint(1) | YES | | 0
| |
> | allow_pings | tinyint(1) | YES | | NULL
| |
> | allow_comments | tinyint(1) | YES | | NULL
| |
> | blog_id | int(11) | | MUL | 0
| |
> | published_at | datetime | YES | | NULL
| |
>
+------------------+--------------+------+-----+---------+--
--------------+
> 31 rows in set (0.00 sec)
>
> On 7/18/06, Scott Bronson <bronson rinspin.com> wrote:
> > On Tue, 2006-07-18 at 21:52 -0500, Steve Longdo
wrote:
> > > I have an update for some reason the article.text_filter is returning
> > > a YAML String instead of a TextFilter object.
This is probably the
> > > culprit for Trac #1006 as well. I confirmed
this in the console
> > > loading the saved new post(a) and an older
one that still renders
> > > correctly(b):
> >
> > When I encountered symptoms like this, it's
because my database schema
> > was hosed. Probably happened when I tried to fix
the migrations 6
> > months ago. My database had an extra table that
wasn't being used but
> > had the same name as a variable in the code. AR
wasn't very happy about
> > that and instantiated YAML strings instead of
objects.
> >
> > In my case, I dropped the table and things started
working.
> >
> > So, you might want to give your schema a close
look-see. Especially
> > check for extra tables.
> >
> > I've been meaning to write a Typo database lint
tool... It would ensure
> > that no extra tables exist, all table references
work, no duplicates,
> > etc. Ah, if only I had a bit more time...
> >
> > - Scott
> >
> >
> >
> > _______________________________________________
> > Typo-list mailing list
> > Typo-list rubyforge.org
> > http:
//rubyforge.org/mailman/listinfo/typo-list
> >
>
>
> --
> Thanks,
> -Steve
> http://www.stevelongdo.com
>
--
Thanks,
-Steve
http://www.stevelongdo.com
_______________________________________________
Typo-list mailing list
Typo-list rubyforge.org
http:
//rubyforge.org/mailman/listinfo/typo-list
|
|
| Admin posting broken r1139 |

|
2006-07-19 04:38:01 |
On Tue, 2006-07-18 at 23:26 -0500, Steve Longdo wrote:
> At any rate I show 18 tables. Is that right?
bronson lyra:~/typo/local/db$ grep "CREATE TABLE"
schema.mysql.sql
CREATE TABLE articles_categories (
CREATE TABLE articles_tags (
CREATE TABLE blacklist_patterns (
CREATE TABLE blogs (
CREATE TABLE categories (
CREATE TABLE contents (
CREATE TABLE notifications (
CREATE TABLE page_caches (
CREATE TABLE pings (
CREATE TABLE redirects (
CREATE TABLE resources (
CREATE TABLE sessions (
CREATE TABLE sidebars (
CREATE TABLE tags (
CREATE TABLE text_filters (
CREATE TABLE triggers (
CREATE TABLE users (
CREATE TABLE schema_info (
Looks right.
> mysql> show tables;
> +-----------------------+
> | Tables_in_rhesus_typo |
> +-----------------------+
> | articles_categories |
> | articles_tags |
> | blacklist_patterns |
> | blogs |
> | categories |
> | contents |
> | notifications |
> | page_caches |
> | pings |
> | redirects |
> | resources |
> | schema_info |
> | sessions |
> | sidebars |
> | tags |
> | text_filters |
> | triggers |
> | users |
> +-----------------------+
> 18 rows in set (0.00 sec)
>
> mysql> desc
contents;+------------------+--------------+------+-----+---
------+----------------+|
> Field | Type | Null | Key | Default
| Extra
>
|+------------------+--------------+------+-----+---------+-
---------------+|
> id | int(11) | | PRI | NULL
|
> auto_increment || title | varchar(255) | YES
| | NULL
> | || author | varchar(255) |
YES | |
> NULL | || body | text
| YES |
> | NULL | || body_html | text
| YES
> | | NULL | || extended |
text |
> YES | | NULL | || excerpt
| text
> | YES | | NULL | || keywords
|
> varchar(255) | YES | | NULL | ||
text_filter
> | varchar(255) | YES | | NULL |
|| created_at
> | datetime | YES | | NULL |
||
> updated_at | datetime | YES | | NULL
|
> || extended_html | text | YES | | NULL
|
> || user_id | int(11) | YES | |
NULL |
> || permalink | varchar(255) | YES |
| NULL |
> || guid | varchar(255) | YES
| | NULL
> | || text_filter_id | int(11) |
YES | |
> NULL | |
> | whiteboard | text | YES | | NULL
| |
> | type | varchar(255) | YES | | NULL
| |
> | article_id | int(11) | YES | MUL | NULL
| |
> | email | varchar(255) | YES | | NULL
| |
> | url | varchar(255) | YES | | NULL
| |
> | ip | varchar(40) | YES | | NULL
| |
> | blog_name | varchar(255) | YES | | NULL
| |
> | name | varchar(255) | YES | | NULL
| |
> | comments_count | int(11) | YES | | NULL
| |
> | trackbacks_count | int(11) | YES | | NULL
| |
> | published | tinyint(1) | YES | | 0
| |
> | allow_pings | tinyint(1) | YES | | NULL
| |
> | allow_comments | tinyint(1) | YES | | NULL
| |
> | blog_id | int(11) | | MUL | 0
| |
> | published_at | datetime | YES | | NULL
| |
>
+------------------+--------------+------+-----+---------+--
--------------+
> 31 rows in set (0.00 sec)
>
> On 7/18/06, Scott Bronson <bronson rinspin.com> wrote:
> > On Tue, 2006-07-18 at 21:52 -0500, Steve Longdo
wrote:
> > > I have an update for some reason the article.text_filter is returning
> > > a YAML String instead of a TextFilter object.
This is probably the
> > > culprit for Trac #1006 as well. I confirmed
this in the console
> > > loading the saved new post(a) and an older
one that still renders
> > > correctly(b):
> >
> > When I encountered symptoms like this, it's
because my database schema
> > was hosed. Probably happened when I tried to fix
the migrations 6
> > months ago. My database had an extra table that
wasn't being used but
> > had the same name as a variable in the code. AR
wasn't very happy about
> > that and instantiated YAML strings instead of
objects.
> >
> > In my case, I dropped the table and things started
working.
> >
> > So, you might want to give your schema a close
look-see. Especially
> > check for extra tables.
> >
> > I've been meaning to write a Typo database lint
tool... It would ensure
> > that no extra tables exist, all table references
work, no duplicates,
> > etc. Ah, if only I had a bit more time...
> >
> > - Scott
> >
> >
> >
> > _______________________________________________
> > 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
|
|
| Admin posting broken r1139 |

|
2006-07-19 13:10:43 |
This is a database/active record problem, *not* a text
filter problem.
The problem, plain and simple, is that article.text_filter
is supposed
to be a TextFilter object, but instead it's a block of
YAML. I'm not
quite sure how that could happen--it shouldn't ever have
been YAML in
the first place, so it's not like it missed a conversion
step.
Oh, wait--there it is. Your schema is broken. You have a
'text_filter' field in contents; there should only be a
'text_filter_id' field. Back up your db and drop
text_filter, and you
should be okay. Somehow you missed that migration.
Scott
On 7/18/06, Steve Longdo <steve.longdo gmail.com> wrote:
> A little research on populate_html_fields shows it
sprang into
> existence between r1004 and r1033 in the content.rb
model. As near as
> I can see it was always expecting a controller of some
kind and never
> the instance of Content that the ContentObserver(also
r1033) sends in.
>
> 101 def html(controller,what = :all)
> 99 def populate_html_fields(controller)
>
> *sigh* I will into it some more tomorrow, tired now.
>
> On 7/18/06, Steve Longdo <steve.longdo gmail.com> wrote:
> > I've never personally edited my typo table
structure. I do know one
> > of the migrations ran and turned my UTF-8 data
into ASCII. Only
> > because I had some language characters outside the
overlap in the
> > charactersets.
> >
> > I'm suspicious of the change in the
ContentObserver class from 2 weeks
> > ago. It seems to be responsible for populating
the html_fields before
> > a save. I suspect if I remove the commentted line
my body_html field
> > will get populated again.
> >
> > At any rate I show 18 tables. Is that right?
> >
> > mysql> show tables;
> > +-----------------------+
> > | Tables_in_rhesus_typo |
> > +-----------------------+
> > | articles_categories |
> > | articles_tags |
> > | blacklist_patterns |
> > | blogs |
> > | categories |
> > | contents |
> > | notifications |
> > | page_caches |
> > | pings |
> > | redirects |
> > | resources |
> > | schema_info |
> > | sessions |
> > | sidebars |
> > | tags |
> > | text_filters |
> > | triggers |
> > | users |
> > +-----------------------+
> > 18 rows in set (0.00 sec)
> >
> > mysql> desc
contents;+------------------+--------------+------+-----+---
------+----------------+|
> > Field | Type | Null | Key |
Default | Extra
> >
|+------------------+--------------+------+-----+---------+-
---------------+|
> > id | int(11) | | PRI |
NULL |
> > auto_increment || title | varchar(255)
| YES | | NULL
> > | || author |
varchar(255) | YES | |
> > NULL | || body |
text | YES |
> > | NULL | || body_html |
text | YES
> > | | NULL | || extended
| text |
> > YES | | NULL | || excerpt
| text
> > | YES | | NULL | ||
keywords |
> > varchar(255) | YES | | NULL |
|| text_filter
> > | varchar(255) | YES | | NULL |
|| created_at
> > | datetime | YES | | NULL |
||
> > updated_at | datetime | YES | |
NULL |
> > || extended_html | text | YES | |
NULL |
> > || user_id | int(11) | YES |
| NULL |
> > || permalink | varchar(255) | YES
| | NULL |
> > || guid | varchar(255) |
YES | | NULL
> > | || text_filter_id | int(11)
| YES | |
> > NULL | |
> > | whiteboard | text | YES | |
NULL | |
> > | type | varchar(255) | YES | |
NULL | |
> > | article_id | int(11) | YES | MUL |
NULL | |
> > | email | varchar(255) | YES | |
NULL | |
> > | url | varchar(255) | YES | |
NULL | |
> > | ip | varchar(40) | YES | |
NULL | |
> > | blog_name | varchar(255) | YES | |
NULL | |
> > | name | varchar(255) | YES | |
NULL | |
> > | comments_count | int(11) | YES | |
NULL | |
> > | trackbacks_count | int(11) | YES | |
NULL | |
> > | published | tinyint(1) | YES | | 0
| |
> > | allow_pings | tinyint(1) | YES | |
NULL | |
> > | allow_comments | tinyint(1) | YES | |
NULL | |
> > | blog_id | int(11) | | MUL | 0
| |
> > | published_at | datetime | YES | |
NULL | |
> >
+------------------+--------------+------+-----+---------+--
--------------+
> > 31 rows in set (0.00 sec)
> >
> > On 7/18/06, Scott Bronson <bronson rinspin.com> wrote:
> > > On Tue, 2006-07-18 at 21:52 -0500, Steve
Longdo wrote:
> > > > I have an update for some reason the
article.text_filter is returning
> > > > a YAML String instead of a TextFilter
object. This is probably the
> > > > culprit for Trac #1006 as well. I
confirmed this in the console
> > > > loading the saved new post(a) and an
older one that still renders
> > > > correctly(b):
> > >
> > > When I encountered symptoms like this, it's
because my database schema
> > > was hosed. Probably happened when I tried to
fix the migrations 6
> > > months ago. My database had an extra table
that wasn't being used but
> > > had the same name as a variable in the code.
AR wasn't very happy about
> > > that and instantiated YAML strings instead of
objects.
> > >
> > > In my case, I dropped the table and things
started working.
> > >
> > > So, you might want to give your schema a
close look-see. Especially
> > > check for extra tables.
> > >
> > > I've been meaning to write a Typo database
lint tool... It would ensure
> > > that no extra tables exist, all table
references work, no duplicates,
> > > etc. Ah, if only I had a bit more time...
> > >
> > > - Scott
> > >
> > >
> > >
> > >
_______________________________________________
> > > Typo-list mailing list
> > > Typo-list rubyforge.org
> > > http:
//rubyforge.org/mailman/listinfo/typo-list
> > >
> >
> >
> > --
> > Thanks,
> > -Steve
> > http://www.stevelongdo.com
> >
>
>
> --
> Thanks,
> -Steve
> http://www.stevelongdo.com
> _______________________________________________
> 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
|
|
| Admin posting broken r1139 |

|
2006-07-19 22:23:46 |
|
I dropped the text_filter column.
The admin page saves text_filter not text_filter_id. So I can't use filters now.
More confusingly it saves text_filter by name instead of just id. Seems to be some confusion between how contents table and blogs table work. Not sure how you would like this resolved.
On 7/19/06, Scott Laird <sigkill.org">scott sigkill.org> wrote:
This is a database/active record problem, *not* a text filter problem.
The problem, plain and simple, is that article.text_filter is supposed to be a TextFilter object, but instead it's a block of YAML. I'm not
quite sure how that could happen--it shouldn't ever have been YAML in the first place, so it's not like it missed a conversion step.
Oh, wait--there it is. Your schema is broken. You have a 'text_filter' field in contents; there should only be a
'text_filter_id' field. Back up your db and drop text_filter, and you should be okay. Somehow you missed that migration.
Scott
On 7/18/06, Steve Longdo <gmail.com">
steve.longdo gmail.com> wrote: > A little research on populate_html_fields shows it sprang into > existence between r1004 and r1033 in the content.rb model. As near as > I can see it was always expecting a controller of some kind and never
> the instance of Content that the ContentObserver(also r1033) sends in. > > 101 def html(controller,what = :all) > 99 def populate_html_fields(controller) >
> *sigh* I will into it some more tomorrow, tired now. > > On 7/18/06, Steve Longdo <gmail.com">steve.longdo gmail.com> wrote: > > I've never personally edited my typo table structure. I do know one
> > of the migrations ran and turned my UTF-8 data into ASCII. Only > > because I had some language characters outside the overlap in the > > charactersets. > > > > I'm suspicious of the change in the ContentObserver class from 2 weeks
> > ago. It seems to be responsible for populating the html_fields before > > a save. I suspect if I remove the commentted line my body_html field > > will get populated again. > >
> > At any rate I show 18 tables. Is that right? > > > > mysql> show tables; > > +-----------------------+ > > | Tables_in_rhesus_typo | > > +-----------------------+
> > | articles_categories | > > | articles_tags | > > | blacklist_patterns | > > | blogs | > > | categories | > > | contents |
> > | notifications | > > | page_caches | > > | pings | > > | redirects | > > | resources | > > | schema_info |
> > | sessions | > > | sidebars | > > | tags | > > | text_filters | > > | triggers | > > | users |
> > +-----------------------+ > > 18 rows in set (0.00 sec) > > > > mysql> desc contents;+------------------+--------------+------+-----+---------+----------------+| > > Field   | |