Strange approvals list

I’m not sure what I can do on this topic… There is no Accept or Reject button, but the topic is obviously empty…

The hamburger menu shows one pending:

image

2 Likes

Okay this led me to discover a couple of bugs, both of which are fixed here:

https://github.com/discourse/discourse/commit/111a502231d6f46d1a85acb0cc1bff8c60c1a5e4

11 Likes

OK, how should I get rid of these phantom topics?

Rebuilding now shows these phantoms with additional fields:

image

But still no way to remove them…

Are you familiar with a rails console? You can clear them out with this command:

ReviewableUser.pending.each { |ru| ru.destroy if ru.target.blank? }

In plain english: if there are pending users where the user record is missing, delete them.

6 Likes

OK, two of them failed to delete.

[#<ReviewableUser:0x0000559e07933e60
  id: 1355,
  type: "ReviewableUser",
  status: 0,
  created_by_id: -1,
  reviewable_by_moderator: true,
  reviewable_by_group_id: nil,
  claimed_by_id: nil,
  category_id: nil,
  topic_id: nil,
  score: 6.0,
  potential_spam: true,
  target_id: 1964,
  target_type: "User",
  target_created_by_id: nil,
  payload: {"name"=>nil, "email"=>nil, "username"=>nil},
  version: 0,
  latest_score: Wed, 03 Apr 2019 12:39:14 UTC +00:00,
  created_at: Wed, 03 Apr 2019 12:39:14 UTC +00:00,
  updated_at: Wed, 03 Apr 2019 12:39:14 UTC +00:00>,
 #<ReviewableUser:0x0000559e07933208
  id: 1356,
  type: "ReviewableUser",
  status: 0,
  created_by_id: -1,
  reviewable_by_moderator: true,
  reviewable_by_group_id: nil,
  claimed_by_id: nil,
  category_id: nil,
  topic_id: nil,
  score: 6.0,
  potential_spam: true,
  target_id: 1965,
  target_type: "User",
  target_created_by_id: nil,
  payload: {"name"=>nil, "email"=>nil, "username"=>nil},
  version: 0,
  latest_score: Wed, 03 Apr 2019 17:03:26 UTC +00:00,
  created_at: Wed, 03 Apr 2019 17:03:26 UTC +00:00,
  updated_at: Wed, 03 Apr 2019 17:03:26 UTC +00:00>]

ru.target.blank? is false?

Alright, I removed those two phantom’s by omitting if ru.target.blank?

Now the approvals list windows is clean.

Not sure if I’ve done some ReallyBadThing™ to the system though…

You might have deleted the history of some items, but nothing serious. Glad it all got fixed in the end.

5 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.