Blacklist patterns

Did I miss the ‘How-to’ on using blacklist patterns in the admin
interface? Is it just regex? I hate regex … it’s a black and
unfathomable art for me :confused:

Gary

When I change to my typo dir (trunk) and try to do a ‘svn up’ it fails
with

svn: Working copy ‘tmp/cache’ is missing or not locked

Of course if I do ‘rm -rf tmp/cache/; svn up’ it’s all good, but I
suspect I shouldn’t have to do that each time. What have I messed up?

Thanks

P

http://fak3r.com - you dont have to kick it

Running Trunk I can now no longer login as admin. I go to /admin and
get the login boxes, enter what I usually do, hit ‘Login’ but it just
refreshes the login page. I thought I’d try to update (notice I still
have the tmp/cache is missing or not locked error) but now I can’t ‘rake
migrate’ either. Is this broken in SVN, or I am missing something on my
end?

[phil@pepe:~/websites/fak3r/typo-svn-trunk]$ svn up
svn: Working copy ‘tmp/cache’ is missing or not locked
[phil@pepe:~/websites/fak3r/typo-svn-trunk]$ rm -rf tmp/cache/
[phil@pepe:~/websites/fak3r/typo-svn-trunk]$ svn up
A tmp/cache
U app/controllers/admin/sidebar_controller.rb
U app/views/admin/sidebar/_active.rhtml
U app/views/admin/sidebar/_actives.rhtml
U app/views/admin/sidebar/index.rhtml

Fetching external item into ‘vendor/rails’
Updated external to revision 4168.

Updated to revision 997.
[phil@pepe:~/websites/fak3r/typo-svn-trunk]$ rake migrate
(in /mnt/backup/pepe/home/phil/websites/fak3r/typo-svn-trunk)
rake aborted!
undefined method `namespace’ for main:Object
./Rakefile:10
[phil@pepe:~/websites/fak3r/typo-svn-trunk]$

Thanks

P

http://fak3r.com - you dont have to kick it

Can you run rake --trace migrate?

You need a newer version of rake 0.70.

On Wed, 5 Apr 2006 08:52:02 -0700, Kevin B. [email protected] wrote:

Can you run rake --trace migrate?

Sure, sorry I didn’t do that before:

[10:59:27] [root@pepe …/fak3r/typo-svn-trunk]# rake --trace migrate
(in /mnt/backup/pepe/home/phil/websites/fak3r/typo-svn-trunk)
rake aborted!
undefined method namespace' for main:Object ./vendor/rails/railties/lib/tasks/databases.rake:1 ./vendor/rails/railties/lib/tasks/rails.rb:4 ./vendor/rails/railties/lib/tasks/rails.rb:4 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in require’
./Rakefile:10
/usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake.rb:1379:in
load_rakefile' /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake.rb:1448:in run’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/bin/rake:7
/usr/local/bin/rake:18
[10:59:33] [root@pepe …/fak3r/typo-svn-trunk]#

P

You might try clearing out the sessions table. Not sure if that is the
problem or not.

Trying run: rake purge_sessions_table

and see if that clears up your problems :slight_smile:

** Ok, I did ‘gem install rake’ and it got me 0.7.1, and now ‘rake
migrate’ works - thanks. Sorry if this is an OS question and not a Typo
question - but FreeBSD only has 0.6.2 available in ports
[FreshPorts -- devel/rubygem-rake: Ruby Make], which is where I
installed it from, what do I mess up if I install it via gem? Thanks

Thanks again Steve for the solution Steve.

** I still have the issue of not being able to login on the site - so I
can’t admin it, add articles, etc. log/production.log in Typo (I ****'d
out the passwd) shows:

Processing AccountsController#login (for 199.249.176.251 at 2006-04-05
13:14:20) [POST]
Session ID: 89eeda5439f5f7259d464b736e5cf645
Parameters: {“user_login”=>“fak3r”, “action”=>“login”,
“controller”=>“accounts”, “user_password”=>“******”, “login”=>“Login
Ã?»”}
Rendering within layouts/accounts
Rendering accounts/login
Completed in 0.01557 (64 reqs/sec) | Rendering: 0.00735 (47%) | DB:
0.00310 (19%) | 200 OK [http://fak3r.com/accounts/login]

Meanwhile Apache says:
199.249.176.251 - - [05/Apr/2006:13:15:59 -0500] “POST /accounts/login
HTTP/1.1” 200 1468 “htt
p://fak3r.com/accounts/login” “Mozilla/5.0 (Windows; U; Windows NT 5.1;
en-US; rv:1.8) Gecko/2
0060321 Firefox/2.0a1”

no access errors - or any others found.

P

As a followup, I just tried logging in via w.blogger (a client based
blog poster) and it failed with ‘Invalid login’ but I was able to grab
this from production.log in Typo:

Processing BackendController#xmlrpc (for 199.249.176.251 at 2006-04-05
15:11:38) [POST]
Parameters: {“action”=>“xmlrpc”, “controller”=>“backend”,
“methodCall”=>{“methodName”=>“blogger.getUsersBlogs”,
“params”=>{“param”=>[{“value”=>{“string”=>“E7F0F69AB4125D811D74C797B11A4DC768E9B2BC”}},
{“value”=>{“string”=>“fak3r”}}, {“value”=>{“string”=>“luna16”}}]}}}

RuntimeError (Invalid login):
/app/apis/typo_web_servicerb:20:in authenticate' /vendor/rails/actionwebservice/lib/action_web_service/invocationrb:163:in call_interceptors’
/vendor/rails/actionwebservice/lib/action_web_service/invocationrb:159:in
call_interceptors' /vendor/rails/actionwebservice/lib/action_web_service/invocationrb:148:in before_invocation’
/vendor/rails/actionwebservice/lib/action_web_service/invocationrb:137:in
perform_invocation' /vendor/rails/actionwebservice/lib/action_web_service/dispatcher/abstractrb:43:in web_service_filtered_invoke’
/vendor/rails/actionwebservice/lib/action_web_service/dispatcher/abstractrb:38:in
web_service_delegated_invoke' /vendor/rails/actionwebservice/lib/action_web_service/dispatcher/abstractrb:57:in web_service_invoke’
/vendor/rails/actionwebservice/lib/action_web_service/dispatcher/abstractrb:22:in
invoke_web_service_request' /vendor/rails/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcherrb:53:in dispatch_web_service_request’
/usr/local/lib/ruby/18/benchmarkrb:293:in measure' /vendor/rails/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcherrb:51:in dispatch_web_service_request’
(eval):1:in xmlrpc' /vendor/rails/actionpack/lib/action_controller/baserb:908:in perform_action_without_filters’
/vendor/rails/actionpack/lib/action_controller/filtersrb:355:in
perform_action_without_benchmark' /vendor/rails/actionpack/lib/action_controller/benchmarkingrb:69:in perform_action_without_rescue’
/usr/local/lib/ruby/18/benchmarkrb:293:in measure' /vendor/rails/actionpack/lib/action_controller/benchmarkingrb:69:in perform_action_without_rescue’
/vendor/rails/actionpack/lib/action_controller/rescuerb:82:in
perform_action' /vendor/rails/actionpack/lib/action_controller/baserb:379:in process_without_filters’
/vendor/rails/actionpack/lib/action_controller/filtersrb:364:in
process_without_session_management_support' /vendor/rails/actionpack/lib/action_controller/session_managementrb:117:in process’
/vendor/rails/railties/lib/dispatcherrb:38:in dispatch' /vendor/rails/railties/lib/webrick_serverrb:115:in handle_dispatch’
/vendor/rails/railties/lib/webrick_serverrb:81:in service' /usr/local/lib/ruby/18/webrick/httpserverrb:104:in service’
/usr/local/lib/ruby/18/webrick/httpserverrb:65:in run' /usr/local/lib/ruby/18/webrick/serverrb:173:in start_thread’
/usr/local/lib/ruby/18/webrick/serverrb:162:in start_thread' /usr/local/lib/ruby/18/webrick/serverrb:95:in start’
/usr/local/lib/ruby/18/webrick/serverrb:92:in start' /usr/local/lib/ruby/18/webrick/serverrb:23:in start’
/usr/local/lib/ruby/18/webrick/serverrb:82:in start' /vendor/rails/railties/lib/webrick_serverrb:67:in dispatch’
/vendor/rails/railties/lib/commands/servers/webrickrb:59
/vendor/rails/activesupport/lib/active_support/dependenciesrb:136:in
`require’
/vendor/rails/railties/lib/commands/serverrb:30
/script/server:3

On Wed, 5 Apr 2006 14:27:12 -0500, Phil C. [email protected] wrote:

[phil@pepe:~/websites/fak3r/typo-svn-trunk]$ rake --trace
`invoke_prerequisites’

it from, what do I mess up if I install it via gem? Thanks
Processing AccountsController#login (for 199.249.176.251 at 2006-04-05
Meanwhile Apache says:

/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in


Typo-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/typo-list


http://fak3r.com - you dont have to kick it

On Wed, 5 Apr 2006 14:22:47 -0500, “Steve L.”
[email protected] wrote:

You might try clearing out the sessions table. Not sure if that is the
problem or not.

Trying run: rake purge_sessions_table

and see if that clears up your problems :slight_smile:

[phil@pepe:~/websites/fak3r/typo-svn-trunk]$ rake --trace
purge_sessions_table
(in /mnt/backup/pepe/home/phil/websites/fak3r/typo-svn-trunk)
** Invoke purge_sessions_table (first_time)
rake aborted!
Don’t know how to build task ‘db:sessions:recreate’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1449:in []' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:364:in invoke_prerequisites’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:in invoke_prerequisites’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in invoke' /usr/local/lib/ruby/1.8/thread.rb:135:in synchronize’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in run’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7
/usr/local/bin/rake:18
[phil@pepe:~/websites/fak3r/typo-svn-trunk]$

On Wed, 5 Apr 2006 15:19:47 -0500, “Steve L.”
[email protected] wrote:

I tried rake purge_sessions_table with rake 0.7.0 installed and it worked
fine. I upgraded rake to 0.7.1 and I am able to duplicate the “Don’t know
how to build task ‘db:sessions:recreate’” error when using rake 0.7.1 on a
Windows XP box!

I would recommend uninstalling rake 0.7.1 and forcing an install of rake
0.7.0. Probably something has changed in the syntax of rakefiles and the
typo rakefile needs to be updated.

This worked, thank you.

You can also manually DELETE * FROM
sessions to clear out the sessions table.

Hmmm…still same error on rake purge_sessions_table with rake 0.7.0!
What else could be bothering that, I did update all my Gems earlier
today.

P

I tried rake purge_sessions_table with rake 0.7.0 installed and it
worked
fine. I upgraded rake to 0.7.1 and I am able to duplicate the “Don’t
know
how to build task ‘db:sessions:recreate’” error when using rake 0.7.1 on
a
Windows XP box!

I would recommend uninstalling rake 0.7.1 and forcing an install of rake
0.7.0. Probably something has changed in the syntax of rakefiles and
the
typo rakefile needs to be updated. You can also manually DELETE * FROM
sessions to clear out the sessions table.

I had an issue awhile back with a banged up migration that prevented me
from
logging into the admin area as well.

I fixed it by opening up a console and resetting my password. I’m pretty
sure you need to hash the password first but I believe the functions you
need are all part of the LoginController.

Kyle H.
[email protected]
www.kyleheon.com

Gary S. [email protected] writes:

Did I miss the ‘How-to’ on using blacklist patterns in the admin
interface? Is it just regex? I hate regex … it’s a black and
unfathomable art for me :confused:

Both Regexps and String patterns. When you create a pattern you should
be able to specify which.

And on further investigation, the Blacklist stuff is crying out to be
refactored. Any time I see a model that’s simply an empty class
declaration it triggers a nervous tic.