Deleting group with 404 error

Hello friends. I need to create 93 groups in the forum. I quickly started adding groups. Then when I created a group and clicked on the group link, it gave 404 error. Now this group exists on the groups page but when clicked it gives 404 error. I can’t delete. When I try to create another group, it gives 500 error. I installed discourse as described in the official document… I am using Amazon cloudfront and S3.

1 Like

Hello meikici :wave:

What is your group name/slug? Which languages does your Discourse forum use?

Did you create the groups manually through the interface?

Do you encounter other issues other than with group creation?

Does the issue still happen when using safe mode?

3 Likes

Hello @Canapin :wave:

My forum is in Turkish. There is a Turkish character named group slug. However, since the use of ASCII characters in the URL is active, this is not a problem. There are already other groups that contain Turkish characters. My problem is actually right now: I have two groups that are giving 404 error on the Groups page and I want to delete them. How can I delete?

No problems other than grouping. I can actually create groups now.

1 Like

What are the names and slugs if the groups that don’t work? Are there errors in the logs?

You might deme them in rails something like this.

cd /var/discourse
./launcher enter app
rails c
g=Group.find(123)
g.destroy 
2 Likes

yes there is a record of one of the two groups giving errors in the logs.

ActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_groups_on_name" DETAIL: Key (name)=(İstanbul) already exists. ) app/controll

1 Like

Your issue reminds me a bit of this one with category names:

Not sure at all it’s related, but maybe you can have a look.

4 Likes

I changed the character encoding method but still 404.

1 Like

Can you go in the rails console and do Group.pluck(:id, :name) to return the group names and IDs and see if there’s any oddity?

Alternatively, SELECT id, name FROM groups with data explorer.

3 Likes

With this method I was able to delete one of the two groups giving 404 errors but one is still there. I don’t know the ID of that group and I can’t find it.

How do I find the ID of a group that returns 404?

Did you try this?

1 Like

@pfaffman @Canapin Thanks for your help. I deleted the problematic groups.

2 Likes

That’s good to hear. :+1:

What would be interesting is to know how did you end with duplicate group names (if it was the issue).
They are supposed to be unique and can’t even be renamed to existing ones with rails commands.

Do you remember anything that could have caused this?

Was is somehow the case that you created groups with similar names so that when the special characters were removed it tried to create two groups with the same slug? If so, that’s a bug. If you can say how to replicate it, there is a chance that it can be fixed.

1 Like

I tried to repro something like this, but the group name (which is the slug, as far as I know) must be set before the group is created:

And “must only include numbers, letters, dashes, dots, and underscores”

allowed unicode username characters doesn’t seem to affect the group name, as well as the interface language.

:person_shrugging:

From testing on a different forum, I’m not sure what that setting affects, but enabling unicode usernames does allow group names with unicode characters in them, could that possibly lead to this issue?

There were unicode characters in the group names I created before, and the slug had automatically corrected it. In the groups I created later, I realized that it did not do this.

no, No, I don’t remember. I was too busy adding groups too quickly :slight_smile:

1 Like

Yes that is right. I paid attention to this when I was creating a group.

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