Missing posts after database restore

Hi,

Until I can get the 5.1 series to run, I’m trying to retreat to
5.0.2, which had been working for me. I dropped my old db and
removed the install directory, created new of each, installed using
the gem/installer, stop mongrel, and get a clean restore of the
database (at least no complaints) and I can see all of the data in
both the yaml file and the database itself, but typo says, “No posts
found…” on the blog’s page and the admin interface agrees about no
posts. Usernames, passwords, categories, files, all work.

The only logged message is:

Processing ArticlesController#index (for 172.16.134.244 at 2008-07-31
03:00:40) [GET]
Session ID: 807e93eef31ec4b2fabcfcffe3c4f654
Parameters: {“action”=>“index”, “controller”=>“articles”}
Filter chain halted as
[#<ActionController::Caching::ActionParams::ActionParamCacheFilter:
0xb69a8c2c @actions=[:index, :read, :show, :archives, :view_page]>]
rendered_or_redirected.
Filter chain halted as
[#<ActionController::Filters::ClassMethods::ProcWithCallFilter:
0xb69a8a24 @filter=#<Proc:0xb6f28f80@/opt/typo/vendor/rails/
actionpack/lib/action_controller/filters.rb:657>>] did_not_yield.
Completed in 0.00263 (379 reqs/sec) | Rendering: 0.00021 (7%) | DB:
0.00000 (0%) | 200 OK [http://example.com/bill/blog]

Before I attempted an upgrade I remove the sidebar plug-ins.

Any thoughts on how to convince typo that articles are there or where
to look next?

Thanks,
-Bill

Bill McGonigle, Owner Work: 603.448.4440
BFC Computing, LLC Home: 603.448.1668
[email protected] Cell: 603.252.2606
http://www.bfccomputing.com/ Page: 603.442.1833
Blog: http://blog.bfccomputing.com/
VCard: http://bfccomputing.com/vcard/bill.vcf

For fastest support contact, please follow:
http://bfccomputing.com/support_contact.html

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Bill,

Bill McGonigle wrote:

Until I can get the 5.1 series to run, I’m trying to retreat to 5.0.2,
which had been working for me.

Did you do a rake db:migrate while trying to get 5.1 to work?

I dropped my old db and removed the
install directory, created new of each, installed using the
gem/installer, stop mongrel, and get a clean restore of the database (at
least no complaints) and I can see all of the data in both the yaml file

Which yaml file are you talking about here?

and the database itself, but typo says, “No posts found…” on the
blog’s page and the admin interface agrees about no posts. Usernames,
passwords, categories, files, all work.

[…]

Before I attempted an upgrade I remove the sidebar plug-ins.

Any thoughts on how to convince typo that articles are there or where to
look next?

Did you point the db/database.yml to the right database?

Thanks,
-Bill

Regards,
Matijs.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFImb4zh3TgaXYDPEERAgDKAJ0YFyV6EtJEPIAATZq8yhWhw34EhACfY7pX
wk5UgKDnQUn/8nY4mTWVBxQ=
=UWVw
-----END PGP SIGNATURE-----

Le 31 juil. 08 à 09:24, Bill McGonigle a écrit :

Filter chain halted as

Hello,

first, sorry for not replying faster, I was in holliday and got
internet access only tonight. Trying to answer the pile of mails
that’s waiting for me.

Can you use mysql / pgsql client and do
select * from contents;

What is the output ?

Can you also use
./script/console
Article.count(:all)

Thx
Cheers,
Frédéric


Frédéric de Villamil
[email protected] tel: +33 (0)6 62 19 1337
http://fredericdevillamil.com Typo : http://typosphere.org

On Aug 6, 2008, at 15:40, de Villamil Frédéric wrote:

first, sorry for not replying faster, I was in holliday and got
internet access only tonight. Trying to answer the pile of mails
that’s waiting for me.

not a problem - I’m just returning to my pile of mails too, so sorry
for the delayed reply!

Can you use mysql / pgsql client and do
select * from contents;

What is the output ?

Contents is fully populated! Thank goodness. :slight_smile:

The last ID in the table is 62, and the contents_id_seq is at 63.
That looks pretty consistent.

Can you also use
./script/console
Article.count(:all)

hmmm:

Article.count(:all)
=> 0

On Aug 6, 2008, at 11:07, Matijs van Zuijlen wrote:

Did you do a rake db:migrate while trying to get 5.1 to work?

yes. however I dropped that database and am trying to work with the
backup that was made before upgrading.

I dropped my old db and removed the
install directory, created new of each, installed using the
gem/installer, stop mongrel, and get a clean restore of the
database (at
least no complaints) and I can see all of the data in both the
yaml file

Which yaml file are you talking about here?

Oh, the yaml file that the backup makes.

Did you point the db/database.yml to the right database?

yeah, that part seems fine. I’m getting my authentication, settings,
file uploads, etc.

I’m also getting a stacktrace, I now see. I’ll end this message with
the top of it - I can post more of it if it would be helpful:

Rendering /opt/typo/example.com-blog/public/500.html (500 Internal
Server Error)

Processing CommentsController#index (for 192.16.1.100 at 2008-08-12
01:23:38) [GET]
Parameters: {“format”=>“rss”, “action”=>“index”,
“controller”=>“comments”}

ArgumentError (wrong number of arguments (2 for 1)):
/vendor/rails/activesupport/lib/active_support/option_merger.rb:
14:in find' /vendor/rails/activesupport/lib/active_support/option_merger.rb: 14:insend!’
/vendor/rails/activesupport/lib/active_support/option_merger.rb:
14:in method_missing' /app/controllers/comments_controller.rb:40:inget_feedback’
/vendor/rails/activesupport/lib/active_support/core_ext/object/
misc.rb:48:in with_options' /vendor/rails/activerecord/lib/active_record/associations/ association_proxy.rb:125:insend’
/vendor/rails/activerecord/lib/active_record/associations/
association_proxy.rb:125:in method_missing' /vendor/rails/activerecord/lib/active_record/associations/ association_collection.rb:162:inmethod_missing’
/app/controllers/comments_controller.rb:39:in get_feedback' /app/controllers/feedback_controller.rb:22:inindex’
/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:
131:in call' /vendor/rails/actionpack/lib/action_controller/mime_responds.rb: 131:incustom’
/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:
156:in call' /vendor/rails/actionpack/lib/action_controller/mime_responds.rb: 156:inrespond’
/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:
150:in each' /vendor/rails/actionpack/lib/action_controller/mime_responds.rb: 150:inrespond’
/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:
107:in respond_to' /app/controllers/feedback_controller.rb:12:inindex’
/vendor/rails/actionpack/lib/action_controller/base.rb:1158:in
send' /vendor/rails/actionpack/lib/action_controller/base.rb:1158:inperform_action_without_filters’

-Bill

On Aug 12, 2008, at 01:58, Bill McGonigle wrote:

hmmm:

Article.count(:all)
=> 0

OK, I think I figured out why this result is true. Restoring
from .yaml files sets the ‘type’ field of the Contents table to NULL,
even when the .yaml file contains Article as the type.

e.g.:

  • allow_pings: t
    updated_at: 2008-02-22 15:30:54.125274
    guid: d81ed114-dc11-423b-93da-0c71c771b4c7
    body: |-
    These guys are installing metal pillars so a vehicle can’t get
    into an area to park there.

    Thanks, Dad.
    title: Think Through the Project First
    published: t
    author: bill_mcgonigle
    type: Article
    text_filter_id: “2”
    excerpt:
    id: “22”
    blog_id: “1”
    whiteboard:
    extended: “”
    published_at: 2008-02-22 15:25:00
    user_id: “1”
    state: published
    allow_comments: t
    created_at: 2008-02-22 15:27:26.652014
    keywords: “”

results in:

LOG: statement: INSERT INTO “contents” ("", “”, “”, “”, “”, “”, “”,
“”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”) VALUES
(E’think-through-the-project-first’, NULL, ‘t’, ‘2008-08-21
00:26:06.357497’, E’Think Through the Project First’, E’These guys
are installing metal pillars so a vehicle can’'t get into an area to
park there.

     <img src="http://mcgonigle.us/bill/blog/files/

000801c846a0_d5e95710_6501a8c0.jpeg" height=“75%” width=“75%”>

     Thanks, Dad.', E'd81ed114-dc11-423b-93da-0c71c771b4c7', 't',

NULL, E’bill_mcgonigle’, NULL, 2, 22, 1, E’’, NULL, 1, ‘2008-02-22
15:25:00.000000’, E’’, ‘2008-02-22 15:27:26.652014’, ‘t’, E’published’)

I tried restoring on postgresql and mysql, same result.

I lined up all the fields and only ‘type’ in this table has this
discrepancy.

So, I was able to get things running again with:

UPDATE Contents SET type=‘Article’;

And so far that looks good.

-Bill

On Aug 21, 2008, at 01:55, Bill McGonigle wrote:

Restoring from .yaml files sets the ‘type’ field of the Contents
table to NULL, even when the .yaml file contains Article as the type.

further follow-up: the ‘type’ field of Feedback isn’t restored either.

Since I have trackbacks turned off due to spam abuse (bummerz) I was
simply able to:

UPDATE Feedback SET type = ‘Comment’ ;

to get my comments back as well.

-Bill