|
From: | Don Cruickshank |
Subject: | RE: [Myexperiment-discuss] Content-type title error? |
Date: | Sun, 26 Apr 2009 22:55:37 +0100 |
Hi Tony, Second point first – it’s expected that you won’t
see a reference to ‘title’ in the migration when it runs, since it’s
a part of the “create_table(:content_types)” action. From
what you reported, I’m certain that the title field was generated
correctly. For the migration script to create a content_type record with a
null title, there must have been an existing workflow or file with a null “content_type”
field before the migration ran. If you’ve still got a copy of the
database before the migration, then a queries like the following should highlight
where the problem is: SELECT id, title, content_type FROM workflows WHERE
content_type IS NULL; SELECT id, title, content_type FROM blobs WHERE
content_type IS NULL; If you haven’t got the old database or you just want to
fix up the data after migration 76 has run then you should be able to do
something like this to resolve the problem: > ct = ContentType.find(:first) > ct.title = “Taverna 1” > ct.save Repeat the above steps until it doesn’t find one with a
null title. Cheers, Don. From:
address@hidden
[mailto:address@hidden On
Behalf Of David R Newman Hi Tony, Some of the most recent SVN commits have been rationalising the
content-type stuff. So it is quite likely that this is a minor bug that
has been introduced in the course of this work and would have been fixed
shortly anyway. Now you have spotted it, it will certainly be fixed.
David Newman From:
address@hidden
[mailto:address@hidden On
Behalf Of Linde, A.E. The
error I’m getting is with Files and Workflows. With Files, it is in
views/_table.rhtml where the code has changed from
‘blob.content_type’ to ‘blob.content_type.title’:
error text is ‘The error occurred while evaluating nil.title’. No virus
found in this incoming message. |
[Prev in Thread] | Current Thread | [Next in Thread] |