Skip to content

crashes when headline is nil #20

Closed

Description

@anders
013-05-03T17:58:49.200892+00:00 app[web.1]: D, [2013-05-03T17:58:49.200677 #12] DEBUG -- :   Feed Load (2.3ms)  SELECT "feeds".* FROM "feeds" WHERE "feeds"."id" = 89 LIMIT 1
2013-05-03T17:58:49.218083+00:00 app[web.1]:    app/views/partials/_story.erb:65528:in `__tilt_19335440'
2013-05-03T17:58:49.218083+00:00 app[web.1]: NoMethodError - undefined method `[]' for nil:NilClass:
2013-05-03T17:58:49.212424+00:00 app[web.1]: D, [2013-05-03T17:58:49.212193 #12] DEBUG -- :   Feed Load (6.6ms)  SELECT "feeds".* FROM "feeds" WHERE "feeds"."id" = 41 LIMIT 1
2013-05-03T17:58:49.218083+00:00 app[web.1]:    /app/app/models/story.rb:7:in `headline'

at least that's what I think the problem is.

Activity

  1. swanson commented on May 3, 2013

    @swanson
    Collaborator

    Sorry about that - could you link me to the feed/story that it was trying to display (it should display as "[untitled]" now)?

    I'd like to fix the parser to handle this in the future. Thanks!

  2. anders commented on May 3, 2013

    @anders
    Author

    Can you provide a SQL query to find it? I ran the ones close to the error in the log, perhaps that will help...

    => SELECT "feeds".* FROM "feeds" WHERE "feeds"."id" = 89;
     id |       name       |                           url                           |    last_fetched     |         created_at         |         updated_at         | status
    ----+------------------+---------------------------------------------------------+---------------------+----------------------------+----------------------------+--------
     89 | Living with IPv6 | http://www.personal.psu.edu/dvm105/blogs/ipv6/index.xml | 2012-06-18 13:34:11 | 2013-05-03 17:14:22.678317 | 2013-05-03 17:15:48.416241 |      0
    (1 row)
    
    => SELECT "feeds".* FROM "feeds" WHERE "feeds"."id" = 41 LIMIT 1;
     id |                  name                   |                              url                               |    last_fetched     |         created_at         |         updated_at         | status
    ----+-----------------------------------------+----------------------------------------------------------------+---------------------+----------------------------+----------------------------+--------
     41 | Finger updates from icculus@icculus.org | http://icculus.org/cgi-bin/finger/finger.pl?user=icculus&rss=1 | 2012-06-08 08:46:59 | 2013-05-03 17:14:22.340416 | 2013-05-03 17:15:19.920867 |      0
    (1 row)
    
  3. swanson commented on May 3, 2013

    @swanson
    Collaborator

    @andersb Sure, try: select permalink from stories where title is null

  4. anders commented on May 3, 2013

    @anders
    Author
    => SELECT "permalink" FROM "stories" WHERE "title" IS NULL;
                     permalink
    --------------------------------------------
     http://udrepper.livejournal.com/22255.html
    (1 row)
    
  5. swanson commented on May 3, 2013

    @swanson
    Collaborator

    Thanks - I'll investigate further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions