TinyPortal

Development => Support => Topic started by: neich on June 29, 2011, 04:20:37 PM

Title: Error when managing article permissions
Post by: neich on June 29, 2011, 04:20:37 PM
Link to my site:
SMF version: SMF 2.0
TP version: TP 1.0 RC2
Default Forum Language: spanish_es-utf8
Theme name and version: default
Browser Name and Version: All
Mods installed: Custom forms, Ad managemet
Related Error messages:

Hi,

I'm migrating a 1.1.11 + TP 0.98 forum to the new versions 2.0 + TP 1.0RC2. So far I've managed to move all my stuff, but now I'm having some problems with article permissions. When I want to change what a user can do with TP articles I search for a member, and from his profile I go to TiniPortal->Articles->Settings. But nothing loads and the apache log shows a PHP error:

PHP Fatal error:  Function name must be a string in /smf2/Sources/TPmodules.php on line 1120

The URL that raises this error is http.../smf2/index.php?action=profile;area=tparticles;sa=settings;u=889

So I went to that line and found this:


        $request =  $smcFunc['db_query']('', '


and then I realized that the corresponding function (tp_profile_articles) did not declare smcFunc as global, so I changed:


// articles and comments made by the member
function tp_profile_articles($memID)
{
        global $txt, $user_profile, $context, $db_prefix, $settings, $scripturl;


with this:


// articles and comments made by the member
function tp_profile_articles($memID)
{
        global $txt, $user_profile, $context, $db_prefix, $settings, $scripturl, $smcFunc;


Now a page loads, no error in apache log, but I got a SMF error: "The database value you're trying to insert does not exist: sorting". My SMF+TP skills end here ...

Any hints ?

Thanks in advance
Title: Re: Error when managing article permissions
Post by: IchBin on June 29, 2011, 06:54:14 PM
neich, all of the errors you have posted have already been posted about and likely resolved. If you simply search for the error that you are getting, you should find the answers I've posted several times already. If you get stuck on anything, or can't find an answer please post back.
Title: Re: Error when managing article permissions
Post by: neich on June 29, 2011, 07:07:26 PM
Sorry, I did search but not good enough. You can delete my post.
Title: Re: Error when managing article permissions
Post by: IchBin on June 29, 2011, 07:46:36 PM
No problem. There's no need to delete. You have answered at least one of your questions, which I'm sure will help someone else searching in the future. :)