myexperiment-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Myexperiment-discuss] Content-type title error?


From: Linde, A.E.
Subject: [Myexperiment-discuss] Content-type title error?
Date: Sun, 26 Apr 2009 12:40:31 +0100

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]