MyBB Community Forums

Full Version: Editing Template Gives SQL Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm currently trying to make a change to my member_profile template, but for some reason trying to save changes kicks me to an SQL internal error page now. Even if I try to save the page with the coding already present, I still get the same issue, so it isn't a matter of me adding something in that wasn't there before. Here's the contents of the page:

<html>
<head>
<style>
.admin, .moderator {color: #fff!important;}
</style>
<title>{$mybb->settings['bbname']} - {$lang->profile}</title>
{$headerinclude}
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/report.js?ver=1820"></script>
</head>
<body>
{$header}
<fieldset style="
    background: #35a7ee;
    background: -moz-linear-gradient(top,#35a7ee 0%,#236eac 100%);
    background: -webkit-linear-gradient(top,#35a7ee 0%,#236eac 100%);
    background: linear-gradient(to bottom,#35a7ee 0%,#236eac 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#35a7ee',endColorstr='#236eac',GradientType=0 );
    border-bottom: 2px solid #103e64!important;
    border: 1px solid #103e64;
    color: #fff;
    text-shadow: #103e64 0 -1px 0px;
    padding: 12px;
    margin: 0;
">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="160px" align="center" valign="middle" class="profile_head_mobile">{$avatar}
<br />
<span class="largetext"><strong>{$formattedname}</strong></span>{$online_status}
<br />
<span class="smalltext">{$usertitle}</span></td>
<td valign="middle" align="right">
<span class="profile_awards"></span>
</td>
</tr>
</table>
</fieldset>
<br />

{$awaybit}{$bannedbit}

<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center" class="profile_tables">
<tr>
<td width="50%" valign="top">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td colspan="2" class="thead"><strong>{$lang->users_forum_info}</strong></td>
</tr>
<tr>
<td class="trow1" style="width: 30%;"><strong>{$lang->joined}</strong></td>
<td class="trow1">{$memregdate}</td>
</tr>
<tr>
<td class="trow2"><strong>{$lang->lastvisit}</strong></td>
<td class="trow2">{$memlastvisitdate} ({$location} @ {$location_time})</td>
</tr>
<tr>
<td class="trow1"><strong>{$lang->total_posts}</strong></td>
<td class="trow1">{$memprofile['postnum']} ({$lang->ppd_percent_total}){$findposts}</td>
</tr>
<tr>
<td class="trow2"><strong>{$lang->total_threads}</strong></td>
<td class="trow2">{$memprofile['threadnum']} ({$lang->tpd_percent_total}){$findthreads}</td>
</tr>
<tr>
<td class="trow1"><strong>{$lang->timeonline}</strong></td>
<td class="trow1">{$timeonline}</td>
</tr>
{$referrals}
{$reputation}
{$warning_level}{$newpoints_profile}
</table>
{$contact_details}
<p>
{$signature}{$memprofile['ougc_awards']}
</td>
<td>&nbsp;&nbsp;</td>
<td width="50%" valign="top">
{$profilefields}
<span style="display:none;"></span>
{$modoptions}
{$adminoptions}
<div style="text-align: center">{$buddy_options}{$ignore_options}{$report_options}</div>
</td>
</tr>
</table>

<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center" class="profile_tables_mobile">
<tr>
<td valign="top">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td colspan="2" class="thead"><strong>{$lang->users_forum_info}</strong></td>
</tr>
<tr>
<td class="trow1" style="width: 30%;"><strong>{$lang->joined}</strong></td>
<td class="trow1">{$memregdate}</td>
</tr>
<tr>
<td class="trow2"><strong>{$lang->lastvisit}</strong></td>
<td class="trow2">{$memlastvisitdate} ({$location} @ {$location_time})</td>
</tr>
<tr>
<td class="trow1"><strong>{$lang->total_posts}</strong></td>
<td class="trow1">{$memprofile['postnum']} ({$lang->ppd_percent_total}){$findposts}</td>
</tr>
<tr>
<td class="trow2"><strong>{$lang->total_threads}</strong></td>
<td class="trow2">{$memprofile['threadnum']} ({$lang->tpd_percent_total}){$findthreads}</td>
</tr>
<tr>
<td class="trow1"><strong>{$lang->timeonline}</strong></td>
<td class="trow1">{$timeonline}</td>
</tr>
{$referrals}
{$reputation}
{$warning_level}{$newpoints_profile}
</table>
<p>
{$signature}{$memprofile['ougc_awards']}
{$contact_details}
<p>
{$profilefields}


{$modoptions}
{$adminoptions}
<div style="text-align: center">{$buddy_options}{$ignore_options}{$report_options}</div>
</td>
</tr>
</table>

{$footer}
</body>
</html>

It seems to occur with anything in this area:


<tr>
<td class="trow1"><strong>{$lang->total_posts}</strong></td>
<td class="trow1">{$memprofile['postnum']} ({$lang->ppd_percent_total}){$findposts}</td>
</tr>
<tr>
<td class="trow2"><strong>{$lang->total_threads}</strong></td>
<td class="trow2">{$memprofile['threadnum']} ({$lang->tpd_percent_total}){$findthreads}</td>
</tr>
<tr>
<td class="trow1"><strong>{$lang->timeonline}</strong></td>
<td class="trow1">{$timeonline}</td>
</tr>
If I take this out, the error stops. I just don't know what in this is the problem though nor why, since it's all standard MyBB stuff.
...what's the error?
It turned out that modsecurity was being flagged for some reason if the part I put separately was included. Since that's down to my host in regards to what settings that has, I just disabled it on my server temporarily so I could do the edits I needed.