Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: chinaren - lokakuu 31, 2019, 12:30:09 IP

Otsikko: Wrong value type sent to the database. Integer expected. (current_board)
Kirjoitti: chinaren - lokakuu 31, 2019, 12:30:09 IP
Hello, me again.


I managed to get rid of my last error by uninstalling a mod, but then I was getting another error.  So I've uninstalled all my mods, but I'm still getting this error:


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

It's in the display.php area, according to the error log, this line:

'current_board' => $board,


I'm not sure where $board is initially defined though.  Any ideas?  Once again, I thank you for your help.  I honestly don't want to reload SMF again, but at this rate...

Otsikko: Re: Wrong value type sent to the database. Integer expected. (current_board)
Kirjoitti: Mick. - lokakuu 31, 2019, 02:03:01 IP
Well since you uninstalled your mods. Replace the display.template.php 8n the default theme with a fresh one from the zip.
Otsikko: Re: Wrong value type sent to the database. Integer expected. (current_board)
Kirjoitti: chinaren - lokakuu 31, 2019, 03:40:08 IP
Thanks for the suggestion, but I suspect the problem isn't actually with the code in Display.php, I think it is the value of $board, set somwhere else. 


I tried replacing Display.php anyway, but it didsn't help, still the same problem. Sigh.
Otsikko: Re: Wrong value type sent to the database. Integer expected. (current_board)
Kirjoitti: skb - marraskuu 01, 2019, 06:44:49 AP
Lainaus käyttäjältä: Mick. - lokakuu 31, 2019, 02:03:01 IP
Replace the display.template.php 8n the default theme with a fresh one from the zip.
Otsikko: Re: Wrong value type sent to the database. Integer expected. (current_board)
Kirjoitti: Arantor - marraskuu 01, 2019, 07:00:59 AP
Queries are never part of the templates, this is a problem higher up the food chain, either in Display, or Load, or any mod that messes about with $board.
Otsikko: Re: Wrong value type sent to the database. Integer expected. (current_board)
Kirjoitti: chinaren - marraskuu 01, 2019, 10:29:51 AP

Lainaus käyttäjältä: skb - marraskuu 01, 2019, 06:44:49 AP
Lainaus käyttäjältä: Mick. - lokakuu 31, 2019, 02:03:01 IPReplace the display.template.php 8n the default theme with a fresh one from the zip.

Yes, sorry, meant that one.



Lainaus käyttäjältä: Arantor - marraskuu 01, 2019, 07:00:59 AP
Queries are never part of the templates, this is a problem higher up the food chain, either in Display, or Load, or any mod that messes about with $board.



That's what it looked like to me, looking at the code and the error message.   Which files initialise this?  Any idea?  I don't know how this has gone awry if I've uninstalled everything.  Unless something didn't uninstall properly.  :'(