TinyPortal

Development => Feedback => Bugs/Errors => Topic started by: SadisticSilence on June 15, 2011, 12:36:48 PM

Title: Articles link in Profile
Post by: SadisticSilence on June 15, 2011, 12:36:48 PM
Link to my site: localhost
SMF version: 2.0
TP version: 1.0 RC2
Theme name and version: Curve
Mods installed: None

When I try to view articles from Profile > TinyPortal > Articles, all I get is a blank page.
At first, I thought it might have been a problem with my install/WAMP but I notice it's also a problem on this site.
http://www.tinyportal.net/index.php?action=profile;area=tparticles;u=53944
QuoteFatal error: Function name must be a string in /home/tinyport/public_html/Sources/TPmodules.php on line 1120

The other links (Portal Summary, Uploaded Files, View Shouts) all work fine.
I've tried it with a fresh install of both SMF and TP with the same results

Anybody have any thoughts? I'm still dipping my toes in to PHP so I'm a bit out of my league
Title: Re: Articles link in Profile
Post by: IchBin on June 15, 2011, 05:25:24 PM
Yep, this is a bug resulting from the db query change for SMF2 that I did in TP. If you open TPmodules.php and go to about line #1105 and find this code:
function tp_profile_articles($memID)
{
global $txt, $user_profile, $context, $db_prefix, $settings, $scripturl;


You can then add $smcFunc to the global line like this:
function tp_profile_articles($memID)
{
global $txt, $user_profile, $context, $db_prefix, $settings, $scripturl, $smcFunc;


That should fix the problem.
Title: Re: Articles link in Profile
Post by: SadisticSilence on June 15, 2011, 09:23:57 PM
Quote from: IchBinâ,,¢ on June 15, 2011, 05:25:24 PM
That should fix the problem.

It did just that. Thank you!

The page now shows up but returns an error:
QuoteThe database value you're trying to insert does not exist: sorting

I can live with that. I'd rather have the page render with an error displayed than nothing at all.
It also gives me something to work with so I can play around with it myself :P

Again, thanks!
Title: Re: Articles link in Profile
Post by: IchBin on June 15, 2011, 11:10:50 PM
QuoteThe database value you're trying to insert does not exist: sorting

In TPmodules.php find this on line #1161
ORDER BY art.{raw:sorting} DESC LIMIT {int:start}, 10',

Change sorting to sort:
ORDER BY art.{raw:sort} DESC LIMIT {int:start}, 10',

Thanks for reporting this stuff!
Title: Re: Articles link in Profile
Post by: SadisticSilence on June 16, 2011, 12:31:03 AM
I'll keep reporting them until I'm good enough to post fixes along with them ;)
Title: Re: Articles link in Profile
Post by: sydbat on June 16, 2011, 06:00:33 PM
This will sound stupid, but...where do I find TPmodules.php? All I can find are the templates.php.
Title: Re: Articles link in Profile
Post by: Freddy on June 16, 2011, 06:07:25 PM
Looks in your sources directory.
Title: Re: Articles link in Profile
Post by: sydbat on June 16, 2011, 06:19:57 PM
Quote from: Freddy on June 16, 2011, 06:07:25 PM
Looks in your sources directory.
Thank you!

Also, thank you IchBinâ,,¢ for the solution!!

Just to let you guys know, it seems that this same error is on this site as well...unless it has something to do with my newb status... :D
Title: Re: Articles link in Profile
Post by: ZarPrime on June 16, 2011, 11:09:07 PM
sydbat,

No, the error is still here on this site.  Any quick fixes that we might give out for new bugs may not yet be in the code yet, nor applied to this site, but we are making notes and these fixes will be added in.  Thanks for reporting them.

ZarPrime
Title: Re: Articles link in Profile
Post by: raid on July 12, 2011, 09:09:56 PM
for me with this fix it's working, I love to fix small bugs  :D

thx for your work guys