TinyPortal

Development => Support => Topic started by: saks on September 30, 2011, 02:13:09 PM

Title: Error in TPmodules.php
Post by: saks on September 30, 2011, 02:13:09 PM
Link to my site: http://www.koritssa.ru
SMF version: SMF 2.0
TP version: TP new
Default Forum Language: English
Theme name and version: Impulse
Browser Name and Version: Browser name/version here
Mods installed: Mods listed here
Related Error messages: if i register as user and go to profile>Tinyportal>Articles...>Articles - I have error:

Fatal error: Function name must be a string in /home/saks1/koritssa.ru/docs/Sources/TPmodules.php on line 1120
Title: Re: Error in TPmodules.php
Post by: Skivey on October 02, 2011, 11:35:19 PM
tinyportal dot net/index.php?topic=34090.0

Try this it worked for me
Title: Re: Error in TPmodules.php
Post by: saks on October 03, 2011, 05:54:04 AM
I'am fix it but now get new error:

Database Error
Incorrect parameter count in the call to native function 'FIND_IN_SET'
File: /usr/local/www/data-dist/saks/Sources/TPortalAdmin.php
Line: 1525

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.1, while your database is at version 2.0. The above error might possibly go away if you execute the latest version of upgrade.php.
Title: Re: Error in TPmodules.php
Post by: IchBin on October 03, 2011, 07:42:09 AM
What is the code at that line for you? In fact, please post the whole database call where that code is. I can't remember if I changed something for that or not.
Title: Re: Error in TPmodules.php
Post by: saks on October 03, 2011, 08:15:07 AM
TPortalAdmin.php:

// clean up notices
$request2 =  $smcFunc['db_query']('', '
SELECT id, value5
FROM {db_prefix}tp_variables
WHERE type = {string:type}',
array('type' => 'art_not_approved')
);
if($smcFunc['db_num_rows']($request2) > 0)
{
$ids = array();
while($row = $smcFunc['db_fetch_assoc']($request2))
$ids[$row['id']] = $row['value5'];
$smcFunc['db_free_result']($request2);
}
$request = $smcFunc['db_query']('', '
SELECT id, approved
FROM {db_prefix}tp_articles
WHERE FIND_IN_SET(id, {array_int:ids})',
array('ids' => $ids)
[b][color=red]line 1525 [/color][/b] );
if($smcFunc['db_num_rows']($request) > 0)
{
while($row = $smcFunc['db_fetch_assoc']($request))
{

}
$smcFunc['db_free_result']($request);
}

// check if we have any start values


in error log show :
http://www.paraplanoff.net/index.php?pretty;action=tpadmin&sa=submission

Database error: Incorrect parameter count in the call to native function 'FIND_IN_SET'


SELECT id, approved
FROM smf_tp_articles
WHERE FIND_IN_SET(id, 88, 89)

File: /usr/local/www/data-dist/saks/Sources/TPortalAdmin.php
Line: 1525
Title: Re: Error in TPmodules.php
Post by: IchBin on October 03, 2011, 04:49:27 PM
Change this:
WHERE FIND_IN_SET(id, {array_int:ids})',

To this:
WHERE FIND_IN_SET(id, "{array_int:ids}")',
Title: Re: Error in TPmodules.php
Post by: saks on October 04, 2011, 02:09:24 PM
Grate! It work now! IchBin, thank you for excellent support!