SpringAll icon indicating copy to clipboard operation
SpringAll copied to clipboard

People favicon error 500

Open Flaburgan opened this issue 12 years ago • 5 comments

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'

Flaburgan avatar Dec 20 '13 22:12 Flaburgan

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.

jhass avatar Dec 21 '13 08:12 jhass

@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')}" }

qmaruf avatar Jan 15 '14 19:01 qmaruf

public/404.html:5:      <link href="favicon.ico" rel="shortcut icon">

Always grep for app/ lib/ and public/ ;)

jhass avatar Jan 15 '14 19:01 jhass

@MrZYX I think it's not possible to use a view helper in a html file. There is no .erb extension with this file.

qmaruf avatar Jan 16 '14 17:01 qmaruf

Yeah, we have a long (ongoing?) story here, as a quickfix just add the / to make it an absolute path.

jhass avatar Jan 16 '14 18:01 jhass