Delete spammer ui now displays error message, still deletes spammer

On my personal site, I have to delete spam users every few days. Usually I just use the flag -> it's spam -> delete spammer -> yes, delete spammer routine which works fine (even though it is many clicks away…).

Recently it’s started displaying an error - see screenshots. When I close the popups the spam post and spammer have been deleted, so not a critical issue but still… the messaging is confusing!

1 Like

Can you repro this on

Can you have a look at your /logs there may be a message there explaining what failed?

1 Like

Ah. Thanks for the reminder. There is indeed a message in the error log.

view log
Message (10 copies reported)

Failed to process hijacked response correctly : Couldn't find all Topics with 'id': (1024, 1042, 61) [WHERE ("topics"."deleted_at" IS NULL)] (found 1 results, but was looking for 3).


activerecord- `raise_record_not_found_exception!'
activerecord- `find_some_ordered'
activerecord- `find_some'
activerecord- `find_with_ids'
activerecord- `find'
activerecord- `find'
activerecord- `find'
/var/www/discourse/plugins/discourse-events/plugin.rb:297:in `block in activate!'
/var/www/discourse/lib/plugin/instance.rb:341:in `block in on'
/var/www/discourse/lib/discourse_event.rb:14:in `block in trigger'
/usr/local/lib/ruby/2.6.0/set.rb:338:in `each_key'
/usr/local/lib/ruby/2.6.0/set.rb:338:in `each'
/var/www/discourse/lib/discourse_event.rb:13:in `trigger'
/var/www/discourse/app/models/user.rb:1563:in `trigger_user_destroyed_event'
activesupport- `block in make_lambda'
activesupport- `block in conditional'
activesupport- `block in invoke_after'
activesupport- `each'
activesupport- `invoke_after'
activesupport- `run_callbacks'
activesupport- `_run_commit_callbacks'
activerecord- `committed!'
activerecord- `commit_records'
activerecord- `block in commit_transaction'
/usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
activerecord- `commit_transaction'
activerecord- `block in within_new_transaction'
/usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
activerecord- `within_new_transaction'
activerecord- `transaction'
activerecord- `transaction'
/var/www/discourse/app/services/user_destroyer.rb:140:in `optional_transaction'
/var/www/discourse/app/services/user_destroyer.rb:28:in `destroy'
/var/www/discourse/app/controllers/admin/users_controller.rb:388:in `block in destroy'
/var/www/discourse/lib/hijack.rb:56:in `instance_eval'
/var/www/discourse/lib/hijack.rb:56:in `block in hijack'
/var/www/discourse/lib/scheduler/defer.rb:94:in `block in do_work'
rails_multisite-2.1.1/lib/rails_multisite/connection_management.rb:259:in `with_connection'
rails_multisite-2.1.1/lib/rails_multisite/connection_management.rb:61:in `with_connection'
/var/www/discourse/lib/scheduler/defer.rb:89:in `do_work'
/var/www/discourse/lib/scheduler/defer.rb:79:in `block (2 levels) in start_thread'


hostname	discourse-app
process_id	30507
application_version	0ae504aece5fdcf6187cdde82b1c819fbd67a2b8
REQUEST_URI	/admin/users/3601.json
HTTP_USER_AGENT	Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36
username	tobiaseigen
time	6:50 am
delete_posts	true
block_email	true
block_urls	true
block_ip	true
delete_as_spammer	true
context	/t/for-employment/6179
1 Like