TinyPortal

Development => Support => Topic started by: tx3bass on June 25, 2011, 02:13:41 AM

Title: Unknown column '$ID_MEMBER' in 'on clause'
Post by: tx3bass on June 25, 2011, 02:13:41 AM
SMF version: SMF ver. 2.0
TP version: TP ver. here
Default Forum Language: English
Theme name and version: Custom
Browser Name and Version: FF
Related Error messages:Unknown column '$ID_MEMBER' in 'on clause'

When I click on Show latest comments in the user box I get this error
Unknown column '$ID_MEMBER' in 'on clause'
I just upgraded from SM1.14 to 2.0 and upgraded to the latest version of TP
Title: Re: Unknown column '$ID_MEMBER' in 'on clause'
Post by: IchBin on June 25, 2011, 04:57:03 PM
Can you post the full error with the line number and filename that is referenced please? The error doesn't happen here, or I would find out myself. lol
Title: Re: Unknown column '$ID_MEMBER' in 'on clause'
Post by: tx3bass on June 25, 2011, 04:58:46 PM
Unknown column '$ID_MEMBER' in 'on clause'
File: *****/Sources/TPmodules.php
Line: 237
Title: Re: Unknown column '$ID_MEMBER' in 'on clause'
Post by: IchBin on June 25, 2011, 05:15:13 PM
Thank you!

Yep, looks like a mistake on my part.

Find this line in TPmodules.php
LEFT JOIN {db_prefix}tp_data as log ON (log.value = art.id AND log.type = 1 AND log.ID_MEMBER = $ID_MEMBER)

Replace with this line:
LEFT JOIN {db_prefix}tp_data as log ON (log.value = art.id AND log.type = 1 AND log.ID_MEMBER = '.$ID_MEMBER.')
Title: Re: Unknown column '$ID_MEMBER' in 'on clause'
Post by: tx3bass on June 25, 2011, 05:28:41 PM
Template Parse Error!
165: echo '<br /><input name="blockbody' .$context['TPortal']['blockedit']['id']. '" type="radio" value="dl-stats3" ' , $context['TPortal']['blockedit']['body']=='dl-stats3' ? 'checked' : '' , '>'.$txt['tp-module3'];
166: echo '<br /><input name="blockbody' .$context['TPortal']['blockedit']['id']. '" type="radio" value="dl-stats4" ' , $context['TPortal']['blockedit']['body']=='dl-stats4' ? 'checked' : '' , '>'.$txt['tp-module4'];
167: echo '<br /><input name="blockbody' .$context['TPortal']['blockedit']['id']. '" type="radio" value="dl-stats5" ' , $context['TPortal']['blockedit']['body']=='dl-stats5' ? 'checked' : '' , '>'.$txt['tp-module5'];
168: echo '<br /><input name="blockbody' .$context['TPortal']['blockedit']['id']. '" type="radio" value="dl-stats6" ' , $context['TPortal']['blockedit']['body']=='dl-stats6' ? 'checked' : '' , '>'.$txt['tp-module6'].'<br />';
169: }
170: elseif($context['TPortal']['blockedit']['type']=='3'){
171: // userbox type
172:
173:

174: <br />';

175: }
176: elseif($context['TPortal']['blockedit']['type']=='15'){
177: // RSS feed type
178: echo '<br /><input style="width: 95%" name="blockbody' .$context['TPortal']['blockedit']['id']. '" value="' .$context['TPortal']['blockedit']['body']. '"><br /><br />';
Title: Re: Unknown column '$ID_MEMBER' in 'on clause'
Post by: tx3bass on June 25, 2011, 05:32:30 PM
I get Sorry, you are not allowed to post external links. when I try to make the lat post a BBC code
Title: Re: Unknown column '$ID_MEMBER' in 'on clause'
Post by: WillyP on June 25, 2011, 05:44:03 PM
Thanks to the incessant activities of the spammers, we have a mod in place to prevent links in posts, when you are under a certain post count.

I guess you missed this message, which appears when you post:

QuoteNote: We do not allow the newbies user group to post links.
Please type your link out like this if you get an error about it when posting.
"yourdomain dot com"
Title: Re: Unknown column '$ID_MEMBER' in 'on clause'
Post by: tx3bass on June 25, 2011, 05:51:08 PM
I am not trying to post a link I was trying to put the code in a BBC block...
Title: Re: Unknown column '$ID_MEMBER' in 'on clause'
Post by: Lesmond on June 25, 2011, 06:05:24 PM
tx3bass, I have edited your post for you, not sure why you cant post [code][/code] though
Title: Re: Unknown column '$ID_MEMBER' in 'on clause'
Post by: tx3bass on June 25, 2011, 06:09:11 PM
thanks
Title: Re: Unknown column '$ID_MEMBER' in 'on clause'
Post by: IchBin on June 25, 2011, 06:21:43 PM
Did you make some other edit? The edit I gave you does not edit a template. It edits a source file. If you take the edit out, does the forum load again?
Title: Re: Unknown column '$ID_MEMBER' in 'on clause'
Post by: tx3bass on June 25, 2011, 06:32:00 PM
ya that was my fault.  your code did fix it... thanks a lot...
Title: Re: Unknown column '$ID_MEMBER' in 'on clause'
Post by: Lum-chan on July 01, 2011, 05:58:16 PM
Maybe it's a good idea to mark this topic as Solved? Worked for me too
Title: Re: Unknown column '$ID_MEMBER' in 'on clause'
Post by: Martine M on August 02, 2011, 05:47:33 PM
Thanks IchBin I changed  the lines.
Title: Re: Unknown column '$ID_MEMBER' in 'on clause'
Post by: clothahump on January 08, 2012, 02:43:02 PM
Quote from: IchBinâ,,¢ on June 25, 2011, 05:15:13 PM
Thank you!

Yep, looks like a mistake on my part.

Find this line in TPmodules.php
LEFT JOIN {db_prefix}tp_data as log ON (log.value = art.id AND log.type = 1 AND log.ID_MEMBER = $ID_MEMBER)

Replace with this line:
LEFT JOIN {db_prefix}tp_data as log ON (log.value = art.id AND log.type = 1 AND log.ID_MEMBER = '.$ID_MEMBER.')

Got this problem in latest version of TP, lines to change are different to what you have posted here.  :tickedoff:
Title: Re: Unknown column '$ID_MEMBER' in 'on clause'
Post by: IchBin on January 09, 2012, 02:45:02 AM
If you received this error after your upgrade, it is likely that your file did not get replaced as this error was fixed. On line 231 in TPmodules.php it now uses $context['user']['id'] instead of $ID_MEMBER.

Attach your file if you still need assistance.
Title: Re: Unknown column '$ID_MEMBER' in 'on clause'
Post by: clothahump on January 09, 2012, 09:17:59 AM
Looks like I made a mistake, errors were out of date, sorry.
Title: Re: Unknown column '$ID_MEMBER' in 'on clause'
Post by: IchBin on January 09, 2012, 05:13:20 PM
It's a good idea to clear that log and see if you get more. :)
Title: Re: Unknown column '$ID_MEMBER' in 'on clause'
Post by: clothahump on January 09, 2012, 05:18:20 PM
Cleared it earlier and nothing to report yet, normally would be something by now so looks good.