Jump to content
The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades. ×
  • 0

[Ask] on how to fix this "rA Logs"


Frexorie

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   1
  • Joined:  12/18/12
  • Last Seen:  

Hi to all especially to rAthena Staffs,

It's been 3 weeks on finding key words like:
"rA Log error" "Pick Logs" and etc... xD


I would like to ask how to fix this?

345345_zps1966b84d.png

 

 

and also configured these:

		'logdata' => array(
			'char'    => 'Characters',
			//'inter'   => 'Interactions',
			'command' => 'Commands',
			//'branch'  => 'Branches',
			//'chat'    => 'Chat Messages',
			'login'   => 'Logins',
			//'mvp'     => 'MVP',
			//'npc'     => 'NPC',
			'pick'    => 'Item Picks',
			//'zeny'    => 'Zeny'
		),


What went wrong o.o?
Thanks for the future response

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   1
  • Joined:  12/18/12
  • Last Seen:  

It's likely that you don't have a folder called logdata in your modules/ directory, as that's the only time you would see that error. If you -do- have a fodler called logdata, then check to see if you have a file called pick.php inside it.

I have them Sir....

Here's my screenie.

we435_zpsa8e75173.png

 

---------------

And here's the content of my pick.php if ever you would like to check it too

 

<?php
if (!defined('FLUX_ROOT')) exit;

$title = Flux::message('PickLogTitle');

$sql = "SELECT COUNT(id) AS total FROM {$server->logsDatabase}.picklog";
$sth = $server->connection->getStatementForLogs($sql);
$sth->execute();

$paginator = $this->getPaginator($sth->fetch()->total);
$paginator->setSortableColumns(array(
	'time' => 'desc', 'char_id', 'type', 'nameid', 'amount',
	'refine', 'card0', 'card1', 'card2', 'card3', 'map'
));

$col = "time, char_id, type, nameid, amount, refine, card0, card1, card2, card3, map";
$sql = $paginator->getSQL("SELECT $col FROM {$server->logsDatabase}.picklog");
$sth = $server->connection->getStatementForLogs($sql);
$sth->execute();

$picks = $sth->fetchAll();

if ($picks) {
	$charIDs   = array();
	$itemIDs   = array();
	$mobIDs    = array();
	$pickTypes = Flux::config('PickTypes');
	
	foreach ($picks as $pick) {
		$itemIDs[$pick->nameid] = null;
		
		if ($pick->type == 'M' || $pick->type == 'L') {
			$mobIDs[$pick->char_id] = null;
		}
		else {
			$charIDs[$pick->char_id] = null;
		}
		
		if ($pick->card0) {
			$itemIDs[$pick->card0] = null;
		}
		if ($pick->card1) {
			$itemIDs[$pick->card1] = null;
		}
		if ($pick->card2) {
			$itemIDs[$pick->card2] = null;
		}
		if ($pick->card3) {
			$itemIDs[$pick->card3] = null;
		}
		
		$pick->pick_type = $pickTypes->get($pick->type);
	}
	
	if ($charIDs) {
		$ids = array_keys($charIDs);
		$sql = "SELECT char_id, name FROM {$server->charMapDatabase}.`char` WHERE char_id IN (".implode(',', array_fill(0, count($ids), '?')).")";
		$sth = $server->connection->getStatement($sql);
		$sth->execute($ids);

		$ids = $sth->fetchAll();

		// Map char_id to name.
		foreach ($ids as $id) {
			$charIDs[$id->char_id] = $id->name;
		}
	}
	
	require_once 'Flux/TemporaryTable.php';
	
	if ($mobIDs) {
		$mobDB      = "{$server->charMapDatabase}.monsters";
		$fromTables = array("{$server->charMapDatabase}.mob_db", "{$server->charMapDatabase}.mob_db2");
		$tempMobs   = new Flux_TemporaryTable($server->connection, $mobDB, $fromTables);

		$ids = array_keys($mobIDs);
		$sql = "SELECT ID, iName FROM {$server->charMapDatabase}.monsters WHERE ID IN (".implode(',', array_fill(0, count($ids), '?')).")";
		$sth = $server->connection->getStatement($sql);
		$sth->execute($ids);

		$ids = $sth->fetchAll();

		// Map id to name.
		foreach ($ids as $id) {
			$mobIDs[$id->ID] = $id->iName;
		}
	}

	if ($itemIDs) {
		if($server->isRenewal) {
			$fromTables = array("{$server->charMapDatabase}.item_db_re", "{$server->charMapDatabase}.item_db2");
		} else {
			$fromTables = array("{$server->charMapDatabase}.item_db", "{$server->charMapDatabase}.item_db2");
		}
		$tableName = "{$server->charMapDatabase}.items";
		$tempTable = new Flux_TemporaryTable($server->connection, $tableName, $fromTables);
		$shopTable = Flux::config('FluxTables.ItemShopTable');

		$ids = array_keys($itemIDs);
		$sql = "SELECT id, name_japanese FROM {$server->charMapDatabase}.items WHERE id IN (".implode(',', array_fill(0, count($ids), '?')).")";
		$sth = $server->connection->getStatement($sql);
		$sth->execute($ids);

		$ids = $sth->fetchAll();

		// Map nameid to name.
		foreach ($ids as $id) {
			$itemIDs[$id->id] = $id->name_japanese;
		}
	}
	
	foreach ($picks as $pick) {
		if (($pick->type == 'M' || $pick->type == 'L') && array_key_exists($pick->char_id, $mobIDs)) {
			$pick->char_name = $mobIDs[$pick->char_id];
		}
		elseif (array_key_exists($pick->char_id, $charIDs)) {
			$pick->char_name = $charIDs[$pick->char_id];
		}
		
		if (array_key_exists($pick->nameid, $itemIDs)) {
			$pick->item_name = $itemIDs[$pick->nameid];
		}
		if (array_key_exists($pick->card0, $itemIDs)) {
			$pick->card0_name = $itemIDs[$pick->card0];
		}
		if (array_key_exists($pick->card1, $itemIDs)) {
			$pick->card1_name = $itemIDs[$pick->card1];
		}
		if (array_key_exists($pick->card2, $itemIDs)) {
			$pick->card2_name = $itemIDs[$pick->card2];
		}
		if (array_key_exists($pick->card3, $itemIDs)) {
			$pick->card3_name = $itemIDs[$pick->card3];
		}
	}
}

?>
Edited by Frexorie
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  94
  • Reputation:   4
  • Joined:  10/31/12
  • Last Seen:  

As i see you have custom theme applied to your FluxCP. Check folder themes/default/logdata/ (it like default). You must have themes/YOURTHEME/logdata.

Btw, one more thing can be: you disable this type of logs on your server, so maybe database is empty....

Edited by Phenomena
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   1
  • Joined:  12/18/12
  • Last Seen:  

As i see you have custom theme applied to your FluxCP. Check folder themes/default/logdata/ (it like default). You must have themes/YOURTHEME/logdata.

Btw, one more thing can be: you disable this type of logs on your server, so maybe database is empty....

I enabled it before i install the flux :)

Anyways im going to try as you said: -->Check folder themes/default/logdata/ (it like default). You must have themes/YOURTHEME/logdata.

Thank you for the reply ^^V 

Link to comment
Share on other sites

×
×
  • Create New...