TheBigK
Well-known member
I've the following thread view template already working on the site. However, when I simply click on 'Save All Changes' button; I get "Internal Server Error" message. That makes me wonder -> if there are errors on the page; why did it not throw any message when I saved it in the past and what's going wrong with it right now?
Splitting the template into two posts (10000 words limit)
Splitting the template into two posts (10000 words limit)
PHP:
<xen:title>{xen:helper threadPrefix, $thread, escaped}{$thread.title}{xen:helper pagenumber, $page}</xen:title>
<xen:h1>{xen:helper threadPrefix, $thread}{$thread.title}</xen:h1>
<xen:description>
{xen:phrase discussion_in_x_started_by_y_date_z,
'forum=<a href="{xen:link forums, $forum}">{$forum.title}</a>',
'name={xen:helper username, $thread}',
'date=<a href="{xen:link threads, $thread}">{xen:datetime $thread.post_date, html}</a>'}
</xen:description>
<xen:navigation>
<xen:breadcrumb source="$nodeBreadCrumbs" />
</xen:navigation>
<xen:container var="$head.canonical">
<link rel="canonical" href="{xen:link 'canonical:threads', $thread, 'page={$page}'}" /></xen:container>
<xen:container var="$head.description">
<meta name="description" content="{xen:helper snippet, $firstPost.message, 155}" /></xen:container>
<xen:container var="$head.openGraph"><xen:include template="open_graph_meta">
<xen:set var="$url">{xen:link 'canonical:threads', $thread}</xen:set>
<xen:set var="$title">{xen:helper threadPrefix, $thread, escaped}{$thread.title}</xen:set>
<xen:set var="$avatar">{xen:helper avatar, $thread, m, 0, 1}</xen:set>
</xen:include></xen:container>
<xen:container var="$bodyClasses">{xen:helper nodeClasses, $nodeBreadCrumbs, $forum}</xen:container>
<xen:container var="$searchBar.thread"><xen:include template="search_bar_thread_only" /></xen:container>
<xen:container var="$searchBar.forum"><xen:include template="search_bar_forum_only" /></xen:container>
<xen:if is="{$canReply}">
<xen:comment><xen:topctrl>
<a href="{xen:link 'threads/reply', $thread}" class="callToAction"><span>{xen:phrase reply_to_thread}</span></a>
</xen:topctrl></xen:comment>
</xen:if>
<xen:require css="thread_view.css" />
<xen:edithint template="message" />
<xen:if is="{$poll}">
<xen:include template="poll_block">
<xen:set var="$options">
<xen:if is="{$poll.canVote}">
<xen:include template="poll_block_vote" />
<xen:else />
<xen:include template="poll_block_result" />
</xen:if>
</xen:set>
</xen:include>
</xen:if>
<xen:if is="{$showPostedNotice}">
<div class="importantMessage">{xen:phrase message_submitted_displayed_pending_approval}</div>
</xen:if>
<xen:set var="$threadStatusHtml">
<xen:if hascontent="true">
<dl class="threadAlerts secondaryContent">
<dt>{xen:phrase thread_status}:</dt>
<xen:contentcheck>
<xen:if is="{$thread.discussion_state} == 'deleted'">
<dd class="deletedAlert">
<span class="icon Tooltip" title="{xen:phrase deleted}" data-tipclass="iconTip"></span>
{xen:phrase removed_from_public_view}</dd>
<xen:elseif is="{$thread.discussion_state} == 'moderated'" />
<dd class="moderatedAlert">
<span class="icon Tooltip" title="{xen:phrase awaiting_moderation}" data-tipclass="iconTip"></span>
{xen:phrase awaiting_moderation_before_being_displayed_publicly}</dd>
</xen:if>
<xen:if is="!{$thread.discussion_open}">
<dd class="lockedAlert">
<span class="icon Tooltip" title="{xen:phrase locked}" data-tipclass="iconTip"></span>
{xen:phrase not_open_for_further_replies}</dd>
</xen:if>
</xen:contentcheck>
</dl>
</xen:if>
</xen:set>
{xen:raw $threadStatusHtml}
<xen:hook name="thread_view_pagenav_before" params="{xen:array 'thread={$thread}'}" />
<div class="pageNavLinkGroup">
<div class="linkGroup SelectionCountContainer">
<xen:if hascontent="true">
<div class="Popup">
<a rel="Menu">{xen:phrase thread_tools}</a>
<div class="Menu">
<div class="primaryContent menuHeader"><h3>{xen:phrase thread_tools}</h3></div>
<ul class="secondaryContent blockLinksList">
<xen:contentcheck>
<xen:if is="{$canEditThread}">
<li><a href="{xen:link 'threads/edit', $thread}" class="OverlayTrigger">{xen:phrase edit_thread}</a></li>
</xen:if>
<xen:if is="{$canDeleteThread}">
<li><a href="{xen:link 'threads/delete', $thread}" class="OverlayTrigger">{xen:phrase delete_thread}</a></li>
</xen:if>
<xen:if is="{$canMoveThread}">
<li><a href="{xen:link 'threads/move', $thread}" class="OverlayTrigger">{xen:phrase move_thread}</a></li>
</xen:if>
<xen:if is="{$deletedPosts}">
<li><a href="{xen:link threads/show-posts, $thread, 'page={$page}'}" class="MessageLoader" data-messageSelector="#messageList .message.deleted.placeholder">{xen:phrase show_deleted_posts}</a></li>
</xen:if>
</xen:contentcheck>
</ul>
<xen:if hascontent="true">
<form action="{xen:link threads/quick-update, $thread}" method="post" class="AutoValidator">
<ul class="secondaryContent blockLinksList checkboxColumns">
<xen:contentcheck>
<xen:if is="{$canLockUnlockThread}">
<li><label><input type="checkbox" name="discussion_open" value="1" class="SubmitOnChange" {xen:checked $thread.discussion_open} />
{xen:phrase open_thread}</label>
<input type="hidden" name="set[discussion_open]" value="1" /></li></xen:if>
<xen:if is="{$canStickUnstickThread}">
<li><label><input type="checkbox" name="sticky" value="1" class="SubmitOnChange" {xen:checked $thread.sticky} />
{xen:phrase sticky}</label>
<input type="hidden" name="set[sticky]" value="1" /></li></xen:if>
</xen:contentcheck>
</ul>
<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
</form>
</xen:if>
<xen:if is="{$thread.canInlineMod}">
<form action="{xen:link inline-mod/thread/switch}" method="post" class="InlineModForm sectionFooter" id="threadViewThreadCheck"
data-cookieName="threads">
<label><input type="checkbox" name="threads[]" value="{$thread.thread_id}" class="InlineModCheck" /> {xen:phrase select_for_thread_moderation}</label>
<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
</form>
</xen:if>
</div>
</div>
</xen:if>
<xen:if is="{$canWatchThread}">
<a href="{xen:link 'threads/watch-confirm', $thread}" class="OverlayTrigger" data-cacheOverlay="false">{xen:if $thread.thread_is_watched, '{xen:phrase unwatch_thread}', '{xen:phrase watch_thread}'}</a>
</xen:if>
</div>
<xen:pagenav link="threads" linkdata="{$thread}"
page="{$page}" perpage="{$postsPerPage}" total="{$totalPosts}"
unreadlink="{$unreadLink}" />
</div>