|
Joined: Oct 2007
Posts: 464 Likes: 11
Addict
|
Addict
Joined: Oct 2007
Posts: 464 Likes: 11 |
I was asked to rebuild the content on our forum. I started with Posts, and got this error about 275,000 posts into a 1 million plus set. Script: /var/www/html/ubbthreads/libs/content_rebuild.inc.php Line: 89 SQL Error: Data too long for column 'POST_BODY' at row 1 SQL Error: 1406 I'm not sure what to do with this. Can I rebuild the Forums, Topics, etc? Or do I need to stop and fix this first? If the latter, how do I do that?
|
|
|
|
Joined: Jun 2006
Posts: 16,367 Likes: 126
|
Joined: Jun 2006
Posts: 16,367 Likes: 126 |
When a user overflows a TEXT cell size with a single post that's 64 Kilobytes of text in in the single database cell; a MEDIUMTEXT (the default size of a PHP text string) is the next size up as far as database text types go, and is really untested with the UBB.threads system (I'd make a copy of your database and convert the cell and check if everything is running without an issue before you proceed). The MEDIUMTEXT allows 16 Megabytes of text into a single cell, and users really should not be inserting that much text into a single posting..
|
|
|
|
Joined: Oct 2007
Posts: 464 Likes: 11
Addict
|
Addict
Joined: Oct 2007
Posts: 464 Likes: 11 |
Thank you for your response.
Is it safe to rebuild Topics, Forums, and Post Counts before addressing this issue? And is there any way to determine which post or posts is/are the culprit?
|
|
|
|
Joined: Jun 2006
Posts: 16,367 Likes: 126
|
Joined: Jun 2006
Posts: 16,367 Likes: 126 |
I believe that the error should throw the row id when managing that table via phpmyadmin or the cli (I have only seen it when attempting to convert the database to a utf8mb4_general_ci collation
|
|
|
|
Joined: Oct 2007
Posts: 464 Likes: 11
Addict
|
Addict
Joined: Oct 2007
Posts: 464 Likes: 11 |
|
|
|
|
Joined: Dec 2003
Posts: 6,628 Likes: 85
|
Joined: Dec 2003
Posts: 6,628 Likes: 85 |
Bear in mind that if you can find the row id it simply could be a corrupted post. That may need editing or just deleting.
Of course that means database diving like using phpadmin and editing that row in that table.
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Oct 2007
Posts: 464 Likes: 11
Addict
|
Addict
Joined: Oct 2007
Posts: 464 Likes: 11 |
I don't have a problem doing that if I can identify the row.
|
|
|
|
Joined: Oct 2007
Posts: 464 Likes: 11
Addict
|
Addict
Joined: Oct 2007
Posts: 464 Likes: 11 |
I found the problem post and deleted it. After that I was able to successfully rebuild posts. I ran into a second problem when rebuilding private messages. This is the error message. It was consistently repeatable. Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/ubbthreads/libs/html.inc.php on line 858 Anyone have an idea what might be causing this?
|
|
|
|
Joined: Jun 2006
Posts: 16,367 Likes: 126
|
Joined: Jun 2006
Posts: 16,367 Likes: 126 |
The maximum execution time is a setting in your PHP configuration, ask your host to increase this value to 60 to process your data; I'm assuming that because you have such a large forum that it's simply taking longer to process all of the data.
|
|
|
|
Joined: Oct 2007
Posts: 464 Likes: 11
Addict
|
Addict
Joined: Oct 2007
Posts: 464 Likes: 11 |
Thanks. I suspected that's what it was. We'll try again tonight.
|
|
|
|
Joined: Jun 2008
Posts: 48 Likes: 1
Newbie
|
Newbie
Joined: Jun 2008
Posts: 48 Likes: 1 |
Hi Gizmo (or others)
Running the tool to convert our forum database from latin1_swedish_ci to utf8mb4_general_ci
I get the following error
Script: Line: SQL Error: Data too long for column 'POST_BODY' at row 159149 SQL Error: 1406
Query:ALTER TABLE ubbt_POSTS MODIFY `POST_POSTER_IP` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci, MODIFY `POST_SUBJECT` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci, MODIFY `POST_BODY` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci, MODIFY `POST_DEFAULT_BODY` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci, MODIFY `POST_ICON` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci, MODIFY `POST_MARKUP_TYPE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'markup', MODIFY `POST_LAST_EDITED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci, MODIFY `POST_LAST_EDIT_REASON` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci, MODIFY `POST_POSTER_NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci, MODIFY `POST_MD5` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
So my question is if row 159149 is the value in POST_ID or is it the physical row in the table not ordered by an index?
If it is not the POST_ID is there a simple way to select that row so I can try to edit out the cause of the "Data too long" error?
The text length is 4540 (Not the largest of our POST_BODY entries and begins with "<div class="ubbcode-block"><div class="ubbcode-header"> " where there are many other records smaller and larger before this POST_ID .
Although the query result records are mostly in POST_ID order they are not exactly in order leading me to believe the error row reported by the script is not the POST_ID
Any ideas how best to get row record reported by the script?
Abbott
|
|
|
|
Joined: Jun 2008
Posts: 48 Likes: 1
Newbie
|
Newbie
Joined: Jun 2008
Posts: 48 Likes: 1 |
Found the offending record. Truncated POST_BODY and POST_DEFAULT_BODY to the same spot in the text. Re-running conversion script.
Abbott
|
|
|
|
Joined: Dec 2003
Posts: 6,628 Likes: 85
|
Joined: Dec 2003
Posts: 6,628 Likes: 85 |
Late on the answer but yes, that is the row number not a post id number. Phpmyadmin in cpanel is probably the most popular tool to use to edit the row.
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
1 members (ehill),
1,124
guests, and
128
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|