Can't log in with current release

Hi,

I’ve just created a test project with the current release, used sqlite3
db and used the defaults for the admin user. But radiant doesn’t accept
the admin/radiant combination somehow.

This is the full log for the request:

Processing SiteController#show_page (for 127.0.0.1 at 2007-06-25
20:27:57) [GET]
Parameters: {“url”=>"/", “action”=>“show_page”, “controller”=>“site”}
Redirected to http://localhost:3000/admin/welcome
Completed in 0.04298 (23 reqs/sec) | DB: 0.00400 (9%) | 302 Found
[http://localhost/]

Processing WelcomeController#index (for 127.0.0.1 at 2007-06-25
20:27:57) [GET]
Session ID: 945ad237c74aae03fd934bc8ba00e1f3
Parameters: {“action”=>“index”, “controller”=>“admin/welcome”}
Redirected to http://localhost:3000/admin/pages
Completed in 0.00194 (514 reqs/sec) | DB: 0.00000 (0%) | 302 Found
[http://localhost/admin/welcome]

Processing PageController#index (for 127.0.0.1 at 2007-06-25 20:27:57)
[GET]
Session ID: 945ad237c74aae03fd934bc8ba00e1f3
Parameters: {“action”=>“index”, “controller”=>“admin/page”}
Redirected to http://localhost:3000/admin/login
Filter chain halted as
[#<ActionController::Filters::ClassMethods::SymbolFilter:0x3552118
@filter=:authenticate>] returned false.
Completed in 0.00175 (572 reqs/sec) | DB: 0.00000 (0%) | 302 Found
[http://localhost/admin/pages]

Processing WelcomeController#login (for 127.0.0.1 at 2007-06-25
20:27:57) [GET]
Session ID: 945ad237c74aae03fd934bc8ba00e1f3
Parameters: {“action”=>“login”, “controller”=>“admin/welcome”}
Rendering within layouts/application
Rendering admin/welcome/login
Completed in 0.03685 (27 reqs/sec) | Rendering: 0.02999 (81%) | DB:
0.00611 (16%) | 200 OK [http://localhost/admin/login]

What am I doing wrong? Any clue for me?

Thanks,

Pat

(used Safari 3 and Firefox on OS X)

Just a follow-up, don’t know if it is relevant:

I created the db like this: “rake production db:bootstrap”, but in the
database itself there is no user:

~/stuff/radianttest/db$ sqlite3 production.sqlite3.db
SQLite version 3.3.13
Enter “.help” for instructions
sqlite> select * from users;
sqlite>

Patrick

There is a bug in current release that prevents the default user to be
created when using sqlite3. You can use the Rails console to create a
new
user. Start with http://wiki.radiantcms.org/How_To_Reset_Your_Password
.

Also be careful with sqlite3 version you use:
http://lists.radiantcms.org/pipermail/radiant/2007-June/005302.html

/AITOR

Hello Aitor,

thanks for your answer. The ‘how to reset your password’ procedure
didn’t work right:

user.save!
ActiveRecord::RecordInvalid: Validation failed: Password confirmation
required
from
/opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active_record/validations.rb:764:in
`save_without_transactions!’

user
=> #<User:0x37eab3c @attributes={“name”=>“Administrator”,
“updated_at”=>nil, “created_by”=>0, “lock_version”=>0, “admin”=>true,
“notes”=>nil, “updated_by”=>0, “password”=>“radiant”, “login”=>“admin”,
“developer”=>false, “created_at”=>nil, “email”=>“[email protected]”},
@confirm_password=“radiant”, @errors=#<ActiveRecord::Errors:0x37e2ce8
@base=#<User:0x37eab3c …>,
@errors={“password_confirmation”=>[“required”]}>, @new_record=true>

So I guess I just wait for 0.6.3…

And thanks for the hint to have a look at the sqlite3 version. Mine is
quite old.

Patrick

Aitor Garay-Romero wrote:

I remember doing something like “user.confirm_password = user.password”.
It worked for me.

That’s what I had before. Just didn’t work. I can wait a few days.

Thnx,

Patrick

I remember doing something like “user.confirm_password = user.password”.
It worked for me.

/AITOR

I checked again this with my current sqlite3 version (3.3.7) and now
it’s
working. I didn’t change anything expect the sqlite3 version, so i
assume
that this problem is related to
http://lists.radiantcms.org/pipermail/radiant/2007-June/005302.html.

I started the FAQ page with this issue:

http://wiki.radiantcms.org/FAQ

/AITOR

John W. Long wrote:

Aitor Garay-Romero wrote:

There is a bug in current release that prevents the default user to be
created when using sqlite3.

It works fine with the version I’m using (3.3.7). Could you do a little
investigation on this and see if you can figure out what the problem is
with the source? I’m happy to push changes in, but I’m not experiencing
this problem myself.

When I change setup.rb (lib/radiant) so that the attributes hash in
create_admin_user has an email field as well, the admin user gets
created. (line 39 in setup.rb)

  attributes = {
    :name => name,
    :login => username,
    :password => password,
    :password_confirmation => password,
    :admin => true,
    :email => "[email protected]"
  }

This is of course just a quick workaround.

Patrick

Aitor Garay-Romero wrote:

There is a bug in current release that prevents the default user to be
created when using sqlite3.

It works fine with the version I’m using (3.3.7). Could you do a little
investigation on this and see if you can figure out what the problem is
with the source? I’m happy to push changes in, but I’m not experiencing
this problem myself.


John L.
http://wiseheartdesign.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs