Why this user keeps showing in review tab without accepted button?

Hello,

A user may register while I switching approval options in admin settings.
Now I get a funny situation :slight_smile:

Her account was actived, the system shows that she was also approved by (noone)
then her account keeps showing in the review tab with only… a delete account button.
And in the review notifications menu, I always got (1) there…

What should I do ???

Could you temporarily enable must_approve_users, approve them, then disable it again?

1 Like

I enable or disable the that mode many times, the result is the same, no “approve” button could be found (although other users are normal, except this user)
I think I need to update in the database somewhere, do you have any suggestion?

1 Like

Ah I think I understand the problem now. The user was created, but the associated reviewable record was not marked as approved.

To fix this you will need the id of the reviewable item. You can get this by clicking on the date on the reviewable item, and the url will look like /review/1234 - 1234 is the number you want.

Then you can open a rails console:

rails c

And type this:

Reviewable.find(1234).update_column(:status, 1)

If you find accessing the database easier, the query would be this:

UPDATE reviewables SET status = 1 WHERE id = 1234

3 Likes

You are the hero!
I opened a rails console and enter the first command, the problem is gone :smiley:

A quick question, how to accessing database like the second command?
I used the “Data Explorer Plugin” but it seemed just query the database, cannot update it.

I’m new to Discourse ^^!

It depends how you’ve installed discourse, but you can do rails dbconsole in the docker container and it should connect you to the database.

3 Likes

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