Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Template is missing error could be more helpful

#3141

Output for template missing:

Template is missing

Missing template entries/edit - {:formats=>[:html], :locales=>[:en]} - partial: false.erb in view path /Volumes/37signals/champagne/app/views

Users don't know what that options hash is. And what is "false.erb"?

I'd expect to see something like:

Missing template entries/edit.html.erb in view path /Volumes/37signals/champagne/app/views

Reported by josh · September 3rd, 2009 @ 08:48 PM

State: resolved
Milestone: 3.0.2
Assigned to: Yehuda Katz (wycats) Yehuda Katz (wycats)
Importance: none

Activity

  1. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag set to bugmash
    • Milestone cleared.
    • Assigned user cleared.

    September 25th, 2009 @ 12:35 PM

  2. Felipe Talavera
    Felipe Talavera

    I've been studying the problem.

    It's only present in master, the thing is the find method ActionView::PathSet raise the ActionView::MissingTemplate with the "entries/edit - {:formats=>[:html], :locales=>[:en]} - partial: false.erb" string while the ActionView::MissingTemplate initializer expect only a path for the missing file, because of that the user see the ugly message of above.

    The thing is that the details[:formats] is an array and I'm not sure if it does but can have more than one format and in this case we'll have to change the mensaje format in the initializer, provisionally I changed the rasing in the find to this:

      format = details[:formats].first.to_s
      raise ActionView::MissingTemplate.new(self, "#{prefix}/#{path}.#{format}")
    

    But, I'm not sure if it's a rock solid solution.

    September 26th, 2009 @ 11:09 AM

  3. Felipe Talavera
    Felipe Talavera

    new patch doing the same but without the format instance variable.

    September 26th, 2009 @ 11:51 AM

  4. Dan Pickett
    Dan Pickett

    I'm not sure this approach will work - I think for the message to be effective, we want to know what content type / format the user is requesting.

    September 26th, 2009 @ 05:31 PM

  5. josh
    josh
    • Milestone cleared.
    • Assigned user set to Yehuda Katz (wycats)

    (restored assignment, please don't change this)

    October 4th, 2009 @ 05:28 PM

  6. Rizwan Reza
  7. Yehuda Katz (wycats)
    Yehuda Katz (wycats)
    • State changed from new to resolved

    This output has been improved some.

    February 24th, 2010 @ 07:32 AM

  8. Jeremy Kemper
    Jeremy Kemper
    • Milestone set to 3.0.2
    • Importance changed from to

    October 15th, 2010 @ 11:01 PM