Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

comment openid problem #32

hujinpu opened this Issue Mar 25, 2011 · 10 comments


None yet
3 participants

hujinpu commented Mar 25, 2011

I use https://profiles.google.com/hujinpu/ to comment in some post at localhost enki app.

I got the errors:

app/models/comment.rb:30:in `requires_openid_authentication?'
app/controllers/comments_controller.rb:35:in `create'
app/controllers/comments_controller.rb:12:in `index'
NoMethodError in CommentsController#index

You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.index
app/models/comment.rb:30:in `requires_openid_authentication?'
app/controllers/comments_controller.rb:35:in `create'
app/controllers/comments_controller.rb:12:in `index'


xaviershay commented Mar 25, 2011

I'll look into it


xaviershay commented Mar 25, 2011

Comment with a nil author does not require openid authentication. Closed by 3a29c02.

@xaviershay xaviershay closed this Mar 25, 2011


xaviershay commented Mar 25, 2011

I have made it not raise, but it may still not work with your open id. Please try again and let me know.

hujinpu commented Mar 25, 2011

I use hjp.myopenid.com to comment it. (localhost:3000)

Also get the same errors.

I only change rails 3.0.4 to 3.0.5 in Gemfile, and use sqlite as database.

hujinpu commented Mar 25, 2011

My ruby is ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.6.0]

==> bundle
Using rake (0.8.7)
Using RedCloth (4.2.7)
Using aaronh-chronic (0.3.9)
Using abstract (1.0.0)
Using activesupport (3.0.5)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.5)
Using erubis (2.6.6)
Using rack (1.2.2)
Using rack-mount (0.6.13)
Using rack-test (0.5.7)
Using tzinfo (0.3.25)
Using actionpack (3.0.5)
Using mime-types (1.16)
Using polyglot (0.3.1)
Using treetop (1.4.9)
Using mail (2.2.15)
Using actionmailer (3.0.5)
Using arel (2.0.9)
Using activerecord (3.0.5)
Using activeresource (3.0.5)
Using archive-tar-minitar (0.5.2)
Using bundler (1.0.10)
Using coderay (0.9.7)
Using columnize (0.3.2)
Using diff-lcs (1.1.2)
Using json (1.5.1)
Using gherkin (2.3.5)
Using term-ansicolor (1.0.5)
Using cucumber (0.10.2)
Using nokogiri (1.4.4)
Using cucumber-rails (0.4.0)
Using factory_girl (1.3.3)
Using formtastic (1.2.3)
Using hpricot (0.8.4)
Using lesstile (1.0.1)
Using ruby_core_source (0.1.4)
Using linecache19 (0.5.11)
Using ruby-openid (2.1.8)
Using rack-openid (1.3.1)
Using thor (0.14.6)
Using railties (3.0.5)
Using rails (3.0.5)
Using rspec-core (2.5.1)
Using rspec-expectations (2.5.0)
Using rspec-mocks (2.5.0)
Using rspec (2.5.0)
Using rspec-rails (2.5.0)
Using ruby-debug-base19 (0.11.24)
Using ruby-debug19 (0.11.6)
Using sqlite3 (1.3.3)
Using sqlite3-ruby (1.3.3)
Using webrat (0.7.3)
Using will_paginate (3.0.pre2)

hujinpu commented Mar 25, 2011

Sorry, I just saw your change.

  • !!self.author.index(".")
  • !!self.author.try(:index, '.')

I will try it later.

hujinpu commented Mar 25, 2011

Also can't work.

I detete OpenID delegate

# Configuration options for your blog - customise to taste
# This file contains no secret information, so can be stored in source control (unlike database.yml)
title: My Enki Blog
url:   http://enkiblog.com
  name:    Don Alias        # For copyright notice and ATOM feeds
  email:   don@enkiblog.com # Exception emails will go here, and it is used in ATOM feeds
  open_id:                  # These are used to login to the admin area
      - http://enkiblog.com
      - http://secondaryopenid.com

# Delete the following section if your site will not be acting as an OpenID delegate (http://wiki.openid.net/Delegation)
# If you're deploying with mongrel, make sure you read http://rhnh.net/2008/04/13/nginx-openid-delegation-and-yadis
# open_id_delegation:
#   server:   http://www.myopenid.com/server
#   delegate: http://username.myopenid.com

Started POST "/2011/03/16/sadfasdfx23/comments" for at 2011-03-25 15:49:17 +0800
  Processing by CommentsController#index as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"qvyIXCGfasXrX4h3h1G1anSuV0rGjjnX80PSDDtsbHo=", "comment"=>{"author"=>"https://profiles.google.com/hujinpu/", "body"=>"asaasf"}, "commit"=>"Add Comment", "year"=>"2011", "month"=>"03", "day"=>"16", "slug"=>"sadfasdfx23"}
  Post Load (0.3ms)  SELECT "posts".* FROM "posts" WHERE "posts"."slug" = 'sadfasdfx23'
Completed 401 Unauthorized in 97ms
WARNING: making https request to https://profiles.google.com/hujinpu/ without verifying server certificate; no CA path was specified.
WARNING: making https request to https://www.google.com/accounts/o8/id?source=profiles&id=https%3A%2F%2Fprofiles.google.com%2Fhujinpu without verifying server certificate; no CA path was specified.
WARNING: making https request to https://www.google.com/accounts/o8/ud?source=profiles without verifying server certificate; no CA path was specified.
Generated checkid_setup request to https://www.google.com/accounts/o8/ud?source=profiles with assocication AOQobUe9YSYSWfWUkPnZaYMlPXePVUt4qs4dgWGzIprDoynKjRhbUysi

panth0r commented Jul 21, 2011

Hey Xavier, hope this is related; however if you believe otherwise, I'll be happy to start a new issue, but the following is happening on my 'blog running on Heroku when using an OpenID (different from the author of the 'blog post):

"Comment not added!

Please provide your name or OpenID identity URL
Please comment"

I was hoping to use this as a learning experience, but cannot find the source, it seems as though both an author and body error are occurring as though the comment is becoming lost somewhere between the form, preview and writing to the database. This problem only occurs when using OpenID's.

Thanks for any help (even if I'm made a fool of!).

The blog is hosted on Heroku at the following address: http://panth0r.heroku.com/


xaviershay commented Jul 22, 2011

yeah make a new issue, you're not the only one to have that problem (see the mailing list), it's not related to this one. I've just been slack and haven't investigated yet :/

panth0r commented Jul 22, 2011

Thanks, will do.

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