News: Welcome to the TinyPortal Support site.

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

December 06, 2019, 09:11:42 AM

Login with username, password and session length

Recent

Members
Stats
  • Total Posts: 189265
  • Total Topics: 20774
  • Online Today: 365
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 1
Guests: 56
Total: 57

Author Topic: Wrong value type sent to the database. Integer expected.  (Read 5714 times)

0 Members and 1 Guest are viewing this topic.

Offline Norbesz

  • Jr. Member
  • **
  • Posts: 16
    • TinyPortal.EU
Wrong value type sent to the database. Integer expected.
« on: June 18, 2011, 03: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...
« Last Edit: June 22, 2011, 03:29:26 PM by norbi06 »

Offline SadisticSilence

  • Jr. Member
  • **
  • Posts: 11
Re: Wrong value type sent to the database. Integer expected.
« Reply #1 on: June 18, 2011, 08:56:06 AM »
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

Offline tamasir

  • Beta Tester
  • *
  • Posts: 212
    • TinyPortal.Eu
Re: Wrong value type sent to the database. Integer expected.
« Reply #2 on: June 18, 2011, 09:48:26 AM »
Is this mistake at others?
Will he be repaired?
tamasir~

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: Wrong value type sent to the database. Integer expected.
« Reply #3 on: June 18, 2011, 02: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

Offline tamasir

  • Beta Tester
  • *
  • Posts: 212
    • TinyPortal.Eu
Re: Wrong value type sent to the database. Integer expected.
« Reply #4 on: June 19, 2011, 06:57:16 AM »
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
Thanks...IchBin

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: Wrong value type sent to the database. Integer expected.
« Reply #5 on: June 19, 2011, 11:25:35 AM »
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
Code: [Select]
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:
Code: [Select]
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)
);

Offline tamasir

  • Beta Tester
  • *
  • Posts: 212
    • TinyPortal.Eu
Re: Wrong value type sent to the database. Integer expected.
« Reply #6 on: June 19, 2011, 01:30:15 PM »
IchBinâ„¢
The mistake a message ceased. The article appeared.
Thanks, thanks..... O0
tamasir~ (TinyPortal.Eu Team)

Offline mrph

  • Jr. Member
  • **
  • Posts: 31
Re: Wrong value type sent to the database. Integer expected.
« Reply #7 on: June 26, 2011, 07:46:38 AM »
Yes, its working.

Thanks :)