# Benachrichtigen Sie den Benutzer über eine defekte URL in seinem Thema

**URL:** https://meta.discourse.org/t/notify-user-of-a-broken-url-in-their-topic/270494
**Category:** Feature
**Created:** [4. Juli 2023 um 09:44 UTC](https://meta.discourse.org/t/notify-user-of-a-broken-url-in-their-topic/270494 "2023-07-04T09:44:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)
#### Post date: [4. Juli 2023 um 09:44 UTC](https://meta.discourse.org/t/notify-user-of-a-broken-url-in-their-topic/270494/1 "2023-07-04T09:44:50Z")

</div>

Dies wurde intern bereits zweimal angefordert. Im Wesentlichen kann es vorkommen, dass eine URL nicht mehr zugänglich ist. Vielleicht hat jemand den Inhalt woandershin verschoben, vielleicht ist die Website komplett geschlossen usw.

Wäre es machbar, einen Benutzer zu benachrichtigen, wenn eine URL in einem seiner Themen einen 404-Fehler zurückgibt?

Ich kann mir vorstellen, dass einige Websites einen API-Schlüssel zum Lesen des jeweiligen Links oder andere Berechtigungsbeschränkungen erfordern, sodass dies berücksichtigt werden müsste. Im Allgemeinen wäre dies jedoch eine sehr nützliche Funktion, um sicherzustellen, dass Inhalte so schnell wie möglich erneuert werden.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [4. Juli 2023 um 12:53 UTC](https://meta.discourse.org/t/notify-user-of-a-broken-url-in-their-topic/270494/2 "2023-07-04T12:53:23Z")

</div>

Hallo Tristan,

Ähnliche Funktionen wurden auch hier mehrfach angefordert:

> [@Find and fix broken links](https://meta.discourse.org/t/find-and-fix-broken-links/120858?u=canapin):
>
> Would it be possible to remove all dead links from the forum?

> [@Broken link management](https://meta.discourse.org/t/broken-link-management/115613?u=canapin):
>
> discourse I’m a member of has broken inter-thread links after porting (twice) from other forum soft. Is there any automated way to find broken links?

> [@How Check and Fix Broken Links?](https://meta.discourse.org/t/how-check-and-fix-broken-links/255338?u=canapin):
>
> Is there any possible way to identify broken links and fix it at the same time?

---

<div class="post-metadata">

### Author: ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)
#### Post date: [4. Juli 2023 um 14:04 UTC](https://meta.discourse.org/t/notify-user-of-a-broken-url-in-their-topic/270494/3 "2023-07-04T14:04:41Z")

</div>

Vielen Dank für die Bereitstellung. Ich habe früher gesucht, muss aber alberne Suchbegriffe verwendet haben.

Dieses Thema sah am interessantesten aus.

> [@How Check and Fix Broken Links?](https://meta.discourse.org/t/how-check-and-fix-broken-links/255338/):
>
> Is there any possible way to identify broken links and fix it at the same time?

Insbesondere Ihr eigener Vorschlag:

> [@Canapin](#):
>
> Die erste Lösung, die mir einfällt, wäre ein Rail-Skript, das die Beitragsinhalte durchläuft, Links findet, sie anfordert, den Statuscode prüft und das tut, was Sie brauchen. Löschen, ersetzen (solche Aktionen erfordern ein erneutes Backen), protokollieren…

Ich bin neugierig, ob es bereits eine interne Tabelle von URLs gibt. Das scheint darauf hinzudeuten:

> [@Find and fix broken links](https://meta.discourse.org/t/find-and-fix-broken-links/120858/4):
>
> Thinking of the topic\_links table? [discourse/app/models/topic\_link.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/app/models/topic_link.rb)
