MyBB Community Forums

Full Version: Warning system not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I get this error when i try to warn someone on my forum.
http://cricketlife.net/warnings.php?action=warn&uid=849

Can the developers give me the mysql script to run to fix this. Thanks.
Here you will find the solution.
No this does not work i need the mysql script to replace the tables
can anyone help me plz
(2013-04-15, 07:48 PM)criclover Wrote: [ -> ]can anyone help me plz

do you have any plugins installed ?
No. I recently did a host transfer and some of the mysql files were corrupted.

I have fixed most of them because the developers gave me the mysql script to run to ix the issue. But these are the last two errors i get.

1) MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1146 - Table 'cricketl_db.clmsd_myachievements_ranks' doesn't exist
Query:
SELECT COUNT(rid) as ranks FROM clmsd_myachievements_ranks

2) MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1146 - Table 'cricketl_db.clmsd_warnings' doesn't exist
Query:
SELECT w.wid, w.uid, w.points, u.warningpoints FROM clmsd_warnings w LEFT JOIN clmsd_users u ON (u.uid=w.uid) WHERE expires<1366230401 AND expires!=0 AND expired!=1
Can a developer of mybb help me out with this
Maybe the guy doesn't want you to warn him. Bwahaha! Nah. Just kidding! I am not sure, I had this problem also on my forum until I was messing around and accidentally fixed it. Perhaps do this. Make a demo and copy the warning template (Admin CP >> so on so forth) from the demo, then insert it into your cricketlife.net. I'll try and find the code.

This MAY be the code. Also, before you go putting this into your site, please tell me whether or not you get the error when you click Warn a User or after you put in the number or points (or infraction set) and reason (if any) and then click Warn User.

<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->warning_logs}</title>
{$headerinclude}
</head>
<body>
	{$header}
	<table width="100%" border="0" align="center">
		<tr>
			{$modcp_nav}
			<td valign="top">
				<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
					<tr>
						<td class="thead" colspan="6"><strong>{$lang->warning_logs}</strong></td>
					</tr>
					<tr>
						<td class="tcat" width="15%"><strong>{$lang->warned_user}</strong></td>
						<td class="tcat" width="25%"><strong>{$lang->warning}</strong></td>
						<td class="tcat" width="20%" align="center"><strong>{$lang->date_issued}</strong></td>
						<td class="tcat" width="20%" align="center"><strong>{$lang->expires}</strong></td>
						<td class="tcat" width="15%"><strong>{$lang->issued_by}</strong></td>
						<td class="tcat" width="1%" align="center"><strong>{$lang->details}</strong></td>
					</tr>
					{$warning_list}
				</table>
				{$multipage}
				<br />
				<form action="modcp.php" method="get">
					<input type="hidden" name="action" value="warninglogs" />
					<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
						<tr>
							<td class="thead" colspan="2"><strong>{$lang->filter_warning_logs}</strong></td>
						</tr>
						<tr>
							<td class="trow1" width="25%"><strong>{$lang->filter_warned_user}</strong></td>
							<td class="trow1" width="75%"><input type="text" name="filter[username]" id="username" value="{$mybb->input['filter']['username']}" class="textbox" /></td>
						</tr>
						<tr>
							<td class="trow2" width="25%"><strong>{$lang->filter_issued_by}</strong></td>
							<td class="trow2" width="75%"><input type="text" name="filter[mod_username]" value="{$mybb->input['filter']['mod_username']}" class="textbox" /></td>
						</tr>
						<tr>
							<td class="trow1" width="25%"><strong>{$lang->filter_reason}</strong></td>
							<td class="trow1" width="75%"><input type="text" name="filter[reason]" value="{$mybb->input['filter']['reason']}" class="textbox" /></td>
						</tr>
						<tr>
							<td class="trow2" width="25%"><strong>{$lang->sort_by}</strong></td>
							<td class="trow2" width="75%">
								<select name="filter[sortby]">
									<option value="username"{$sortbysel['username']}>{$lang->username}</option>
									<option value="issuedby"{$sortbysel['issuedby']}>{$lang->issued_by}</option>
									<option value="dateline"{$sortbysel['dateline']}>{$lang->issued_date}</option>
									<option value="expires"{$sortbysel['expires']}>{$lang->expiry_date}</option>
								</select>
								{$lang->in}
								<select name="filter[order]">
									<option value="asc"{$ordersel['asc']}>{$lang->asc}</option>
									<option value="desc"{$ordersel['desc']}>{$lang->desc}</option>
								</select>
								{$lang->order}
							</td>
						</tr>
						<tr>
							<td class="trow1" width="25%"><strong>{$lang->per_page}</strong></td>
							<td class="trow1" width="75%"><input type="text" name="filter[per_page]" value="{$per_page}" class="textbox" /></td>
						</tr>
					</table>
					<br />
					<div align="center">
						<input type="submit" class="button" value="{$lang->filter_warning_logs}" />
					</div>
				</form>
			</td>
		</tr>
	</table>
	{$footer}
<script type="text/javascript" src="jscripts/autocomplete.js?ver=1400"></script>
<script type="text/javascript">
<!--
	if(use_xmlhttprequest == "1")
	{
		new autoComplete("username", "xmlhttp.php?action=get_users", {valueSpan: "username"});
	}
// -->
</script>
</body>
</html>
I get the error when i click warn the user
Try running this in phpmyadmin:

CREATE TABLE IF NOT EXISTS `mybb_warnings` (
  `wid` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uid` int(10) unsigned NOT NULL DEFAULT '0',
  `tid` int(10) unsigned NOT NULL DEFAULT '0',
  `pid` int(10) unsigned NOT NULL DEFAULT '0',
  `title` varchar(120) NOT NULL DEFAULT '',
  `points` int(10) unsigned NOT NULL DEFAULT '0',
  `dateline` bigint(30) NOT NULL DEFAULT '0',
  `issuedby` int(10) unsigned NOT NULL DEFAULT '0',
  `expires` bigint(30) NOT NULL DEFAULT '0',
  `expired` int(1) NOT NULL DEFAULT '0',
  `daterevoked` bigint(30) NOT NULL DEFAULT '0',
  `revokedby` int(10) unsigned NOT NULL DEFAULT '0',
  `revokereason` text NOT NULL,
  `notes` text NOT NULL,
  PRIMARY KEY (`wid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
Pages: 1 2