Thread Like Summary
Gizmo, isaac
Total Likes: 2
Original Post (Thread Starter)
#263989 07/14/2020 12:25 AM
by FREAK
FREAK
When trying to create a new topic for this upcoming football season if there is one I am running into issues.

I go to CP click on add new forum, the screen pops up as it always does. I type in the forum name Bad Man 2020 and list it with the parent of contests and then click on add new forum.

I get this error

Script: /home/freaksfo/public_html/admin/docreateforum.php
Line: 129
SQL Error: Incorrect integer value: 'usedefault' for column 'FORUM_STYLE' at row 1
SQL Error: 1366

Query:
INSERT INTO
ubbt_FORUMS
(FORUM_TITLE, FORUM_DESCRIPTION, FORUM_DEFAULT_TOPIC_AGE, FORUM_CUSTOM_HEADER, FORUM_STYLE, FORUM_IMAGE,
FORUM_IS_ACTIVE, CATEGORY_ID, FORUM_POSTS, FORUM_TOPICS, FORUM_CREATED_ON, FORUM_LAST_POST_TIME, FORUM_LAST_POSTER_ID, FORUM_LAST_POST_ID,
FORUM_PARENT, FORUM_ISLAND_INSERT, FORUM_IS_RSS, FORUM_RSS_TITLE, FORUM_SHOW_INTRO, FORUM_INTRO_TITLE,
FORUM_IS_TEASER, FORUM_IS_GALLERY, FORUM_POSTS_COUNT, FORUM_ACTIVE_POSTS, FORUM_SORT_FIELD, FORUM_SORT_DIR)
VALUES
('Bad Man 2020', '', '0', 0, 'usedefault', '', 1, 41, 0, 0, 1594685980, 0, 0, 0, '0', 0, 0, 'RSS Feed for Bad Man 2020', 0, '', 0, 0, 1, '0', 'last', 'desc')

When trying to remove an old forum such as NHL Expert, I go through the normal steps and get this error. It's the same for any forum I try to delete but a different forum Id.

Script: /home/freaksfo/public_html/admin/dodeleteforum.php
Line: 38
SQL Error: Truncated incorrect DOUBLE value: 'New Forum Template'
SQL Error: 1292

Query:
delete from ubbt_FORUM_PERMISSIONS
where FORUM_ID = 181

I did check with my hosting company thinking there was an issue with the SDQL and they stated the issue is with the coding.

Appreciate insight into this.
Liked Replies
by isaac
isaac
This looks like the columns being searched are int vs char.

ubbt_FORUMS FORUM_ID is int(9)
ubbt_FORUM_PERMISSIONS FORUM_ID is varchar(100)

If you turn off SQL strict mode, the error you have now should turn into just a warning, and you will be able to proceed.


But i believe this may be easily fixed at the code level by just adding single quotes around the string.

Give this a shot

FIND IN admin/dodeleteforum.php AROUND LINE 35
Code
		delete from {$config['TABLE_PREFIX']}FORUM_PERMISSIONS
		where FORUM_ID = ?

REPLACE WITH
Code
		delete from {$config['TABLE_PREFIX']}FORUM_PERMISSIONS
		where FORUM_ID = '?'
1 member likes this
by Ruben
Ruben
Isaac,
Freak asked me to implement your suggestions, as usual they are spot on.
And yes strict mode is enabled.

After doing so I checked the cp and had like 50+ forums.
Then I checked the forums table had 146 rows..
All the rows that were not displayed in the control panel had null values for forum_title and parent forum_id.
Plus the forum permissions and post tables had remaining rows with the bad forums.
So I edited the forums table to to add a forum-title and parent forum_id.
Then deleted them the normal way .
This cleaned them completely.

This was probably due to failed deletions over the years.

So I attempted to run the re builders and now have a error on rebuild posts.
I will post a new topic on that subject. with all the details.
1 member likes this
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
1 members (Ruben), 802 guests, and 202 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)