Merge pull request #12208 from MrPetovan/bug/12059-display-not-found
Improve error message when conversation isn't available in Module\Item\Display
This commit is contained in:
commit
5a2a8db21f
|
@ -136,7 +136,7 @@ class Display extends BaseModule
|
|||
}
|
||||
|
||||
if ($item['gravity'] != Item::GRAVITY_PARENT) {
|
||||
$parent = Post::selectFirstForUser($itemUid, $fields, [
|
||||
$parent = Post::selectFirst($fields, [
|
||||
'uid' => [0, $itemUid],
|
||||
'uri-id' => $item['parent-uri-id']
|
||||
], ['order' => ['uid' => true]]);
|
||||
|
@ -249,7 +249,15 @@ class Display extends BaseModule
|
|||
$item = Post::selectFirstForUser($pageUid, $fields, $condition);
|
||||
|
||||
if (empty($item)) {
|
||||
throw new HTTPException\NotFoundException($this->t('The requested item doesn\'t exist or has been deleted.'));
|
||||
$this->page['aside'] = '';
|
||||
throw new HTTPException\NotFoundException($this->t('Unfortunately, the requested conversation isn\'t available to you.</p>
|
||||
<p>Possible reasons include:</p>
|
||||
<ul>
|
||||
<li>The top-level post isn\'t visible.</li>
|
||||
<li>The top-level post was deleted.</li>
|
||||
<li>The node has blocked the top-level author or the author of the shared post.</li>
|
||||
<li>You have ignored or blocked the top-level author or the author of the shared post.</li>
|
||||
</ul><p>'));
|
||||
}
|
||||
|
||||
$item['uri-id'] = $item['parent-uri-id'];
|
||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: 2022.12-dev\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-11-19 07:52-0500\n"
|
||||
"POT-Creation-Date: 2022-11-19 12:01-0500\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -7089,11 +7089,24 @@ msgid ""
|
|||
"<a href=\"/settings/display\">Theme Customization settings</a>."
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Item/Display.php:135 src/Module/Item/Display.php:252
|
||||
#: src/Module/Update/Display.php:55
|
||||
#: src/Module/Item/Display.php:135 src/Module/Update/Display.php:55
|
||||
msgid "The requested item doesn't exist or has been deleted."
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Item/Display.php:253
|
||||
msgid ""
|
||||
"Unfortunately, the requested conversation isn't available to you.</p>\n"
|
||||
"<p>Possible reasons include:</p>\n"
|
||||
"<ul>\n"
|
||||
"\t<li>The top-level post isn't visible.</li>\n"
|
||||
"\t<li>The top-level post was deleted.</li>\n"
|
||||
"\t<li>The node has blocked the top-level author or the author of the shared "
|
||||
"post.</li>\n"
|
||||
"\t<li>You have ignored or blocked the top-level author or the author of the "
|
||||
"shared post.</li>\n"
|
||||
"</ul><p>"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Item/Feed.php:86
|
||||
msgid "The feed for this item is unavailable."
|
||||
msgstr ""
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div id="exception" class="generic-page-wrapper">
|
||||
<img class="hare" src="images/friendica-404_svg_flexy-o-hare.png"/>
|
||||
<h1>{{$title}}</h1>
|
||||
<p>{{$message}}</p>
|
||||
<p>{{$message nofilter}}</p>
|
||||
{{if $thrown}}
|
||||
<pre>{{$thrown}}
|
||||
{{$stack_trace}}
|
||||
|
|
Loading…
Reference in a new issue