TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 18, 2024, 01:35:07 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 180
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 160
  • Total: 160

Articles link in Profile

Started by SadisticSilence, June 15, 2011, 12:36:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SadisticSilence

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

IchBin

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.

SadisticSilence

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!

IchBin

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!

SadisticSilence

I'll keep reporting them until I'm good enough to post fixes along with them ;)

sydbat

This will sound stupid, but...where do I find TPmodules.php? All I can find are the templates.php.

Freddy

Looks in your sources directory.

sydbat

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

ZarPrime

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

raid

for me with this fix it's working, I love to fix small bugs  :D

thx for your work guys
SMF 2.0 + TP RC2