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.
Thanks and Regards
David Newman
From:
address@hidden
[mailto:address@hidden On
Behalf Of Linde, A.E.
Sent: 26 April 2009 12:41
To: myexperiment-discuss
Subject: [Myexperiment-discuss] Content-type title error?
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’.
And for Workflows, in the newly added div:
<div class="box_standout" style="text-align: center;
margin-bottom: 1em; font-weight: bold; line-height: 1.5em;">
<% Workflow.count(:all, :group =>
'content_type_id').sort{|x,y| y[1] <=> x[1]}.each do |arr| %>
| <%= pluralize(arr[1],
(h(ContentType.find_by_id(arr[0]).title + " workflow"))) %>
<% end %> | </div>
Again, with the ContentType.find_by_id(arr[0]).title where the error is the
same, ‘The error occurred while evaluating nil.title’.
So far, everything else seems to be working, including my own code additions
(other than in workflows and files, which I can’t check of course).
Is there somewhere that the content-type for workflows and blobs needs to have
a title added? And how do I do so? The db:migrate seemed to all work ok and the
content-type section came up with:
== CreateContentTypes: migrating ==============================================
-- create_table(:content_types)
-> 0.0035s
-- add_column(:workflows, :content_type_id, :integer)
-> 0.1322s
-- add_column(:workflow_versions, :content_type_id, :integer)
-> 0.0108s
-- add_column(:blobs, :content_type_id, :integer)
-> 0.0212s
-- remove_column(:workflows, :content_type)
-> 0.0220s
-- remove_column(:workflow_versions, :content_type)
-> 0.0064s
-- remove_column(:blobs, :content_type)
-> 0.0151s
== CreateContentTypes: migrated (0.4952s) =====================================
So looks ok though cannot see any ‘title’ there.
Any ideas?
Thanks,
Tony.
--
Tony Linde
Project Manager
Department of Physics & Astronomy
University of Leicester
No virus
found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.238 / Virus Database: 270.12.3/2075 - Release Date: 04/22/09
17:25:00