# Тема закрыта без системной записи

**URL:** https://meta.discourse.org/t/topic-closed-without-system-record/196813
**Category:** Bug
**Created:** [12.Июль.2021 02:00:42 UTC](https://meta.discourse.org/t/topic-closed-without-system-record/196813 "2021-07-12T02:00:42Z")
**Posts on this page:** 7
**Page:** 3

<div class="post-metadata">

### Author: ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### Post date: [26.Октябрь.2021 07:56:43 UTC](https://meta.discourse.org/t/topic-closed-without-system-record/196813/44 "2021-10-26T07:56:43Z")

</div>

@szhorvat Когда вы в последний раз выполняли обновление через командную строку?

@tshenry Не связано ли это с найденной ошибкой в PostgreSQL?

---

<div class="post-metadata">

### Author: ![szhorvat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/szhorvat/32/154711_2.png) [@szhorvat](https://meta.discourse.org/u/szhorvat)
#### Post date: [26.Октябрь.2021 08:27:52 UTC](https://meta.discourse.org/t/topic-closed-without-system-record/196813/45 "2021-10-26T08:27:52Z")

</div>

> [@IAmGav](#):
>
> @szhorvat когда вы в последний раз делали обновление через командную строку?

Мы используем хостинг от Discourse, поэтому я не могу / не делаю обновления самостоятельно. Я думаю, что оно всегда автоматически обновляется до последней бета-версии.

---

<div class="post-metadata">

### Author: ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### Post date: [26.Октябрь.2021 08:29:47 UTC](https://meta.discourse.org/t/topic-closed-without-system-record/196813/46 "2021-10-26T08:29:47Z")

</div>

Да, ты уже говорил мне об этом 🤦🏼‍♂️

Извини.

Буду ждать ответа от @tshenry

---

<div class="post-metadata">

### Author: ![Osama](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osama/32/98013_2.png) [@Osama](https://meta.discourse.org/u/Osama)
#### Post date: [05.Ноябрь.2021 11:24:19 UTC](https://meta.discourse.org/t/topic-closed-without-system-record/196813/50 "2021-11-05T11:24:19Z")

</div>

Это должно быть исправлено в:

> <https://github.com/discourse/discourse/pull/14824>
>
> Bug report: https://meta.discourse.org/t/topic-closed-without-system-record/1968…13?u=osama.
> 
> Discourse allows regular users to delete their own topics, but to prevent abuse the deletion doesn't take effect immediately and the topic is marked for deletion by closing the topic and editing it to say \`(topic deleted by author)\` (it can be changed via text customizations but this is the default copy).
> 
> If the \`min\_first\_post\_length\` site setting is increased and becomes larger than the length of the default copy, the topic edit won't succeed but it will get closed resulting in a confusing situation where the topic appears to be closed for no reasons.
> 
> This PR skips all validations for the edit that Discourse makes when a topic is marked for deletion by the author.

Шаги для воспроизведения довольно просты, если понять, что происходит 😄 :

1. Как администратор, измените `min_first_post_length` на значение больше 25.

2. Как обычный пользователь, создайте тему и удалите её.

3. Вы ожидаете, что тема будет закрыта и отредактирована с надписью `(topic deleted by author)`, но она будет только закрыта.

Суть проблемы в том, что строка `(topic deleted by author)` короче, чем значение `min_first_post_length`. Когда система пытается отредактировать тему, проверки длины сообщения не позволяют внести изменения, но тема всё равно закрывается, так как это действие выполняется отдельно.

Мое исправление выше обходит все проверки для ревизии, которую система создаёт, когда пользователь удаляет свои сообщения.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [05.Ноябрь.2021 11:29:22 UTC](https://meta.discourse.org/t/topic-closed-without-system-record/196813/51 "2021-11-05T11:29:22Z")

</div>

Это впечатляющая охота за ошибками. 👏🙂

---

<div class="post-metadata">

### Author: ![Osama](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osama/32/98013_2.png) [@Osama](https://meta.discourse.org/u/Osama)
#### Post date: [05.Ноябрь.2021 11:39:35 UTC](https://meta.discourse.org/t/topic-closed-without-system-record/196813/53 "2021-11-05T11:39:35Z")

</div>

Благодаря усилиям всех участников здесь его стало намного проще найти! Думаю, без этой замечательной детективной работы мне бы потребовалось в 2–3 раза больше времени ❤

---

<div class="post-metadata">

### Author: ![Osama](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osama/32/98013_2.png) [@Osama](https://meta.discourse.org/u/Osama)
#### Post date: [15.Ноябрь.2021 11:40:41 UTC](https://meta.discourse.org/t/topic-closed-without-system-record/196813/55 "2021-11-15T11:40:41Z")

</div>

Эта тема была автоматически закрыта через 10 дней. Новые ответы больше не принимаются.

[Предыдущая страница](https://meta.discourse.org/t/topic-closed-without-system-record/196813.md?page=2)
