TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

March 28, 2024, 08:53:34 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,104
  • Total Topics: 21,212
  • Online today: 212
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 208
  • Total: 209
  • illori

[bugtracker] database errors

Started by Maxâ„¢, April 08, 2010, 10:04:17 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Maxâ„¢

getting errors after i create a new block and try to change it to other block types,  there is old topics about this for previous versions.

index.php?action=tpadmin
Database Error: Out of range value adjusted for column 'pos' at row 1

UPDATE smf_tp_blocks SET pos = 130 WHERE id = 22
Apply Filter: Only show the errors from this file
File: Sources/TPortalAdmin.php
Line: 2260


?action=tpadmin
Database Error: Incorrect integer value: '' for column 'var3' at row 1

UPDATE smf_tp_blocks SET var3 = '' WHERE id = 28
File: Sources/TPortalAdmin.php
Line: 2371

bloc

Which blocktype did you change from - and to what type?

Max

#2
It happens when you add a new block, leaving the title field empty clicking save, when you go back to tp admin blocks section, the block that has "-no title-".  when you try changing the Type to something else, the Database Error: Out of range value adjusted for column 'pos' shows and when you try changing the name of "-no title-" to something else, it saves the name fine but the same error shows.

bloc

I cannot reproduce this, so I am thinking something in database isn't updated from beta4. Possibly the "pos" column in articles table, which should be a INT NOT NULL type.

Max

fixed it in the database to INIT default none
- it worked fine afterwards.

its same so for article categorys.. when you go and create a blank category and click submit, a similar database errors shows up.

Database Error: Incorrect integer value: '' for column 'subtype2' at row 1
INSERT INTO smf_tp_variables
(value1, value2, value3, type ,value4, value5, subtype,value7, value8, subtype2, value9)
VALUES('','0','','category','',0,'','',0,'','')
File: Sources/TPortalAdmin.php
Line: 2044


changed the subtype2 to TinyText Null and it sorted that error also.  :)

bloc

Changing it to TinyTEXT is actually wrong, it should be INT, but the code should have supplied a 0 in the call.

These are both fixed for TP v1.0 beta5.2.

CERDIP2

#6
I had the same problem with creating an article category, using TP v1.0 beta5.2 with SMF 2 RC3.

I found that the VALUES parameters in the query were slightly out of sequence (doesn't take much :-)

So take this from ln# 2051 of sources\TPortalAdmin.php:
VALUES('" . strip_tags($name) . "','".$parent."','','category','',0,'','',0,'','')", __FILE__, __LINE__);

and change it to this:
VALUES('" . strip_tags($name) . "','".$parent."','','category','',0,'','','',0,'')", __FILE__, __LINE__);

and now it works, no mucking with db tables & such :-)