People favicon error 500
I found this error in the diaspora-fr.org log:
Started GET "/people/7ed1555bc6ae03db/photos/41293" for ::ffff:90.84.145.77 at 2013-12-20 16:15:12 +0100
Processing by PhotosController#show as HTML
Parameters: {"person_id"=>"7ed1555bc6ae03db", "id"=>"41293"}
Completed 404 Not Found in 122.4ms
ActiveRecord::RecordNotFound (ActiveRecord::RecordNotFound):
app/controllers/photos_controller.rb:17:in `show'
lib/rack/chrome_frame.rb:39:in `call'
lib/unicorn_killer.rb:35:in `call'
Started GET "/people/7ed1555bc6ae03db/photos/favicon.ico" for ::ffff:90.84.145.77 at 2013-12-20 16:15:13 +0100
Processing by PhotosController#show as
Parameters: {"person_id"=>"7ed1555bc6ae03db", "id"=>"favicon"}
Completed 500 Internal Server Error in 0.6ms
NoMethodError (undefined method `html?' for nil:NilClass):
lib/rack/chrome_frame.rb:39:in `call'
lib/unicorn_killer.rb:35:in `call'
That should be easy to fix, somewhere we seem to use a relative path to favicon.ico instead of going to a proper Rails helper like favicon_link_tag or at least the absolute path.
@Flaburgan What are the steps to reproduce this issue? @MrZYX I haven't understood you solution clearly but searched all files using "grep -r "favicon" diaspora/". There is one result having favicon and it seems good to me.
*File Name: diaspora/app/views/layouts/application.html.haml *Line:: 17 *Code: %link{:rel => 'shortcut icon', :href => "#{image_path('favicon.png')}" }
public/404.html:5: <link href="favicon.ico" rel="shortcut icon">
Always grep for app/ lib/ and public/ ;)
@MrZYX I think it's not possible to use a view helper in a html file. There is no .erb extension with this file.
Yeah, we have a long (ongoing?) story here, as a quickfix just add the / to make it an absolute path.