Community create button not being properly disabled.
Issue Summary
After deleting all communities (no matter how many were created) it isn't possible to create new communities after the amount of communities is 0.
Steps to Reproduce
- [optional step] Install a new lemmy instance and create a test community
- Delete all communities
- Try to add a new community
Technical details
The lemmy instance worked pretty well as far as I know. I just figured out there is a community called main, which I don't needed, because I want to create other communities. But after deleting main, I couldn't create new communities and after uninstalling and installing lemmy again, I tried it again to delete all communities and the same issue appeared.
UPDATE 2022-10-12:
Found another bug, which is caused by the bug mentioned above.
If you visit the site of the admin, it shows:
Moderates
The Default Community
Test community on lemmy.utopify.org
Test 123
even if the default community (main) doesn't exist anymore.
Are there any error messages shown? And can you post logs at the time of creating a new community? Using docker-compose logs -f on the server.
docker-compose logs -f
Creating a new community on a fresh install of lemmy (but it doesn't look like it's related to the community, because I added 2 communities and this message was only shown once):
lemmy_1 | 2022-10-12T19:52:28.716097Z INFO HTTP request{http.method=POST http.scheme="http" http.host=lemmy.utopify.org http.target=/inbox otel.kind="server" request_id=0e2cea1a-3073-4465-93d2-97cd8db3c968}:shared_inbox: lemmy_apub::http: Received shared inbox activity {"@context":"https://www.w3.org/ns/activitystreams","id":"https://mastodon.social/users/Tzz#delete","type":"Delete","actor":"https://mastodon.social/users/Tzz","to":["https://www.w3.org/ns/activitystreams#Public"],"object":"https://mastodon.social/users/Tzz","signature":{"type":"RsaSignature2017","creator":"https://mastodon.social/users/Tzz#main-key","created":"2022-10-12T19:51:45Z","signatureValue":"D4gyG4sH0djSda4U5ETUKWCu82NCIN1uc+/X+Dq7AjMOfhujDoEa1HoiL4/bKSm0lx+UdmmEqYWXoyuGKrWU4R4ARRIGy50FtdyZ2Yo4ujoiokHoHZgRHmSxiBiH80g87UNKOBb71iEW3w3gj+qxQY/8cl4D3ccfj+7U6qaUik14lIYPCQiWey+j5a3fXF8z1GTux9Naa8BbO3Y5mJLaqTyAsVDc+e0xEVpr12yM8oxhbA/rpeidSH7OVHr532nCDiVVUqkuJLAI9imxBPR9b80HptMXCIE5L5vpVBHI5K71RrGUSL+ny2YekscTHeMqmxhtRwApNLiFsVbD2AsD7Q=="}}
lemmy_1 | 2022-10-12T19:52:28.719566Z INFO HTTP request{http.method=POST http.scheme="http" http.host=lemmy.utopify.org http.target=/inbox otel.kind="server" request_id=0e2cea1a-3073-4465-93d2-97cd8db3c968}:shared_inbox:receive_activity: lemmy_apub_lib::utils: Fetching remote object https://mastodon.social/users/Tzz
lemmy_1 | 2022-10-12T19:52:28.947383Z WARN Error encountered while processing the incoming HTTP request: lemmy_server::root_span_builder: Fetched remote object https://mastodon.social/users/Tzz which was deleted
lemmy_1 | 0: lemmy_apub::http::receive_activity
lemmy_1 | at crates/apub/src/http/mod.rs:79
lemmy_1 | 1: lemmy_apub::http::shared_inbox
lemmy_1 | at crates/apub/src/http/mod.rs:41
lemmy_1 | 2: lemmy_server::root_span_builder::HTTP request
lemmy_1 | with http.method=POST http.scheme="http" http.host=lemmy.utopify.org http.target=/inbox otel.kind="server" request_id=0e2cea1a-3073-4465-93d2-97cd8db3c968 http.status_code=400 otel.status_code="OK"
lemmy_1 | at src/root_span_builder.rs:16
lemmy_1 | LemmyError { message: None, inner: Fetched remote object https://mastodon.social/users/Tzz which was deleted, context: "SpanTrace" }
Output after deleting an added community:
lemmy_1 | 2022-10-12T19:55:48.125362Z INFO Websocket Request{trace_id=00000000000000000000000000000000}:perform{self=DeleteCommunity { community_id: CommunityId(3), deleted: true, auth: Sensitive }}:send_apub_delete_in_community:send_activity_in_community:send_lemmy_activity: lemmy_apub::activities: Sending activity https://lemmy.utopify.org/activities/delete/91c59751-65ef-4f3a-aa46-b52005d5316a
Output after deleting main (if another community still exists):
lemmy_1 | 2022-10-12T19:56:48.334389Z INFO Websocket Request{trace_id=00000000000000000000000000000000}:perform{self=DeleteCommunity { community_id: CommunityId(2), deleted: true, auth: Sensitive }}:send_apub_delete_in_community:send_activity_in_community:send_lemmy_activity: lemmy_apub::activities: Sending activity https://lemmy.utopify.org/activities/delete/c43234a5-b40c-45b9-9ccb-17eeed0bf1c8
Deleting the last community:
lemmy_1 | 2022-10-12T19:58:08.500250Z INFO Websocket Request{trace_id=00000000000000000000000000000000}:perform{self=DeleteCommunity { community_id: CommunityId(4), deleted: true, auth: Sensitive }}:send_apub_delete_in_community:send_activity_in_community:send_lemmy_activity: lemmy_apub::activities: Sending activity https://lemmy.utopify.org/activities/delete/b7211855-ee87-4a95-9431-4b09d819fd03
There are no communities on the server anymore and after trying to create a new community, docker-compose have no output and only a spinning icon can be seen on the community create website.
FYI: I've edited the first post with an update, because it caused another bug.
These logs are not showing any errors, everything normal.
There are no communities on the server anymore and after trying to create a new community, docker-compose have no output and only a spinning icon can be seen on the community create website.
Sounds like a problem in lemmy-ui then. Check the browser console.
I just tested this on a fresh install. There is a lemmy-ui issue, its not correctly disabling the create button, when you don't provide a name and display name, of the limited number of characters.
But after you do, it does correcly create communities, even after deleting all of them.
I can't replicate this now. It will correctly say both the community title and name are required when you try to submit.