TinyPortal

Development => Support => Installation => Topic started by: Norbesz on June 18, 2011, 10:40:25 AM

Title: Wrong value type sent to the database. Integer expected.
Post by: Norbesz on June 18, 2011, 10:40:25 AM
Hello everyone!
I created an article and I filled it in the introductory text part.  But if I click it it read this mistake in the future then I receive it

Wrong value type sent to the database. Integer expected. (page)

What may be the trouble?
Thanks...
Title: Re: Wrong value type sent to the database. Integer expected.
Post by: SadisticSilence on June 18, 2011, 03:56:06 PM
I've noticed this happens only when you fill in the Query Title field.

If you leave that blank, your article will show up. At least until there's a fix
Title: Re: Wrong value type sent to the database. Integer expected.
Post by: tamasir on June 18, 2011, 04:48:26 PM
Is this mistake at others?
Will he be repaired?
tamasir~
Title: Re: Wrong value type sent to the database. Integer expected.
Post by: IchBin on June 18, 2011, 09:44:14 PM
It really helps if you guys post the info we put on the create topic page. I can't give any answers unless you provide that info. Thanks
Title: Re: Wrong value type sent to the database. Integer expected.
Post by: tamasir on June 19, 2011, 01:57:16 PM
Quote from: IchBinâ,,¢ on June 18, 2011, 09:44:14 PM
It really helps if you guys post the info we put on the create topic page. I can't give any answers unless you provide that info. Thanks
SMF version: SMF2.0
TP version: TP 1.0RC2
Default Forum Language: Hungarian
Theme name and version: Fire Rock (convert:Tinyportal-eu)
Links url Smf-Tinyportal test Site (http://www.smf-test.tinyportal.eu/)
Thanks...IchBin
Title: Re: Wrong value type sent to the database. Integer expected.
Post by: IchBin on June 19, 2011, 06:25:35 PM
I need the full error guys. The line number as well so I can see what you guys are seeing...

--edit--

Actually I found it.

Find this in TPortal.php
if(is_numeric($pag))
$request = $smcFunc['db_query']('', '
SELECT id_theme FROM {db_prefix}tp_articles
WHERE id = {int:page}',
array('page' => $pag)
);
else
$request =  $smcFunc['db_query']('', '
SELECT id_theme FROM {db_prefix}tp_articles
WHERE shortname = {int:page}',
array('page' => $pag)
);


Replace with:
if(is_numeric($pag))
$request = $smcFunc['db_query']('', '
SELECT id_theme FROM {db_prefix}tp_articles
WHERE id = {int:page}',
array('page' => $pag)
);
else
$request =  $smcFunc['db_query']('', '
SELECT id_theme FROM {db_prefix}tp_articles
WHERE shortname = {string:page}',
array('page' => $pag)
);
Title: Re: Wrong value type sent to the database. Integer expected.
Post by: tamasir on June 19, 2011, 08:30:15 PM
IchBinâ,,¢
The mistake a message ceased. The article appeared.
Thanks, thanks..... O0
tamasir~ (TinyPortal.Eu Team)
Title: Re: Wrong value type sent to the database. Integer expected.
Post by: mrph on June 26, 2011, 02:46:38 PM
Yes, its working.

Thanks :)