News: When asking for support, it helps us and you, if you read the Posting Guidelines

Login  |  Register
HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

October 19, 2019, 08:23:29 AM

Login with username, password and session length

Recent

Members
  • Total Members: 3756
  • Latest: Ocean
Stats
  • Total Posts: 189092
  • Total Topics: 20765
  • Online Today: 61
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 1
Guests: 38
Total: 39

Author Topic: Articles link in Profile  (Read 8234 times)

0 Members and 1 Guest are viewing this topic.

Offline SadisticSilence

  • Jr. Member
  • **
  • Posts: 11
Articles link in Profile
« on: June 15, 2011, 05:36:48 AM »
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
Quote
Fatal 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
« Last Edit: June 15, 2011, 02:24:15 PM by SadisticSilence »

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: Articles link in Profile
« Reply #1 on: June 15, 2011, 10:25:24 AM »
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:
Code: [Select]
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:
Code: [Select]
function tp_profile_articles($memID)
{
global $txt, $user_profile, $context, $db_prefix, $settings, $scripturl, $smcFunc;

That should fix the problem.

Offline SadisticSilence

  • Jr. Member
  • **
  • Posts: 11
Re: Articles link in Profile
« Reply #2 on: June 15, 2011, 02:23:57 PM »
That should fix the problem.

It did just that. Thank you!

The page now shows up but returns an error:
Quote
The 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!

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: Articles link in Profile
« Reply #3 on: June 15, 2011, 04:10:50 PM »
Quote
The 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!

Offline SadisticSilence

  • Jr. Member
  • **
  • Posts: 11
Re: Articles link in Profile
« Reply #4 on: June 15, 2011, 05:31:03 PM »
I'll keep reporting them until I'm good enough to post fixes along with them ;)

Offline sydbat

  • Jr. Member
  • **
  • Posts: 15
Re: Articles link in Profile
« Reply #5 on: June 16, 2011, 11:00:33 AM »
This will sound stupid, but...where do I find TPmodules.php? All I can find are the templates.php.

Offline Freddy

  • Code
  • *
  • Posts: 1615
    • AiDreams
Re: Articles link in Profile
« Reply #6 on: June 16, 2011, 11:07:25 AM »
Looks in your sources directory.

Offline sydbat

  • Jr. Member
  • **
  • Posts: 15
Re: Articles link in Profile
« Reply #7 on: June 16, 2011, 11:19:57 AM »
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

Offline ZarPrime

  • Friends
  • *
  • Posts: 4653
Re: Articles link in Profile
« Reply #8 on: June 16, 2011, 04: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

Offline raid

  • Full Member
  • ***
  • Posts: 162
    • http://www.darkforge.it/
Re: Articles link in Profile
« Reply #9 on: July 12, 2011, 02:09:56 PM »
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